Make sure we don't duplicate commands to NVCC.

When you called find_package multiple times with VTK-m components such as CUDA
would continuously append to variables, causing a variable to have the same
parameter listed multiple times.
This commit is contained in:
Robert Maynard 2016-09-20 14:42:45 -04:00
parent fa3c2b8986
commit 43651c55bc

@ -266,8 +266,9 @@ macro(vtkm_configure_component_CUDA)
#---------------------------------------------------------------------------
# Setup build flags for CUDA to have C++11 support
#---------------------------------------------------------------------------
if(NOT MSVC)
if(NOT MSVC AND NOT VTKM_CUDA_CXX11_FLAGS_ADDED)
list(APPEND CUDA_NVCC_FLAGS --std c++11)
set(VTKM_CUDA_CXX11_FLAGS_ADDED TRUE CACHE INTERNAL "cuda C++11 flags added")
endif()
#---------------------------------------------------------------------------