diff options
author | Brad King <brad.king@kitware.com> | 2020-01-28 15:56:34 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-01-28 15:56:41 (GMT) |
commit | 571205fb6b661e33937637133157445fbbe3f510 (patch) | |
tree | 6ce45fb1d4cc2711e9f1e2a1cb577d4c9093138f /Modules | |
parent | 1f9321c68399c8cc37a2cb9c78ef45949412bd7b (diff) | |
parent | 32a6ab1f3b23b816881d02cca29afcec280408d4 (diff) | |
download | CMake-571205fb6b661e33937637133157445fbbe3f510.zip CMake-571205fb6b661e33937637133157445fbbe3f510.tar.gz CMake-571205fb6b661e33937637133157445fbbe3f510.tar.bz2 |
Merge topic 'QNX_CMAKE_SYSROOT'
32a6ab1f3b QNX: Add support for CMAKE_SYSROOT
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4277
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineCompilerABI.cmake | 12 | ||||
-rw-r--r-- | Modules/Compiler/QCC.cmake | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake index c5611b5..99447e4 100644 --- a/Modules/CMakeDetermineCompilerABI.cmake +++ b/Modules/CMakeDetermineCompilerABI.cmake @@ -161,6 +161,18 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src) break() endif() endforeach() + elseif(CMAKE_CXX_COMPILER_ID STREQUAL QCC) + foreach(dir ${implicit_dirs}) + if (dir MATCHES "/lib$") + get_filename_component(assumedArchDir "${dir}" DIRECTORY) + get_filename_component(archParentDir "${assumedArchDir}" DIRECTORY) + if (archParentDir STREQUAL CMAKE_SYSROOT) + get_filename_component(archDirName "${assumedArchDir}" NAME) + set(CMAKE_${lang}_LIBRARY_ARCHITECTURE "${archDirName}" PARENT_SCOPE) + break() + endif() + endif() + endforeach() endif() else() diff --git a/Modules/Compiler/QCC.cmake b/Modules/Compiler/QCC.cmake index 9df8269..10e1389 100644 --- a/Modules/Compiler/QCC.cmake +++ b/Modules/Compiler/QCC.cmake @@ -10,6 +10,9 @@ macro(__compiler_qcc lang) # http://www.qnx.com/developers/docs/6.4.0/neutrino/utilities/q/qcc.html#examples set(CMAKE_${lang}_COMPILE_OPTIONS_TARGET "-V") + set(CMAKE_PREFIX_LIBRARY_ARCHITECTURE "ON") + + set(CMAKE_${lang}_COMPILE_OPTIONS_SYSROOT "-Wc,-isysroot,") set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-Wp,-isystem,") set(CMAKE_DEPFILE_FLAGS_${lang} "-Wp,-MD,<DEPFILE> -Wp,-MT,<OBJECT> -Wp,-MF,<DEPFILE>") |