Commit Graph

512 Commits

Author SHA1 Message Date
Kenneth Moreland
ffd98463f5 Load correct file extension in header test build
Not all VTK-m headers end in .h, but the created test build files
assumed that it was loading in a .h file. Fixed that.
2018-04-19 15:14:32 -06:00
Kenneth Moreland
7c5f44a65d Fix warnings about no symbols
The test build file did not actually define any symbols, so the linker
might give a warning about it not being used in the library. Define some
unique symbol so that the linker will not complain.
2018-04-19 15:10:57 -06:00
Kenneth Moreland
289a4bc1aa Differentiate between header files with different extensions
If you tried to create test builds of a header.h and header.hxx, you
would get an error about building two files with the same name (tried to
build header.cxx for both of them). Fixed this by adding the original
extension name to the source file name.
2018-04-19 15:02:33 -06:00
Kenneth Moreland
9571c9b54f Fix vtkm_add_header_build_test
The CMake configuration stopped creating any of the test builds. There
were a couple of errors introduced into this function that needed to be
fixed.

First, the condition on whether the testing should be skipped got
reversed. It was trying to create test build files for all the headers
that were not supposed to be built instead of the ones that were.

Second, the list of source files to build was not created correctly. The
set command that stored the name of the source file got removed, and so
nothing was being added to the list. I restored the variable and used
that consistently for the source file name.
2018-04-19 14:31:30 -06:00
Robert Maynard
0bde9b9afa Update VTKmConfig documentation to list variables and targets VTK-m constructs
Fixes #219
2018-04-19 16:27:38 -04:00
Robert Maynard
e62978853b Remove usage of CMake commands that don't exist in CMake 3.3 2018-04-19 15:31:43 -04:00
Robert Maynard
eb25956ae2 On MSVC+CUDA pass -expt-relaxed-constexpr 2018-04-19 10:06:20 -04:00
Robert Maynard
8c7c1be232 Specify an RPATH for CUDA runtime on OSX so tests will run 2018-04-17 14:05:07 -04:00
Robert Maynard
06c3389aa7 Merge topic 'correct_cuda_calling_host_function_warnings'
73c05c10 Suppressions of __host__ warnings shouldn't trigger internal compile errors
5100e559 Suppress warnings about calling __host__ functions from CUDA 9.0
282c515e Suppress warnings about calling __host__ functions from CUDA 8.0
5dfdc830 Cuda will also print error/warning pragma values now.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1150
2018-04-12 14:35:01 -04:00
Utkarsh Ayachit
d5b48645a3 Merge topic '217-add-distribute-testing-support'
3211c150 add support to run test with MPI.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1148
2018-04-12 14:26:47 -04:00
Robert Maynard
5dfdc8304b Cuda will also print error/warning pragma values now.
Previously we only printed out the error numbers on MSVC.
2018-04-12 10:06:57 -04:00
Robert Maynard
bc34a14f0f Merge topic 'remove_duplicate_lib_versioning'
2d522503 VTK-m library naming convention is now restored how it was done for v1.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1149
2018-04-11 17:18:45 -04:00
Robert Maynard
2d522503b0 VTK-m library naming convention is now restored how it was done for v1.2 2018-04-11 16:50:56 -04:00
Kenneth Moreland
c0bedb057e Merge topic 'find-tbb-version'
faf916f1 Fix condition on which to get the TBB version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1140
2018-04-11 13:45:22 -04:00
Utkarsh Ayachit
3211c1501c add support to run test with MPI.
`vtkm_unit_tests` now supports an MPI option that can be used to add
test that run with MPI. Adding `UnitTestFieldRangeGlobalCompute` to test
global ranges for fields.
2018-04-10 14:48:37 -04:00
Robert Maynard
de79765c24 Merge topic 'move_over_to_sm_archs'
d7ce601c To allow compiled in virtuals we need to only build for actual sm archs.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1146
2018-04-10 08:36:12 -04:00
Robert Maynard
5acaae3969 Merge topic 'examples_correctly_link_to_libGLU'
a37a3f39 Examples that use glu functions now properly link to OpenGL::GLU
a44ad273 Make sure Rendering example doesn't conflict with rendering testing name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !1147
2018-04-09 16:53:47 -04:00
Robert Maynard
a37a3f3968 Examples that use glu functions now properly link to OpenGL::GLU 2018-04-09 15:29:01 -04:00
Robert Maynard
d7ce601cd4 To allow compiled in virtuals we need to only build for actual sm archs.
CUDA currently doesn't support building for `compute_` and having compiled
in virtuals ( using separable compilation ). So we need to transition everything
over to `sm_`
2018-04-09 12:50:13 -04:00
Robert Maynard
b658a72af7 Fix broken VTK-m PyExpander functin
Fixes #216
2018-04-09 11:05:51 -04:00
Robert Maynard
84311a2453 Merge branch 'master' into cmake_refactor 2018-04-05 10:18:36 -04:00
Kenneth Moreland
faf916f1be Fix condition on which to get the TBB version
The FindTBB.cmake module gets the TBB version by reading and grepping
one of the header files. Before doing so, it checks to see if the
version variable already exists. The problem was it was checking
TBB_VERSION, which was never created. Worse, other build systems might
set this for us (for example, the ParaView superbuild). Correct this by
making sure both TBB_VERSION_MAJOR and TBB_VERSION_MINOR are set.
2018-04-04 16:34:34 -06:00
Kenneth Moreland
0d2309aba3 Add template sources to built library
Previously there was a special build for the template source files
(.hxx) that installed them but did not create the test builds (because
they cannot be built outside of their enclosing .h file). It also added
an entry into the IDE that let them show up on the file list. However,
because they were not explicitly built as part of something actually
compiled, they did not have an compile options associated with them.
This caused confusion in some IDEs where it could not find the header
files it included, which made it more frustrating to edit them.
2018-04-02 10:11:06 -06:00
Robert Maynard
cbadd3e67e Make CoordinateSystem not fail on CUDA 2018-03-10 16:38:41 -05:00
Utkarsh Ayachit
756c7e1d11 selectively disable C4275. 2018-02-27 13:42:52 -05:00
Utkarsh Ayachit
4813d7cb7f disable non-fixable MSVC warnings. 2018-02-26 15:33:56 -05:00
Robert Maynard
ee69c7a4b7 Remove VS2013 workarounds from VTK-m. 2018-02-23 15:39:39 -05:00
Robert Maynard
e630ac5aa4 Merge branch 'master' into vtk-m-cmake_refactor 2018-02-23 14:52:00 -05:00
Thomas Otahal
84de519250 Applied patch from Rob Maynard
This makes finding the implementation and explicit instantiations easier.
It also removes most macro usage from RadixSort.
2018-02-13 09:16:45 -07:00
Robert Maynard
022c987182 Correct warnings and errors found with MSVC2017+CUDA9 2018-01-31 15:58:45 -05:00
Robert Maynard
3caeeb88f6 Make sure that CUDA unit tests actually use cuda
Also if .cu files are passed as sources to a unit tests we
don't shim them
2018-01-31 15:58:43 -05:00
Robert Maynard
8b4181141d Correct the build location of libraries. 2018-01-31 15:58:23 -05:00
luz.paz
80b11afa24 Misc. typos
Found via `codespell -q 3` via downstream VTK
2018-01-30 06:51:47 -05:00
Robert Maynard
800a1823b7 Merge topic 'determine-version-context'
32cc61f7 VTKmDetermineVersion: list the project we found the version for

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1065
2018-01-29 10:24:15 -05:00
Utkarsh Ayachit
da2e851187 skip fmt and tthread from doxygen 2018-01-26 13:31:10 -05:00
Ben Boeckel
32cc61f7b0 VTKmDetermineVersion: list the project we found the version for
It's confusing inside of VTK and ParaView.
2018-01-24 09:17:57 -05:00
Ben Boeckel
dd1f096255 cmake: allow overriding of the build-tree CMake location 2018-01-18 08:40:40 -05:00
Robert Maynard
d1f0b621ab VTKmConfig sets all VTKm variables before doing anything else 2018-01-17 16:34:38 -05:00
Robert Maynard
df406b5ed3 VTKmConfig.cmake now correctly stating which gl context rendering has 2018-01-17 13:23:29 -05:00
Robert Maynard
4f131d8223 Make VTK-m CMake output no extra information when configuring 2018-01-16 17:23:42 -05:00
Robert Maynard
0ea06bfdb7 Properly version dynamic libraries and build them in the correct location 2018-01-16 17:23:12 -05:00
Robert Maynard
06da1528c4 vtk-m installed included directory obeys VTKm_INSTALL_INCLUDE_DIR 2018-01-16 15:42:38 -05:00
Robert Maynard
89ce1a34a0 Respect the settings of VTKm_Vectorization when building VTK-m 2018-01-16 15:42:37 -05:00
Robert Maynard
7c882473bd Correct compilation under MSVC when CUDA is enabled. 2018-01-16 15:42:37 -05:00
Robert Maynard
ec074bb627 Redesign how we specify cxx files should be compiled as cuda.
Due to limitations in the CUDA MSBuild support and how CMake stores the language
of a source file, we had to change VTK-m over to using generated .cu files
to signal when we want CUDA compilation.
2018-01-16 15:42:37 -05:00
Robert Maynard
e1916ea7e2 Redesign of vtk-m test build infrastructure to reduce amount of cmake re-runs
Previous versions of the test build infrastructure would cause cmake to re-run
everytime a header was modified. Now this will not occur.
2018-01-16 15:42:37 -05:00
Robert Maynard
98e4a34cd1 VTKm now refers to diy as vtkm_diy
This is done to be more consistent with the vtkm CMake naming and
to make sure we don't conflict with other exported diy instances.
2018-01-16 15:42:36 -05:00
Robert Maynard
0660c67fef Merge branch 'master' into vtk-m-cmake_refactor 2018-01-16 15:42:28 -05:00
Ben Boeckel
c5d630a77e cmake: add a vtkm_option macro
Projects might want to force these without giving users the indication
that their choices actually matter.
2018-01-16 15:21:17 -05:00
Ben Boeckel
268a88e748 cmake: remove executable permissions from CMake files 2018-01-16 14:56:02 -05:00
Robert Maynard
4a09615000 Correct issues when building on windows 2018-01-08 14:00:58 -05:00
Matthew Letter
360174fd48 adding logic for determining a location for cuda windows
adding logic for determining a location for cuda windows, the location has to be valid for cmake to config cuda correctly.
2018-01-08 14:00:58 -05:00
Robert Maynard
5dd6e09da6 CUDA compilation on linux now works with CMake 3.9 and gcc 6 2018-01-08 14:00:58 -05:00
Robert Maynard
3f02d97ae4 Re-enable verification of generated files with pyexpander 2018-01-08 14:00:58 -05:00
Robert Maynard
5c140abc64 Re-enable support for header include tests for VTK-m 2018-01-08 14:00:58 -05:00
Robert Maynard
dcb340b8ee Correct logic failure on when to find OpenGL 2018-01-08 14:00:58 -05:00
Robert Maynard
f59856ec17 VTKmCPUVectorization now follows VTK-m CMake indentation rules 2018-01-08 14:00:58 -05:00
Robert Maynard
5e1f7c60ad VTKm_INSTALL_ONLY_LIBRARIES allows installation of only vtk-m libs 2018-01-08 14:00:58 -05:00
Robert Maynard
9277eaa2d3 Update FindOpenGL to version in CMake 3.10.1 2018-01-08 14:00:57 -05:00
Robert Maynard
18a360b793 Properly allow constexpr on the device side when compiling cuda 2018-01-08 14:00:57 -05:00
Robert Maynard
b2c03ad858 Unit_tests are built with the correct compiler when cuda is enabled.
Previously all the Unit_tests that shared source files would use cuda
once CUDA set the language on the file.
2018-01-08 14:00:57 -05:00
Robert Maynard
afc19ab0fc Setup symbol visibility controls for VTK-m 2018-01-08 14:00:57 -05:00
Robert Maynard
37a2359c70 Refactor the rendering context flags to not be a combo box.
This way in the future it is easier to make currently mutually exclusive
compile options be all enabled at the same time.
2018-01-08 14:00:57 -05:00
Robert Maynard
af0a781086 Properly detect what flags to pass to cuda when CUDA_Architecture is native 2018-01-08 14:00:54 -05:00
Utkarsh Ayachit
4a05277296 Exclude thirdparty/diy from VTKmCheckSourceInBuild check. 2018-01-03 15:09:14 -05:00
Utkarsh Ayachit
4b4e43ae83 update VTKmCheckCopyright for new diy header locations. 2018-01-03 14:53:37 -05:00
Robert Maynard
52329ba3f6 Make sure all VTKm cmake files are prefixed with VTKm 2017-12-28 14:25:44 -05:00
Robert Maynard
24e57556e6 Merge branch 'master' into vtk-m-cmake_refactor
Includes updating to cleanup benchmark code and handle the new MPI option
2017-12-28 14:23:21 -05:00
Matt Larsen
83e51cf42e creating ray tracing benchmark 2017-12-20 14:22:52 -08:00
Utkarsh Ayachit
186e686968 Add ability to run tests with mpiexec.
Extends `vtkm_unit_tests` to support running tests with `mpiexec`.
Updates `UnitTestMultiBlock` to use mpi, if available.
2017-12-18 14:45:25 -05:00
Utkarsh Ayachit
6a4edd87f7 Exclude diy from VTK-m Copyright checks. 2017-12-15 15:15:22 -05:00
Utkarsh Ayachit
9dfc6f814e Add MPI as a dependency.
Adding option to enable MPI. When enabled, we do `find_package(MPI)` in
the Base component itself.
2017-12-15 10:53:30 -05:00
Matthew Letter
4b058229ce Merge branch 'master' into cmake_refactor 2017-12-08 09:51:48 -07:00
Kenneth Moreland
62fa1d562a Fix location of VTKmCheckPyexpander.cmake
The location of VTKmCheckPyexpander.cmake was originally set to $
{CMAKE_SOURCE_DIR}/CMake. This is correct with respect to the VTK-m
install, but incorrect if VTK-m is being included as a module in another
project (like VTK). Change the location to ${VTKm_CMAKE_MODULE_PATH},
which should be correct in every case.
2017-12-07 09:27:59 -07:00
Matthew Letter
7f2862a78d found naming bug with CMmake dir name
there appears to be a bug in the naming of a source dir for VTKmExportHeaderTemplate.h.in so it can't find the config file
2017-11-30 10:33:05 -07:00
Matthew Letter
4e4dec627c added missing copyright statement 2017-11-30 10:21:38 -07:00
Matthew Letter
605c78722d updated to recommended flags for clang
added the recommended flags for clang for knl and  skylake achitectures and removed the old flags.
2017-11-28 11:58:09 -07:00
Matthew Letter
92f4aa95c4 Added skylake_flags and knl_flags
Removed avx512_flags and replace it with 2 options of skylake_flags and knl_flags.
2017-11-27 16:38:33 -07:00
Matthew Letter
e416516a36 added guard to vectorization flags
added guard to vectorication flags so we do not build the flags more than once
2017-11-27 14:23:31 -07:00
Matthew Letter
05a6ba5254 Added newlines to resolve kitware robot errors
I was getting missing newlines errors from the kitware robot so this should fix them
2017-11-17 09:12:16 -07:00
Matthew Letter
d7eb1d32db first pass at adding vertorization flags back into the build #5
Ported cpu vectorization flags over to new CMake file called CPUVectorization.cmake and refactored some of the logic to use an interface lib.
2017-11-16 16:50:07 -07:00
Matthew Letter
c57c11adc8 Removed fermi flags from the cuda "all" build #4
Fermi architecture support is being deprecated
in the CUDA 8.0 Toolkit so we are removing it from the all build
2017-11-12 20:21:23 -07:00
Matthew Letter
5a2dbeff4c modifying CUDA_NVCC_FLAGS and updating for string list appending #4
modifying CUDA_NVCC_FLAGS to CMAKE_CUDA_FLAGS and CMAKE_CUDA_FLAGS is a string not a list so changed the way the flags are being added to the variable
2017-11-12 15:59:04 -07:00
Matthew Letter
3941530d64 removing NVCC FLAGS now that we use proper CUDA support #4 2017-11-10 10:27:55 -07:00
Matthew Letter
59ce1189cc added cuda compiler flags logic from ConfigureComponents #4
Ported cuda compiler flags logic from ConfigureComponents over to vtkmDeviceAdapters.cmake
2017-11-09 14:52:25 -07:00
Matthew Letter
8efa4bdf19 added SourceInBuild back into vtkm closes #10 2017-10-31 16:38:44 -06:00
Matthew Letter
47d0926a26 added SystemInformation cmake funcitonality closes #9 2017-10-31 16:37:04 -06:00
Matthew Letter
57cc8cdad1 Added copyright check back into the build closes #7 2017-10-31 16:36:07 -06:00
Matthew Letter
0c574d7d60 Added pyexpander back into the build closes #6 2017-10-31 16:30:09 -06:00
Matthew Letter
fdfcc91fe1 Added doxyfile and vtkmBuildDocumentation.cmake closes #8
added doxyfile and vtkmBuildDocumentation.cmake back into the build process and tested that they built out the html docs.
2017-10-31 16:10:14 -06:00
Matthew Letter
b22e8b568d Rename vtkmBackends.cmake to vtkmDeviceAdapters.cmake closes #2
Renamed vtkmBackends.cmake to vtkmDeviceAdapters.cmake and renamed all references to vtkmBackends.cmake to use the new naming scheme.
2017-10-31 15:28:22 -06:00
Matthew Letter
16474bec53 Rename vtkm_debug_flags to vtkm_developer_flags closes #1
This task came up after review with rob and ken for renaming the flags used in development build.
2017-10-31 15:25:21 -06:00
Robert Maynard
ece16d3b0b Correctly build the vtkm::cuda target on linux. 2017-10-27 15:30:17 -04:00
Robert Maynard
673262b9a0 Correct testing infrastructure to handle multiple backends 2017-10-27 15:30:17 -04:00
Robert Maynard
db3e97bac6 Correct issues when CUDA is enabled. 2017-10-27 15:30:16 -04:00
Robert Maynard
ed8f4111ef Update all the code to work with CMake 3.3
Obviously this does mean that CUDA is not supported with 3.3.
2017-10-27 15:30:14 -04:00
Robert Maynard
3ded554831 Extend the CMake rewrite to include vtkm_rendering 2017-10-27 15:29:58 -04:00
Robert Maynard
56c7362258 A thought on what CMake 3.9 would mean to VTK-m. 2017-10-27 15:29:51 -04:00
Allison Vacanti
e9633e1dea Move some MSVC warning disablers to Configure.h
These useless warnings are popping up in VTK/ParaView builds that use
VTKm. Moving them to a header so other projects will get them.
2017-10-23 15:16:49 -04:00
Kenneth Moreland
c6d23cadf0 Fix VTK-m version for tarball in another git repository
A ParaView user noted that the determine version script (which is
essentially the same for ParaView and VTK-m) incorrectly used the
results of git describe when the source actually came from a tarball
distribution that was placed in another git archive. (The SHA was
incorrectly taken from the enclosing git project.) See the ParaView bug
for more details on the report:

