Commit Graph

114 Commits

Author SHA1 Message Date
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
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
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
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