summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-11-30 17:34:33 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-11-30 17:36:12 (GMT)
commit36c304d17b44498b21b16aad92f5a4818a6f7c41 (patch)
treedf04f4a30ad8e8512341fa1a488a38250a391f95
parent2e1eaf16a790f4d96450246544b3b2c78672f3d6 (diff)
parent34f6d767552b60436d2d6aec35ae2a3d137a8b20 (diff)
downloadCMake-36c304d17b44498b21b16aad92f5a4818a6f7c41.zip
CMake-36c304d17b44498b21b16aad92f5a4818a6f7c41.tar.gz
CMake-36c304d17b44498b21b16aad92f5a4818a6f7c41.tar.bz2
Merge topic 'enable-extensions-on-qnx' into release-3.19
34f6d76755 QNX: Do not disable compiler extensions for CMake itself Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5537
-rw-r--r--Source/CMakeLists.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index ba378fb..ca56d3a 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -2,9 +2,12 @@
# file Copyright.txt or https://cmake.org/licensing for details.
# To ensure maximum portability across various compilers and platforms
-# deactivate any compiler extensions
-set(CMAKE_C_EXTENSIONS FALSE)
-set(CMAKE_CXX_EXTENSIONS FALSE)
+# deactivate any compiler extensions. Skip this for QNX, where additional
+# work is needed to build without compiler extensions.
+if (NOT CMAKE_SYSTEM_NAME STREQUAL "QNX")
+ set(CMAKE_C_EXTENSIONS FALSE)
+ set(CMAKE_CXX_EXTENSIONS FALSE)
+endif()
include(CheckIncludeFile)
# Check if we can build support for ELF parsing.