https://gitlab.kitware.com/paraview/paraview/issues/17761

This fix simply checks to make sure the the source directory has the
.git subdirectory expected in all git projects.
2017-10-19 11:41:30 -06:00
Allison Vacanti
c0a7315906 Clean up install/VTK issues in VTKmConfig.cmake. 2017-10-03 11:28:15 -04:00
Allison Vacanti
75f88b4c46 Add versioning to VTKM installed include/share dirs. 2017-10-02 11:39:10 -04:00
Allison Vacanti
b3852e8dfb Add versioning to VTKM libraries. 2017-10-02 11:39:10 -04:00
Kenneth Moreland
fb6be2819d Merge topic 'doxygen-fixes'
52060f52 Fix many warnings from doxygen

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !951
2017-09-22 14:05:24 -04:00
Robert Maynard
311618a15f Enable highest level of warnings(W4) under MSVC
This will make VTK-m warning level match the one used by VTK. This commit
also resolves the first round of warnings that W4 exposes.
2017-09-22 13:04:28 -04:00
Kenneth Moreland
52060f52c7 Fix many warnings from doxygen
There are still some warnings left:

* Some text in markdown files are incorrectly picked up as
  doxygen commands
* ArrayPortalTransform weirdly inherits from a specialized
  version of itself. It's technically correct C++ code, but
  gives doxygen fits.
