Commit 8baacca5 authored by Allison Vacanti's avatar Allison Vacanti

Link vtkm_developer_flags directly into vtkm libraries.

This should properly propogate the flags to superprojects.
parent 1766f213
......@@ -49,19 +49,14 @@ endif()
add_library(vtkm_compiler_flags INTERFACE)
# When building libraries/tests that are part of the VTK-m repository
# inherit the properties from vtkm_developer_flags and vtkm_vectorization_flags.
# inherit the properties from vtkm_vectorization_flags.
# The flags are intended only for VTK-m itself and are not needed by consumers.
# We will export vtkm_developer_flags, and vtkm_vectorization_flags in general
# We will export vtkm_vectorization_flags in general
# so consumer can either enable vectorization or use VTK-m's build flags if
# they so desire
if (VTKm_ENABLE_DEVELOPER_FLAGS)
target_link_libraries(vtkm_compiler_flags
INTERFACE $<BUILD_INTERFACE:vtkm_developer_flags>)
endif()
target_link_libraries(vtkm_compiler_flags
INTERFACE $<BUILD_INTERFACE:vtkm_vectorization_flags>)
# setup that we need C++11 support
if(CMAKE_VERSION VERSION_LESS 3.8)
target_compile_features(vtkm_compiler_flags INTERFACE cxx_nullptr)
......
......@@ -146,7 +146,12 @@ int ${headername}_${headerextension}_testbuild_symbol;"
set_property(TARGET TestBuild_${name} PROPERTY ARCHIVE_OUTPUT_DIRECTORY ${VTKm_LIBRARY_OUTPUT_PATH}/testbuilds)
set_property(TARGET TestBuild_${name} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${VTKm_LIBRARY_OUTPUT_PATH}/testbuilds)
target_link_libraries(TestBuild_${name} PRIVATE vtkm_compiler_flags vtkm_taotuple)
target_link_libraries(TestBuild_${name}
PRIVATE
$<BUILD_INTERFACE:vtkm_developer_flags>
vtkm_compiler_flags
vtkm_taotuple
)
if(TARGET vtkm::tbb)
#make sure that we have the tbb include paths when tbb is enabled.
......@@ -325,6 +330,17 @@ function(vtkm_library)
EXCLUDE_FROM_TESTING ${VTKm_LIB_TEMPLATE_SOURCES}
)
# When building libraries/tests that are part of the VTK-m repository inherit
# the properties from vtkm_developer_flags. The flags are intended only for
# VTK-m itself and are not needed by consumers. We will export
# vtkm_developer_flags so consumer can use VTK-m's build flags if they so
# desire
if (VTKm_ENABLE_DEVELOPER_FLAGS)
target_link_libraries(${lib_name} PUBLIC $<BUILD_INTERFACE:vtkm_developer_flags>)
else()
target_link_libraries(${lib_name} PRIVATE $<BUILD_INTERFACE:vtkm_developer_flags>)
endif()
#install the library itself
install(TARGETS ${lib_name}
EXPORT ${VTKm_EXPORT_NAME}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment