summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/QCC.cmake
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@here.com>2018-07-11 13:45:40 (GMT)
committerBrad King <brad.king@kitware.com>2018-07-11 13:54:49 (GMT)
commite014df762b41e61b423e56637667a050be3a78e7 (patch)
treefc209fcdd6fd3c63825e1f345783ab0b49eacfcf /Modules/Compiler/QCC.cmake
parent7f1569d2d8c1a647cf4d1b0696834952cf8f00fb (diff)
downloadCMake-e014df762b41e61b423e56637667a050be3a78e7.zip
CMake-e014df762b41e61b423e56637667a050be3a78e7.tar.gz
CMake-e014df762b41e61b423e56637667a050be3a78e7.tar.bz2
QNX: Fix autogen compiler predefines detection
In commit v3.12.0-rc1~20^2 (Move GNU COMPILER_PREDEFINES_COMMAND from Platform to Compiler, 2018-06-01), `Compiler/GNU.cmake` introduced the `-dM` flag, which requires `-Wp` prefix for the QNX compiler wrapper.
Diffstat (limited to 'Modules/Compiler/QCC.cmake')
-rw-r--r--Modules/Compiler/QCC.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/Compiler/QCC.cmake b/Modules/Compiler/QCC.cmake
index 0da7050..a5e2b0b 100644
--- a/Modules/Compiler/QCC.cmake
+++ b/Modules/Compiler/QCC.cmake
@@ -16,6 +16,8 @@ macro(__compiler_qcc lang)
set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE NO)
set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER NO)
+ set(CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "${CMAKE_${lang}_COMPILER}" "-Wp,-dM" "-E" "-c" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
+
unset(CMAKE_${lang}_COMPILE_OPTIONS_IPO)
unset(CMAKE_${lang}_ARCHIVE_CREATE_IPO)
unset(CMAKE_${lang}_ARCHIVE_APPEND_IPO)