2017-09-22 10:29:08 -06:00
Kenneth Moreland
54e6948e47 Make redirect of doxygen work on windows 2017-09-21 14:41:25 -06:00
Kenneth Moreland
1e48012fab Merge topic 'update-license'
c3a3184d Update copyright for Sandia

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Berk Geveci <berk.geveci@kitware.com>
Merge-request: !945
2017-09-21 11:03:33 -04:00
Kenneth Moreland
c3a3184d51 Update copyright for Sandia
Sandia National Laboratories recently changed management from the
Sandia Corporation to the National Technology & Engineering Solutions
of Sandia, LLC (NTESS). The copyright statements need to be updated
accordingly.
2017-09-20 15:33:44 -06:00
Robert Maynard
8e2751e1a4 Refactor VTK-m to make the interop code non-conditional. 2017-09-20 13:43:23 -04:00
Shawn Waldon
2f2909f796 Add support for containing project to override default install locations 2017-08-28 11:38:31 -04:00
Shawn Waldon
a481671c5b Configure files to VTKm_BINARY_DIR-based paths 2017-08-28 11:38:31 -04:00
Shawn Waldon
1672093787 Avoid redefining CMake default variables
When used as a submodule, redefining LIBRARY_OUTPUT_PATH and
EXECUTABLE_OUTPUT_PATH fails since the CMake default variables from the
containing project already exist.
2017-08-28 11:38:31 -04:00
Robert Maynard
33c0d59791 Merge topic 'add_cmake_default_build_types'
ad3e0f32 VTK-m now provides a default and a list of types for CMAKE_BUILD_TYPE.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !871
2017-08-10 12:18:25 -04:00
Robert Maynard
76d10e1835 Add volta to the list of support CUDA devices to compile for. 2017-08-10 11:02:07 -04:00
Robert Maynard
ad3e0f320e VTK-m now provides a default and a list of types for CMAKE_BUILD_TYPE.
CMake has several default build types, but if nothing is specified when
configuring your project it defaults to an empty string and no optimization
flags are used.

