diff options
-rw-r--r-- | Help/manual/cmake-variables.7.rst | 1 | ||||
-rw-r--r-- | Help/release/dev/cuda-CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS.rst | 6 | ||||
-rw-r--r-- | Help/variable/CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS.rst | 6 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 1 | ||||
-rw-r--r-- | Tests/CudaOnly/DontResolveDeviceSymbols/CMakeLists.txt | 2 |
5 files changed, 15 insertions, 1 deletions
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 432d7fc..4e5140e 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -353,6 +353,7 @@ Variables that Control the Build /variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG /variable/CMAKE_CONFIG_POSTFIX /variable/CMAKE_CUDA_SEPARABLE_COMPILATION + /variable/CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS /variable/CMAKE_DEBUG_POSTFIX /variable/CMAKE_ENABLE_EXPORTS /variable/CMAKE_EXE_LINKER_FLAGS diff --git a/Help/release/dev/cuda-CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS.rst b/Help/release/dev/cuda-CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS.rst new file mode 100644 index 0000000..f21fddf --- /dev/null +++ b/Help/release/dev/cuda-CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS.rst @@ -0,0 +1,6 @@ +cuda-CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS +-------------------------------------- + +* Variable :variable:`CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS` has been + introduced to optionally initialize the + :prop_tgt:`CUDA_RESOLVE_DEVICE_SYMBOLS` target property. diff --git a/Help/variable/CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS.rst b/Help/variable/CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS.rst new file mode 100644 index 0000000..fc835cd --- /dev/null +++ b/Help/variable/CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS.rst @@ -0,0 +1,6 @@ +CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS +--------------------------------- + +Default value for :prop_tgt:`CUDA_RESOLVE_DEVICE_SYMBOLS` target +property. This variable is used to initialize the property on each target as +it is created. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 7ca2391..bf2419a 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -343,6 +343,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, initProp("CUDA_EXTENSIONS"); initProp("CUDA_COMPILER_LAUNCHER"); initProp("CUDA_SEPARABLE_COMPILATION"); + initProp("CUDA_RESOLVE_DEVICE_SYMBOLS"); initProp("LINK_SEARCH_START_STATIC"); initProp("LINK_SEARCH_END_STATIC"); initProp("FOLDER"); diff --git a/Tests/CudaOnly/DontResolveDeviceSymbols/CMakeLists.txt b/Tests/CudaOnly/DontResolveDeviceSymbols/CMakeLists.txt index 6190089..6e3697f 100644 --- a/Tests/CudaOnly/DontResolveDeviceSymbols/CMakeLists.txt +++ b/Tests/CudaOnly/DontResolveDeviceSymbols/CMakeLists.txt @@ -27,12 +27,12 @@ endif() string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=[compute_30] -gencode arch=compute_50,code=\\\"compute_50\\\"") set(CMAKE_CXX_STANDARD 11) set(CMAKE_CUDA_STANDARD 11) +set(CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS OFF) add_library(CUDANoDeviceResolve SHARED file1.cu) set_target_properties(CUDANoDeviceResolve PROPERTIES CUDA_SEPARABLE_COMPILATION ON - CUDA_RESOLVE_DEVICE_SYMBOLS OFF POSITION_INDEPENDENT_CODE ON) if(MSVC) target_link_options(CUDANoDeviceResolve PRIVATE "/FORCE:UNRESOLVED") |