diff options
author | Brad King <brad.king@kitware.com> | 2020-07-21 13:50:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-07-23 12:56:50 (GMT) |
commit | 2f44a6a4990497c45eb882e625b2204a372ffaf0 (patch) | |
tree | 65552e6497314b5a61190804e29bb410733c7877 /Source/cmTarget.cxx | |
parent | 159a4d6b11f0feb0be7cfa692ee4738acddfef8d (diff) | |
download | CMake-2f44a6a4990497c45eb882e625b2204a372ffaf0.zip CMake-2f44a6a4990497c45eb882e625b2204a372ffaf0.tar.gz CMake-2f44a6a4990497c45eb882e625b2204a372ffaf0.tar.bz2 |
cmTarget: De-duplicate conditions for property initialization
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index aec9afa..0f0e35b 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -343,10 +343,12 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, initProp("C_STANDARD"); initProp("C_STANDARD_REQUIRED"); initProp("C_EXTENSIONS"); + initProp("C_VISIBILITY_PRESET"); initProp("OBJC_COMPILER_LAUNCHER"); initProp("OBJC_STANDARD"); initProp("OBJC_STANDARD_REQUIRED"); initProp("OBJC_EXTENSIONS"); + initProp("OBJC_VISIBILITY_PRESET"); initProp("CXX_CLANG_TIDY"); initProp("CXX_COMPILER_LAUNCHER"); initProp("CXX_CPPLINT"); @@ -355,10 +357,12 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, initProp("CXX_STANDARD"); initProp("CXX_STANDARD_REQUIRED"); initProp("CXX_EXTENSIONS"); + initProp("CXX_VISIBILITY_PRESET"); initProp("OBJCXX_COMPILER_LAUNCHER"); initProp("OBJCXX_STANDARD"); initProp("OBJCXX_STANDARD_REQUIRED"); initProp("OBJCXX_EXTENSIONS"); + initProp("OBJCXX_VISIBILITY_PRESET"); initProp("CUDA_STANDARD"); initProp("CUDA_STANDARD_REQUIRED"); initProp("CUDA_EXTENSIONS"); @@ -367,6 +371,11 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, initProp("CUDA_RESOLVE_DEVICE_SYMBOLS"); initProp("CUDA_RUNTIME_LIBRARY"); initProp("CUDA_ARCHITECTURES"); + initProp("CUDA_VISIBILITY_PRESET"); + initProp("VISIBILITY_INLINES_HIDDEN"); + initProp("JOB_POOL_COMPILE"); + initProp("JOB_POOL_LINK"); + initProp("JOB_POOL_PRECOMPILE_HEADER"); initProp("LINK_SEARCH_START_STATIC"); initProp("LINK_SEARCH_END_STATIC"); initProp("Swift_LANGUAGE_VERSION"); @@ -487,16 +496,6 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, impl->Makefile->GetLinkDirectoriesBacktraces()); } - if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && - this->GetType() != cmStateEnums::UTILITY) { - initProp("C_VISIBILITY_PRESET"); - initProp("CXX_VISIBILITY_PRESET"); - initProp("OBJC_VISIBILITY_PRESET"); - initProp("OBJCXX_VISIBILITY_PRESET"); - initProp("CUDA_VISIBILITY_PRESET"); - initProp("VISIBILITY_INLINES_HIDDEN"); - } - if (impl->TargetType == cmStateEnums::EXECUTABLE) { initProp("ANDROID_GUI"); initProp("CROSSCOMPILING_EMULATOR"); @@ -528,13 +527,6 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, impl->PolicyMap.Set(cmPolicies::CMP0022, cmPolicies::NEW); } - if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && - this->GetType() != cmStateEnums::UTILITY) { - initProp("JOB_POOL_COMPILE"); - initProp("JOB_POOL_LINK"); - initProp("JOB_POOL_PRECOMPILE_HEADER"); - } - if (impl->TargetType <= cmStateEnums::GLOBAL_TARGET) { initProp("DOTNET_TARGET_FRAMEWORK"); initProp("DOTNET_TARGET_FRAMEWORK_VERSION"); |