It will now default to using a debug build if the source directory is a git
clone, or a release build if not. Additionally when using ccmake or cmake-gui
this will provide a nice list of possible options for CMAKE_BUILD_TYPE.
2017-08-10 10:47:14 -04:00
Robert Maynard
3a71c58e4f Merge topic 'doxygen_tweaks'
98f8c2e0 Doxygen now excludes the thrust policy namespace.
cb4cae86 Cleanup the aligned allocator doxygen.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !834
2017-07-12 08:54:31 -04:00
Robert Maynard
98f8c2e0fe Doxygen now excludes the thrust policy namespace. 2017-07-11 08:48:49 -04:00
Matt Larsen
013ff1ba45 On a system that has no opengl or mesa and with rendering enabled (such as docker container), vtkm fails to configure
when adding target_include_directories for the rendering library. I believe this happens because cmake determines that the variable VTKm_OPENGL_INCLUDE_DIRECTORIES is dependent on OPENGL_INCLUDE_DIRS( which is NOTFOUND). This causes cmake to raise an error even when VTKm_OPENGL_INCLUDE_DIRECTORIES is set to "".
2017-07-10 07:24:50 -07:00
Robert Maynard
9cb98f85f0 Doxygen disable showing full paths for files 2017-07-07 11:14:25 -04:00
Robert Maynard
c1f1f3cb68 Add CONTRIBUTING.md to the doxygen page 2017-07-07 11:14:25 -04:00
Robert Maynard
feaa145026 Make VTK-m inheritance diagrams look like VTK's 2017-07-07 11:14:25 -04:00
Robert Maynard
3f42642d24 Use Markdown readme as mainpage for doxygen. 2017-07-07 11:14:25 -04:00
Robert Maynard
c09e88d214 Improve the overall doxygen content for vtk-m. 2017-07-07 11:14:25 -04:00
Robert Maynard
ccc8455e1d First initial pass at cleaning up the doxygen generation for vtkm 2017-07-07 11:14:25 -04:00
David C. Lonie
8ffaa83be1 Silence pointless warnings on TestBuilds.
The TestBuild_* targets were not getting the _SCL_SECURE_NO_WARNINGS
define set on MSVC.
2017-06-29 09:51:06 -04:00
Robert Maynard
05ddc1ad95 Always treat CUDA_NVCC_FLAGS as a CMake list.
CUDA_NVCC_FLAGS is not like other compiler flag variables and needs to
be treated as a list and not as a single string
2017-05-31 13:05:51 -04:00
Kitware Robot
4ade5f5770 clang-format: apply to the entire tree 2017-05-25 07:51:37 -04:00
Kitware Robot
efbde1d54b clang-format: sort include directives 2017-05-18 12:59:33 -04:00
Robert Maynard
685dd0f3c6 Avoid spaces with CUDA generate-code flag.
This resolves issues with CMake's separable compilation logic.
2017-05-15 14:31:52 -04:00
Kenneth Moreland
3219abc11e Look for TBB includes/libs in previously selected directories
In the FindTBB module, add the directory of the TBB includes and the
directory of the base tbb library to the list of paths to search for
TBB includes and libs, respectively. The reason is that TBB has its
initial includes and libraries and then has its support libraries.
Rather than enter entire paths 9 separate times, this allows you to
select the include directory once and one TBB library and the rest will
be automatically populated.
2017-04-18 13:03:06 -06:00
Robert Maynard
e1695da085 VTK-m now makes it easy to compile with Pascal support. 2017-04-13 15:34:08 -04:00
Kenneth Moreland
5355a432f3 Remove unnecessary library dependencies
The vtkm_library macro was making all VTK-m libraries depend on all
other VTK-m libraries previously defined. This potentially creates
unnecessary linking. Instead, only depend on the backend libraries (like
TBB) and libraries explicitly given.
2017-03-09 13:18:36 -05:00
Kenneth Moreland
c16236ce69 Use ArrayRangeCompute without specifying a device
Most uses of ArrayRangeCompute just want to get the range of the data
and probably don't have a particular device in mind. Thus, it is better
to use a TryExecute internally use whatever devices are available.

Note that when using TryExecute, the calling code is expected to be able
to support all devices. That might not always be the case. Thus, I am
experimenting a bit with how we incorporate this in a library. The
advantage of having the code compiled in a library is that you only have
to compile it once and the calling code does not need to worry about
CUDA, etc.

However, because ArrayRangeCompute is templated, we can only pre-compile
some subset of array handle types. The most common are compiled into the
code (matching all the predefined ArrayHandles as well as some special
cases). If the code wants to use some other type, it has to include
ArrayRangeCompute.hxx. The only place where this is necessary is a test
that intentially trys to find the range on an uncommon type.

If array portals were to support virtual methods, then we should be able
to modify this code so that we could precompile for all array handle
types.
2017-03-09 13:18:36 -05:00
Kenneth Moreland
a3573117de Compile RuntimeDeviceTracker.cxx with CUDA when appropriate
The RuntimeDeviceTracker.cxx contains a library method that queries the
CUDA device, which only works if compiled as a CUDA source file.

This set up will allow code that is not compiled with CUDA use a
RuntimeDeviceTracker with other code that does use CUDA.
2017-02-22 16:18:23 -07:00
Robert Maynard
ca302128a9 Merge topic 'benchmarks'
fc68362d Build benchmarks even when testing is not enabled.
31e20859 Fix typo.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !696
2017-02-15 15:10:38 -05:00
Kenneth Moreland
58bbeb183a Support using empty array handles as input
Previously if you constructed an array handle without allocating it, you
would get an error if you tried to use the array as input. This
conflicted with some recent changes to accept empty vectors.

Now when you try to use an unallocated ArrayHandle as input (calling
PrepareForInput or PrepareForInPlace), it internally calls Allocate(0)
(to establish internal state) and sets up a valid execution ArrayPortal
of size 0.
2017-02-14 15:27:34 -07:00
Tom Fogal
fc68362d4b Build benchmarks even when testing is not enabled. 2017-02-14 13:48:56 -08:00
Robert Maynard
407f9822c2 Merge branch 'use_usage_requirements' into 'master'
Use usage requirements

