summaryrefslogtreecommitdiff
path: root/Modules/Platform
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2022-11-16 13:08:31 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2022-11-16 13:08:31 +0100
commitd538cb0e1890f15e2ea4b3433f4cc0d46f57e62f (patch)
treebad36e01c34153610812a00f92678417bc1061d2 /Modules/Platform
parentb7ab39bf59c1b68140f1884676a2cfdaee2f7b41 (diff)
downloadcmake-d538cb0e1890f15e2ea4b3433f4cc0d46f57e62f.tar.gz
Only initialize CMAKE_CXX_COMPILER_PREDEFINES_COMMAND
Don't initialize the other CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND variables. The only language variant that is used is CMAKE_CXX_COMPILER_PREDEFINES_COMMAND, and the other language variants contained invalid, namely C++-specific commands. Fixes: #23968
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Android-Clang.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/Platform/Android-Clang.cmake b/Modules/Platform/Android-Clang.cmake
index 3a279cadcb..aaaae9b21f 100644
--- a/Modules/Platform/Android-Clang.cmake
+++ b/Modules/Platform/Android-Clang.cmake
@@ -77,7 +77,9 @@ macro(__android_compiler_clang lang)
if(CMAKE_ANDROID_NDK_TOOLCHAIN_UNIFIED)
string(APPEND CMAKE_${lang}_COMPILER_TARGET "${CMAKE_SYSTEM_VERSION}")
endif()
- list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "--target=${CMAKE_${lang}_COMPILER_TARGET}")
+ if("${lang}" STREQUAL "CXX")
+ list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "--target=${CMAKE_${lang}_COMPILER_TARGET}")
+ endif()
endif()
if(CMAKE_GENERATOR MATCHES "Visual Studio")
set(_ANDROID_STL_NOSTDLIBXX 1)