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.
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.
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.
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.
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.
Like the ability to specify the vectorization level, users of CMake can
now specify what GPU architectures they want to build for. Most users
should just use the default 'native'.
4ceb111a Enable vectorization inside the Serial and TBB backends.
514ea09a Teach VTK-m how to enable vectorization for gcc, clang, and icc.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !275
* Support a REQUIRED flag that only gives an error if that flag is given.
* Move common configuration required for all devices (such as boost) to a
special device named Base.
* Make CUDA always capitalized to be consistent with the other CMake
variables.
* Rather than call include_directories, set a variable named
VTKm_INCLUDE_DIRS. This is consistent with how most CMake packages work.
* Make a CMake variable named VTKm_LIBRARIES containing all the
libraries the configured devices need.
* Automatically configure supported devices when loading the VTK-m
package in CMake.
The CMake flag and define differ in their capitalization of the 'm' in
VTKm so I've made CMake variables that match those used in Configure.h.in,
thereby keeping the original naming of VTKm in CMake code, and VTKM in the
C++ code.
This fix also revealed some areas in CellSet and CellSetExplicit where ints
where used instead of vtkm::Ids which caused errors with child classes who
override the methods and returned a vtkm::Id instead of an int.
Also fixed issues that appeared in TestOutOfMemory which got out of date due
to not being compiled since the `VTKM_USE_64BIT_IDS` flag would never be set.
The test now runs and passes when 64bit ids are enabled.