See merge request !673
2017-01-27 17:36:16 -05:00
Robert Maynard
dc143e7d9e Fix issues found on dashboard machines. 2017-01-27 15:22:34 -05:00
Robert Maynard
8035b526a8 Update the CMake components to have the concept of backends.
Now components are labeled as devices, and therefore allow other components
to link to only backends. We also have done the same thing for rendering.
2017-01-27 10:03:53 -05:00
Robert Maynard
e683f979b9 All target_link_libraries now use the new syntax.
This is the first step in making proper portable CMake target code
for VTK-m.
2017-01-27 10:03:52 -05:00
Robert Maynard
5d23c4bf21 VTK-m find module better follow recommended best practices.
CMake best practices are found at:
  https://cmake.org/cmake/help/v3.3/manual/cmake-developer.7.html#modules
2017-01-27 10:03:52 -05:00
Kenneth Moreland
a575ec1d5b Add warning if git version disagrees with version.txt
I don't trust myself to not forget.
2017-01-26 10:08:45 -07:00
Kenneth Moreland
3ffd16a8a6 Add ability to get VTK-m version from git
In addition to keeping the version number accurate, this will help us
differentiate between-the-numbers commits.
2017-01-26 10:02:04 -07:00
Robert Maynard
d8d6fd1741 StorageTags are now always exported to resolve future dynamic_cast issues.
Class that need to be passed across dynamic library boundaries such as
DynamicArrayHandle need to be properly export. One of 'tricks' of this
is that templated classes such as PolymorphicArrayHandleContainer need
the Type and Storage types to have public visibility.

This makes sure that all vtkm storage tags have public visibility so
in the future we can transfer dynamic array handles across libraries.
2017-01-16 09:17:38 -05:00
Robert Maynard
4f43089fe3 Redesign our export headers to handle template exports. 2017-01-16 09:17:38 -05:00
Robert Maynard
a7baa5409d make sure cuda test build executables have all include directories. 2016-11-30 17:12:41 -05:00
Robert Maynard
6db006a28b VTK-m cmake config files not explicitly state we require cmake 3.3 2016-11-30 14:10:30 -05:00
Robert Maynard
7233c422df Setup proper symbol visibility flags when building cuda files in a library 2016-11-28 15:40:54 -05:00
Kenneth Moreland
e1a9264d5d Re-enable test builds
During a round of resolving compile issues on the dashboard, the test
builds were disabled, but never re-enabled. This change re-enables the
test builds.
2016-11-16 09:52:38 -07:00
Christopher Sewell
8a8b409d4c Merge remote-tracking branch 'upstream/master' into StreamingArray 2016-11-09 12:15:58 -07:00
Robert Maynard
c75feb74bb Don't build vtkm_rendering if we can't find opengl. 2016-10-31 15:16:36 -04:00
Robert Maynard
ab98ae8992 Remove boost CMake logic as VTK-m doesn't require boost now. 2016-10-21 08:41:22 -04:00
Christopher Sewell
05975a2325 Attempt 3 to resolve Windows compiler warning with streaming storage 2016-10-20 10:32:30 -06:00
Mark Kim
464da87d5a Merge branch 'master' of gitlab.kitware.com:vtk/vtk-m 2016-10-12 14:40:32 -04:00
Kenneth Moreland
fbb061d661 Fix some minor issues with move to glut CMake component
I was using GLUT_LIBRARY instead of GLUT_LIBRARIES, and there was an
extra use of GLUT_INCLUDE_DIR that should not have been there.
2016-10-04 10:48:19 -06:00
Kenneth Moreland
039efd6b7e Fix some issues with OpenGL configuration
Change the OpenGL configuration to require GLEW as most of the OpenGL
code actually requires GLEW (or will as soon as the VBO branch gets
merged in).

Also removed some stray find_package commands and rearranged the
configuration to use the vtkm_configure_component_* commands instead.
2016-10-03 17:34:15 -06:00
Kenneth Moreland
d1d7ac54a0 Add GLUT component to find_package(VTKm)
This makes it easier to use VTK-m with GLUT. It also makes it more
consistent with GLFW, GLEW, and other support libraries.
2016-10-03 17:34:13 -06:00
Kenneth Moreland
9f0bd78860 Add C++11 flags to sub-projects
Recently VTK-m was changed to require C++11. The internal builds set
properties to require C++11, but these never make it to the
configuration for projects that use the VTK-m package (i.e. not declared
in VTKmConfig.cmake).

This change adds a new CMake target, vtkm, which is an interface. It
does not point to an actual library, but it allows code that links it in
to have the appropriate compile flags.
2016-09-29 14:06:07 -04:00
Mark Kim
4e73280175 General Rendering needs glew now. 2016-09-26 16:24:24 -04:00
Mark Kim
a41e0f28df Merge branch 'master' of gitlab.kitware.com:vtk/vtk-m 2016-09-26 16:12:19 -04:00
Robert Maynard
346133d195 Make sure we don't duplicate commands to NVCC.
The previous attempt at using caching to prevent duplicate commands, failed
when you tried to build VTK-m itself and had examples turned on. Now we
just don't add the std=c++11 option if it already exists.
2016-09-23 10:09:32 -04:00
Mark Kim
5827473abb Merge branch 'master' of gitlab.kitware.com:dpugmire/vtk-m 2016-09-23 09:46:48 -04:00
Kenneth Moreland
30de41271e Merge topic 'build-rendering-to-enable-rendering'
4b838263 Fix uninitialized variable warning in structured volume renderer
1e819c33 Remove uninitialized value warnings from PNGDecode
c1de0e07 Change VTKm_BUILD_RENDERING to VTKm_ENABLE_RENDERING

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !553
2016-09-22 15:40:36 -04:00
Kenneth Moreland
c1de0e0746 Change VTKm_BUILD_RENDERING to VTKm_ENABLE_RENDERING
This makes the name more consistent with the names of the other VTK-m
CMake options.

Also changed the default to be ON. I do not see a big downside to
compiling the rendering library most of the time.
2016-09-21 14:38:00 -06:00
Robert Maynard
43651c55bc Make sure we don't duplicate commands to NVCC.
When you called find_package multiple times with VTK-m components such as CUDA
would continuously append to variables, causing a variable to have the same
parameter listed multiple times.
2016-09-21 16:22:52 -04:00
Robert Maynard
c8726814b8 Make VTKmDetectCUDAVersion work with C compilers. 2016-09-21 16:00:57 -04:00
Robert Maynard
5c7c546c86 Merge branch 'properly_cache_cuda_native_flags' into 'master'
Properly cache the results of CUDA native detection.

I found some issues when using VTK-m from inside VTK. The issues where
that on reconfigures the device architectures flags where dropped by the
caching mechanism.

