Commit 7099d113 authored by Kyle Edwards's avatar Kyle Edwards Committed by Kitware Robot

Merge topic 'support_CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS'

8f1d22c2 CUDA: Support CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS global variable
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !3636
parents dabd1692 8f1d22c2
Pipeline #143696 passed with stage
in 0 seconds
......@@ -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
......
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.
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.
......@@ -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");
......
......@@ -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")
......
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