Add extra documentation to VTKmConfig.cmake
Add a note about the VTKm_COMPILE_OPTIONS. Also make an easy to read
list of available components.
See merge request !468
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.
See merge request !467
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.
I don't know why, but under some circumstances when compiling with CUDA
and Visual Studio, the compiler was giving syntax errors when the
IteratorFromArrayPortal was using the typename keyword to reference a
type in its superclass. Get around the problem by looking directly in
the superclass.
The VTKM_ASSUME macro uses some of the definitions defined in
Configure.h, but it never included that file. So unless that file
happened to be included before Assume.h, VTKM_ASSUME could be declared
incorrectly.
Actually added the include to Assert.h, which Assume.h includes.
The VTKM_SUPPRESS_EXEC_WARNINGS should go before the template keyword,
but on a couple of methods in FunctionInterfaceDetailPre.h.in it was
after the template keyword.
Add pragmas to disable warnings 4244 and 4800 on Visual Studio when
compiling third party libraries. This gets around some warnings inside
the thrust library.
The build automatically sets some macros when building CUDA files. Some
of the CUDA sources were setting the same macros, which was causing
warnings. Change the code to be more careful about setting preprocessor
macros.
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.
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.
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.
Make sure tests for many devices are using requested devices
There are several tests in the cont directory that are in header files so
that they can be recompiled for different devices. Make sure that the
tests are exclusively using the device being tested by making the error
device adapter the default.
If any part of the test tries to use the default device (which could be
different than the one being tested), a compile error will occur. Several
of these compile errors are fixed in this commit.
See merge request !463
16f3f8ca VTKm_LOAD_COMPONENTS_COMMANDS now works with CMake version older than 3.3
b0d35919 VTKMConfig.cmake now properly sets VTKm_PACKAGE_IN_BUILD
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !462
There are several tests in the cont directory that are in header files so
that they can be recompiled for different devices. Make sure that the
tests are exclusively using the device being tested by making the error
device adapter the default.
If any part of the test tries to use the default device (which could be
different than the one being tested), a compile error will occur. Several
of these compile errors are fixed in this commit.
Update the CMake package
These commits update how the CMake configuration sets up the
find_package information (accessed in VTKmConfig.cmake). It
establishes a bunch of components that can be used in the
find_package command to load various aspects like CUDA and
TBB.
See merge request !460
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.