See merge request !555
2016-09-19 16:30:03 -04:00
Robert Maynard
462a1b0882 Properly cache the results of CUDA native detection.
I found some issues when using VTK-m from inside VTK. The issues where
that on reconfigures the device architectures flags where dropped by the
caching mechanism.
2016-09-19 14:58:18 -04:00
Kenneth Moreland
0ca69cf65f Merge topic 'osmesa-option'
123bc8b6 Add a configuration error if OSMesa was not found
0a61085d Do not load OpenGL libraries if OSMesa already loaded
640e92c7 Add VTKm_ENABLE_OSMESA option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !548
2016-09-17 10:11:55 -04:00
Kenneth Moreland
b3e1e8f962 Make GLFW CMake configure vars advanced
It is standard now in CMake to make the CMake configuration variables
(like those specifying paths to files for a library) are marked as
advanced. Otherwise, the CMake configuration gets overwhelmed by lots of
parameters that are either found automatically or only need to be set
once.
2016-09-15 09:47:28 -06:00
Mark Kim
f293c5a0bc Merge branch 'glut-unittest' 2016-09-14 09:19:57 -04:00
Kenneth Moreland
9fcfc0e6a1 Send test builds to their own directory
Send the libraries created for test builds to their own directory so as
to not polute the directory with useful libraries.
2016-09-12 13:33:23 -06:00
Kenneth Moreland
990ba6bfd2 Make test build libraries static
The test builds are created by making some library targets for libraries
with nothing useful. (The intention is to test a build of the code, not
use the built code.) To prevent linking issues, each test build defines
a function named Test_Build_For_<headername>.

However, when BUILD_SHARED_LIBS was on for windows, it never actually
exported anything because dlls need a __declspec(dllexport) on it. Thus,
nothing was exported from the library, and that could cause issues with
the build system (e.g. https://public.kitware.com/Bug/view.php?
id=15885). To get around the issue, always compile the test build
libraries as static.
2016-09-12 13:24:21 -06:00
Robert Maynard
0846d2c890 Merge topic 'use_host_compiler_to_detect_cuda'
8810d3db Use the CUDA_HOST_COMPILER when running VTKm_CUDA_Architecture native check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !545
2016-09-12 10:30:05 -04:00
Robert Maynard
8810d3db3d Use the CUDA_HOST_COMPILER when running VTKm_CUDA_Architecture native check 2016-09-12 09:07:36 -04:00
Kenneth Moreland
0a61085d48 Do not load OpenGL libraries if OSMesa already loaded
OSMesa should have its own version of OpenGL, and another OpenGL library
could conflict with it.
2016-09-09 15:01:17 -06:00
Kenneth Moreland
640e92c750 Add VTKm_ENABLE_OSMESA option 2016-09-09 14:50:31 -06:00
Kenneth Moreland
8e845d6933 Merge branch 'rendering-library' into 'master'
Rendering library

Pull the majority of the implementation of the rendering
package into a library for better compile performance.

See merge request !527
2016-09-09 16:28:09 -04:00
Kenneth Moreland
68559d130a Merge branch 'autoload-base-component' into 'master'
Always load "Base" component in find_package

A big part of the VTK-m find_package configuration is a set of
components that load different parts of VTK-m's configuration. If you
load none of the components, you do not actually get enough to compile
any part of VTK-m, which is confusing. To get around this, always load
the "Base" component.

See merge request !541
2016-09-09 16:01:49 -04:00
Kenneth Moreland
e931aac26b Separate arguments for target_compile_options
The target_compile_options expects the arguments to be in a CMake list.
However, the variables used to hold CMake lists are space separated to
be just put in a command line. Thus, call separate_arguments on the
string before using it.
2016-09-08 16:34:04 -06:00
Kenneth Moreland
bd1f33dd9e Revert change in use of target_link_libraries signature
We moved to using the more modern signature of target_link_libraries,
but on some platforms this causes a configuration error. The issue is
that cuda_add_library internally uses target_link_libraries with the old
signature, and CMake does not allow us to use both signatures on the
same target.
2016-09-08 09:43:47 -06:00
Kenneth Moreland
3dae95f22a Update to newer CMake function interfaces
Per suggestions from Rob Maynard.
2016-09-07 16:48:17 -06:00
Kenneth Moreland
434f54195a Fix issue where exports failed when no libraries
Currently, the only library created is for the rendering package. If
VTKm_BUILD_RENDERING is off, then no libraries are created. If no
libraries are created, then there is nothing that declares a VTKmTargets
export. If there is nothing that creates a VTKmTargets export, the
export command fails.

Aaarg!!!! I can't even find a way to query whether an export is valid
(in the same way you can query whether a target exists). I added a
global variable that recorded whether vtkm_library added a library
(where things are added to the VTKmTargets export). The export command
is called if any libraries were created, a stub is created and installed
otherwise.
2016-09-07 16:48:15 -06:00
Kenneth Moreland
74aeeaa66b Add target exports to installed files
This makes it much easier for dependent CMake projects to find the VTK-m
libraries.
2016-09-07 16:48:13 -06:00
Kenneth Moreland
7e0ec48cab Enable building shared libraries 2016-09-07 16:48:09 -06:00
Kenneth Moreland
05fe2a0619 Allow sources to be declared in parent directory
A recent change to the rendering library has a source code in the
internal subdirectory references from the rendering directory. This
makes sense as we want all the components (whether externally visible or
not) to be in the same library. However this broke the SourceInBuild
tests as the source code was technically not referenced from the
CMakeLists.txt in the same directory.

Anticipating that this could be a common occurance, I modified the test
to also check the CMakeLists.txt in the parent directory.
2016-09-07 16:47:54 -06:00
Kenneth Moreland
111850ef08 Use TryExecute within the rendeirng library
When things in the rendering library need to execute things in parallel
(outside of another rendering library like OpenGL) it should run it on
available parallel devices. This means using TryExecute to attempt on
whatever devices may be available. It also means that some of the
sources must be compiled with CUDA's nvcc. To enable this, made a code
wrapping mechanism to compile within a .cu file.
2016-09-07 16:47:50 -06:00
Kenneth Moreland
ea8602d882 Create configuration for rendering library
I have noticed at least on my windows machine that source code that uses
the rendering package is taking a long time to compile. The rendering
library does not rely much on templates and more on virtual methods.
Thus, it is a good candidate for moving to a library so that it need be
compiled only once.

