Commit Graph

72 Commits

Author SHA1 Message Date
Kenneth Moreland
640e92c750 Add VTKm_ENABLE_OSMESA option 2016-09-09 14:50:31 -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
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
Robert Maynard
1379502179 Merge topic 'vtkm_configure_component_CUDA_typo'
45f2ee19 Correct typo in error message of vtkm_configure_component_CUDA

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !533
2016-09-01 09:28:33 -04:00
Robert Maynard
45f2ee1907 Correct typo in error message of vtkm_configure_component_CUDA 2016-09-01 08:55:12 -04:00
Kenneth Moreland
e4ca73fc05 Honor CMake policy CMP0058
CMake policy CMP0058, introduced in CMake 3.3, requires that all
intermediate files created during the build process will be declared as
an output or byproduct of a target. See "cmake --help-policy CMP0058"
for details.

Per this policy, CMake was giving a warning about some files generated
during configuration (e.g. with configure_file) because they were files
in the build directory with no apparent target command. This is not an
issue since the configure will ensure that the file is always there
before the build starts. Thus, we declare that we will adhere to the new
policy to avoid the warning.
2016-08-29 13:42:55 -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
ab528b8ec9 Configure examples after writing VTKmConfig.cmake
The examples configuration now behave like external projects and use
find_package to configure themselves. As such that file should be built
before we try to configure the examples.
2016-08-23 16:04:58 -06: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
Robert Maynard
77121d1871 Add support to VTK-m to build with C++11 2016-08-03 15:38:38 -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
037ebc4a9a Install the VTKmConfig.cmake file. 2016-07-25 10:31:08 -04:00
Kenneth Moreland
f90b42ac84 Add status messages when using find_package(VTKm)
When finding the VTKm package, it is important to load components that
support the devices you want to use. However, there is no indication of
what does and does not get loaded. In some circumstances, it simply says
that VTKm_FOUND is not true but not why. Add some status messages of
whether each component gets loaded or not.
2016-06-30 15:25:26 -06: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
404a007eec Fix typo that was causing a CMake warning
There was missing whitespace when setting a variable.
2016-06-27 08:30:03 -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
Robert Maynard
16f3f8ca9f VTKm_LOAD_COMPONENTS_COMMANDS now works with CMake version older than 3.3 2016-06-23 15:11:43 -04: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
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
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
Dave Pugmire
a8c7f92d58 Move mesa package to right place.
Also, add in code for rectlinear mesh.
2016-03-28 08:51:36 -04:00
Dave Pugmire
294b73e00e Make the rendering part of the build optional.
Add the mesa libs to the link line.
2016-03-28 08:51:36 -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
Chuck Atkins
635f8c7987 Add a CTestCustom file to to filter out warnings that cant be eliminated 2016-03-17 13:14:30 -04:00
Robert Maynard
bb90493920 Resolves Issue 52, we now install all vtkm files correctly. 2016-02-22 14:20:35 -05:00
Robert Maynard
ee368d0d68 Do not add c++ compiler optimizations to all compilers, but on a target basis.
As reported in Issue #54 the add_compile_options pollutes the global compile
flags. Instead we provided cmake flags for people to use.
2016-01-25 14:38:06 -05:00
Robert Maynard
204804af50 Teach VTK-m how to specify the CUDA GPU architecture to build for.
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'.
2015-12-09 13:17:00 -05:00
Robert Maynard
bfb6c26a98 Simplify the design of vectorization support.
Remove the configured file variables, as that causes problems
when using an installed version of VTK-m.
2015-12-01 11:37:41 -05:00
Robert Maynard
4ea567aee9 Remove VTKm_ENABLE_VECTORIZATION, as VTKm_Vectorization handles all use cases. 2015-11-30 11:08:21 -05:00
Robert Maynard
c06c54b1fb Merge topic 'enable_vectorization'
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
2015-11-27 09:36:15 -05:00
Robert Maynard
514ea09afc Teach VTK-m how to enable vectorization for gcc, clang, and icc. 2015-11-23 12:44:05 -05:00
T.J. Corona
8dca9f5f6a Fix case in reference to UseVTKmCUDA.cmake. 2015-11-20 13:06:14 -05:00
Kenneth Moreland
c0f49d6112 Update vtkm_configure_device macro
* 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.
2015-11-12 14:26:00 -07:00
Robert Maynard
3572a99950 More CMake policies that we need to set. 2015-10-22 12:21:34 -04:00
Robert Maynard
7a356b2cdb By default do not export all symbols in vtk-m.
This is done to help manage the size of our libraries and executables.
2015-10-21 10:28:49 -04:00
Robert Maynard
e24bdfb62a Bump the minimum cmake version to 2.8.11
Numerous examples requires CMake 2.8.11, so lets bump the version for
the whole project up to 2.8.11
2015-10-21 10:26:42 -04:00
Robert Maynard
05ea81d353 Teach vtk-m CMake about new policies from CMake 3.X.X 2015-10-21 10:16:32 -04:00
Robert Maynard
cf32b430dc Teach Configure.h to store if TBB and CUDA are enabled. 2015-09-17 09:28:21 -04:00
Robert Maynard
4cf9ab018a On Linux when using GLEW also link to the Threading library.
This is needed because some implementations GLEW do lazy linking to
PThreads.
2015-09-04 14:38:37 -04:00
Robert Maynard
23b435d031 Update VTK-m to export to Configure.h if we have opengl interop enabled.
At the same time I rearranged the CMakeLists.txt so that the configuration
for Configure.h is later so that it catches all CMake Variables.
2015-09-04 11:43:10 -04:00
Christopher Meyer Sewell - 188584
30100e2ae8 Adding examples directory with isosurface rendering example 2015-09-01 17:09:36 -06:00
hschroot
d943348060 CMake configuration definitions to enable OpenGL Interop
Copy all OpenGL interop related configurations from the DAX CMake files
2015-08-21 11:17:10 -07:00
Robert Maynard
44412787e5 Update VTK-m to error out nicely when Boost isn't found.
Previously VTK-m would error out on failing to find/setup backends, instead
of clearly stating the issue was finding Boost.
2015-08-17 10:07:17 -04:00