This sets up the configure scripts to create the library. There is also
a simple port of one class to the library. More will follow.
2016-09-07 16:47:35 -06:00
Kenneth Moreland
7e84c747ff Always load "Base" component in find_package
A big part of the VTK-m find_package configuration is a set of
components that load different parts of VTK-m's configuration. If you
load none of the components, you do not actually get enough to compile
any part of VTK-m, which is confusing. To get around this, always load
the "Base" component.
2016-09-07 09:42:38 -06:00
Kenneth Moreland
9c5b79f867 Reduce the number of times VTK-m configuration gives messages
Often times packages are loaded multiple times simply to resolve
dependencies. This can mean the same status is given multiple times
(particularly when a component does not load). This change reduces that
a bit by making sure the messages from the VTK-m configuration only
happen once.
2016-09-07 09:25:46 -06:00
Kenneth Moreland
e500695a58 Configure OSMesa before OpenGL
The configuration for OpenGL can change depending on whether OSMesa is
used, so make sure OSMesa is always configured first so that the
"correct" OpenGL is used.
2016-09-07 09:02:17 -06:00
Robert Maynard
75d435f7ad Merge topic 'refactor-cmake'
011605d4 Refactor CMake files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !493
2016-09-02 09:52:52 -04:00
Robert Maynard
f7ecc5fd02 CUDA+MSVC doesn't need --std c++11 explicitly specified. 2016-09-01 14:30:52 -04:00
Sujin Philip
011605d489 Refactor CMake files
1. Change set_property(...) to target_* commands
2. Remove explcit adding of CMAKE_CXX_FLAGS_WARN_EXTRA as compile option
3. Add /bigobj option to VTKm_COMPILE_OPTIONS under MSVC
2016-09-01 11:14:29 -04:00
Robert Maynard
696ca48bd1 Make sure CUDA is built with c++11 support enabled. 2016-08-29 16:19:44 -04:00
Robert Maynard
c4dd3cffd5 Merge topic 'remove_CheckCXX11Features'
c34fab4f Remove CheckCXX11 Feature since we now require C++11.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !524
2016-08-26 15:49:37 -04:00
Kenneth Moreland
4fd9ba7e11 Make glfw auto-terminate during testing
The UnitTestMapperGLFW test was coded to run in an interactive mode,
which was problematic when simply running the test. If no one was there
to exit the interactive window, the test would time out. This change
adds a "batch" mode that is on when run by ctest. The batch mode runs
through all configurations and exits.
2016-08-26 08:28:35 -06:00
Robert Maynard
c34fab4f84 Remove CheckCXX11 Feature since we now require C++11. 2016-08-26 10:23:15 -04:00
Kenneth Moreland
7f8ea09f88 Fix configuration of dependent rendering libraries
The VTKmConfigureComponents.cmake file has lots of careful configuration
of many of VTK-m components and dependent libraries (like OpenGL,
OSMesa, etc.) that takes care of several corner cases. The configuration
is consolidated here so that it can be consistent across the many
directories in VTK-m as well as other projects that use VTK-m.

Recent changes to the configuration in rendering circumvented these and
directly tried to configure dependent rendering libraries. This is wrong
(and more importantly broke my OSX build).
2016-08-25 14:44:30 -06:00
Dave Pugmire
6f30b786f5 Add GLFW unit test.
Simplify the test code with a class templated on mapper, canvas and view.
2016-08-24 16:22:48 -04:00
Kenneth Moreland
866c617cbf Fix config issues with headers and libraries
There were a couple of places where the configure scripts did not add
either includes to VTKm_INCLUDE_DIRS or libraries to VTKm_LIBRARIES.

The biggest offender was when the examples used find_package to load the
VTK-m configuration it needed. find_package cleared out the includes and
libraries, but it did not clear out the VTKm_<COMPONENT>_FOUND
variables. Normally, these variables would not be set before
find_package is called, but in this case the examples were called after
some partial configuration. I got around this issue by clearing out all
the *_FOUND variables in VTKmConfig.cmake.
2016-08-23 14:07:38 -06:00
Mark Kim
9475a8e551 Need to add GLFW to OpenGL interp macro to have the location of the glfw3.h
in the include path.
2016-08-12 18:29:59 -06:00
Mark Kim
7bb3e89e87 Split EGL and OSMesa into separate directories. libGL and libOSMesa do not play well together. 2016-08-08 21:57:38 -04:00
Robert Maynard
720dc149d1 properly link vtkm::interop to pthread. 2016-08-08 11:14:25 -04:00
Robert Maynard
3596120b46 Merge topic 'reduce_number_of_cuda_checks'
8a441d30 Don't run nvcc native detection multiple times, as the results are cached.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !498
2016-08-08 08:19:58 -04:00
Robert Maynard
0f545c53e3 Merge topic 'now_can_build_with_cxx11'
a6609311 Silence auto_ptr deprecation warnings with older boosts ( < 1.61 )
6d38f44d Update ListTag and DispatcherBase to leverage C++11 features.
ea0d84a8 Remove VTK-m Variadic defines and replace them with a single CXX11 define
77121d18 Add support to VTK-m to build with C++11

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !475
2016-08-05 16:03:35 -04:00
Robert Maynard
8a441d3051 Don't run nvcc native detection multiple times, as the results are cached.
This fixes a issue where when CUDA is enabled and VTKm_CUDA_Architecture is
set to native, we would run nvcc each time somebody explicitly enabled the
CUDA component ( each example ).
2016-08-05 15:41:55 -04:00
Sujin Philip
746d6fc7b2 Fix configuration of vectorization
1. Re-enable vectorization setup in cmake
2. Set vectorization flags to empty when "none" is specified.
2016-08-03 16:07:21 -04:00
Robert Maynard
77121d1871 Add support to VTK-m to build with C++11 2016-08-03 15:38:38 -04:00
T.J. Corona
4f49a8407b Update VTKmCheckCopyright.cmake to ignore build files. 2016-08-02 13:50:33 -04:00
Robert Maynard
e52f7628a7 VTKm config module now properly support the QUIET flag.
The QUIET flag will also be properly propagated to all modules
that VTKm finds.
2016-07-28 10:46:59 -04:00
Robert Maynard
4ca6ce2ad6 nvcc doesn't have troubles with boost shared_ptr optimizations 2016-07-19 13:26:23 -04:00
Dave Pugmire
be643811d6 Add GLFW unittest. 2016-06-30 15:12:53 -04:00
Kenneth Moreland
d10f40dbaa Add extra documentation to VTKmConfig.cmake
Add a note about the VTKm_COMPILE_OPTIONS. Also make an easy to read
list of available components.
2016-06-29 13:19:42 -06:00
Kenneth Moreland
c5e849981f Re-disable warnings on CUDA builds for MSVC
In an earlier commit, we took out the "-w" flag for CUDA builds, which
disables all compiler warnings. The original reason for disabling
warnings was an errant warning about unused functions. It was taken out
because the visual studio compiler complains when this flag overrides
another warning flag (such as /W3).

Although the visual studio compiler was not complaining about unused
functions, we were getting lots of other warnings. These warnings did
not seem to actually come from the visual studio compiler. They probably
come from whatever CUDA uses for a device compiler. But it is unclear
how to specifically target these warnings.

So, the easiest solution is to add the "-w" flag back. To get around the
other warning, we now (hopefully temporarily) remove warning flags from
CMAKE_CXX_FLAGS to prevent the conflicting flags.
2016-06-28 17:26:09 -06:00
Kenneth Moreland
ca0bafa479 Fix issue with native CUDA hardware detection
To detect what CUDA hardware is native, a simple CUDA program is
compiled. However, CMake was not necessarily pointing to the correct
source file, so the compile was failing.

This change makes sure that VTKm_CMAKE_MODULE_PATH is properly set and
uses that variable to find the source file.
2016-06-27 07:50:10 -06:00
Kenneth Moreland
eb41c6d5bd Disable -w flag for CUDA on Visual Studio
Because the CUDA builds were experiencing some warnings about unused
functions, a -w flag was added to our nvcc flags. This effectively
turned off the warning (which was part of -Wall). But on Visual Studio
this added flag was causing a warning of its own because it overwrote
the /W3 flag. So turn this off for Visual Studio.

I don't think Visual Studio gives this warning anyway. If it does, we
can add a specific flat to suppress that warning.
2016-06-27 07:50:08 -06:00
Kenneth Moreland
8186600aa4 Fix issue with pdb files with nvcc on windows
When doing parallel builds with CUDA's nvcc on windows, you often get
errors about multiple programs trying to write to a pdb file at once. To
get around this, add the /FS flag on windows for the CUDA compiler.
2016-06-27 07:50:06 -06:00
Robert Maynard
b0d3591933 VTKMConfig.cmake now properly sets VTKm_PACKAGE_IN_BUILD 2016-06-23 14:28:50 -04:00
Kenneth Moreland
7ff20c9230 Fix includes for CUDA builds
The CMake CUDA build targets do not respect the
target_include_directories (yet?). Instead, add the necessary includes
to cuda_include_directories().
2016-06-22 12:53:23 -06:00
Kenneth Moreland
83103967f2 Clean up checks for TBB and CUDA components 2016-06-21 18:03:31 -06:00
Kenneth Moreland
13ee8bc190 Fix several issues with making sure all includes are set
Make everything consistent with new builds.
2016-06-21 18:03:29 -06:00
Kenneth Moreland
afcca27cbf Make FindThrust.cmake work when thrust not found
Before it was trying to load the thrust header file even when the thrust
header file was not found.
2016-06-21 18:03:27 -06:00
Kenneth Moreland
1d0eac6301 Update some configuration to new components 2016-06-21 18:03:25 -06:00
Kenneth Moreland
a8384d6b7a Unify configuration for VTK-m build and packages
Have VTK-m eat its own dog food when it comes to its configuration. Load
the same configuration for building VTK-m as would be loaded (more or
less) when using find_package(VTKm) in an external project.

This includes adding lots more components to the packages so that all the
setup (e.g. OpenGL, TBB, etc.) can be set up correctly. It is also a
significant change to how these components are declared. The component
configuration is simplified a bit and unified in a single file.
2016-06-21 18:03:23 -06:00
Kenneth Moreland
5d67b918dc Use CMakePackageConfigHelpers to make config files
This is a little tricky since they don't seem to have considered that
you will have files in both the source and build directory or that the
file locations will not match exactly with the install locations.
2016-06-21 18:03:21 -06:00
Kenneth Moreland
c3ac545d91 Use CMakePackageConfigHelpers to create VTKmConfigVersion.cmake
This should help us be forward compatible with CMake.
2016-06-21 18:03:19 -06:00
Robert Maynard
8871fe0b0e Add a copyright statement to the FindEGL.cmake 2016-06-17 08:14:37 -04:00
Kenneth Moreland
952929a7d0 Merge branch 'msvc-rendering' into 'master'
Fix several issues concerning using rendering library with Visual Studio

Write a comment or drag your files here...

See merge request !457
2016-06-16 19:40:50 -04:00
Dave Pugmire
6725e7ce5c Forgot the copyright statement. 2016-06-16 14:43:55 -04:00
Kenneth Moreland
0581a83aa2 Directly call python when executing expander.py
On Unix-based systems, you can directly execute a script and the system
will automatically run it through its associated interpreter. However,
on Windows this does not work. You just get an error about the script,
which is just a text file, being an invalid executable.

This was an issue when running pyexpander. Now, Python is called
directly for pyexpander.
2016-06-16 10:36:20 -06:00
Dave Pugmire
af1daf2f66 Add support for offscreen rendering with EGL. Added new class CanvasEGL, and a test. 2016-06-15 09:48:45 -04:00
Robert Maynard
8a9fa5d2cd Remove debug message from UseVTKmCUDA.cmake 2016-06-10 13:33:07 -04:00
Robert Maynard
a0af013c22 Auto-detection of cuda version requires usage of a working directory.
Without a working directory specified, the executable will be output
to what-ever working directory cmake-gui was launched from. In most cases when
CMake is the 'system' version, this is a directory that you don't have write
access to.
2016-06-03 13:10:44 -04:00
Kenneth Moreland
7f005562ac Make all benchmarking sources listed in build
The benchmarking header files were not listed. Not a huge deal since
these files do not need to be installed, but they should be listed
anyway. Changed the vtkm_save_benchmarks CMake macro to be able to list
headers.

Also moved everything from BenchmarkDeviceAdapter.h to
BenchmarkDeviceAdapter.cxx. Since this code shouldn't need to be
included by anything except this benchmark, there is no need to have it
in a header file. Plus, the build changes would mean that any change in
the header (where most of the source was) could cause all code in this
directory to recompile. I do not want to set that precedent.
2016-06-02 10:24:21 -06:00
Kenneth Moreland
4ae3a20dfc Add test to check that all source files are part of the build system
The test is a simple CMake script that finds all files in the build
directory with certain extensions (.h, .cxx, etc.) and makes sure that
the filename is listed somewhere in the CMakeLists.txt file of the same
directory. If the filename is listed in the CMakeLists.txt file, then
there is a good chance it is being addressed by the build.

This should help catch when header files are not being installed. It also
should help verify that test builds are being done on all files. It will
also highlight dead source files.
2016-06-02 10:23:37 -06:00
Robert Maynard
90d3ad0efa Merge topic 'resolve_dejagore_maxwell_issues'
780cef61 Bump up the CUDA timeout as some of our Maxwell machines are timing out.
e5c3f9c4 Solve reduce by key bugs with cuda 7.5 + maxwell hardware.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !411
2016-05-12 16:33:06 -04:00
Robert Maynard
780cef619c Bump up the CUDA timeout as some of our Maxwell machines are timing out. 2016-05-12 15:46:42 -04:00
Robert Maynard
49ede2a547 Remove unneeded debugging message from VTKmMacros. 2016-05-12 10:12:30 -04:00
Kenneth Moreland
82949e79cc List template sources in IDE
I like to have all the source files used in VTK-m to be explicitly
declared as source files in CMake so that when CMake builds a project file
for an IDE, all the source files are shown and monitored by the IDE. This
makes working with the files much easier.
2016-05-05 13:00:12 -06:00
Robert Maynard
19a941cc6e It is now easier to use the device adapter benchmark code.
For example to now benchmark only the sortbykey algorithm

  ./bin/BenchmarkDeviceAdapter_TBB sortbykey
2016-05-03 15:53:09 -04:00
Robert Maynard
76b6179abf Add missing copyright headers. 2016-03-28 11:16:35 -04:00
Dave Pugmire
f84401243a Initial checkin for rendering infrastructure.
This largely follows things from EAVL. This is going to change going forward.
Most of the stuff is inside Window.h right now for convenience.
2016-03-28 08:51:35 -04:00
Robert Maynard
c12955b758 Merge topic 'less_aggressive_optimization_setting'
3eec5e86 ICC: disable vectorization as both ivdep and simd generate bad code.
f021e4a5 Make the default for vectorization be none.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !368
2016-03-23 16:57:51 -04:00
Robert Maynard
f021e4a575 Make the default for vectorization be none.
A default of 'native' has the concern that people using vtk-m might by
default generate non portable binaries or libraries and will become
very hard to track down why this happens. So do enable vectorization we
default to 'none'.
2016-03-23 14:09:59 -04:00
Robert Maynard
1284854798 Make UnitTest targets have a shorter name. 2016-03-21 16:18:06 -04:00
T.J. Corona
d281051996 Fix the installation of template source files. 2016-03-18 06:24:43 -04:00
Robert Maynard
8818cfc600 Disable vectorization when building with ICC 14.0
We have found that ICC 14.0 produces bad simd code that causes
vtkm worklets to throw SIGBUS signals. This issue was resolved in
ICC 15.0
2016-03-16 13:27:04 -04:00