summaryrefslogtreecommitdiffstats
path: root/Source
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:13 (GMT)
commit9fe62a34c159d7badffa6f1a3c22e41b368a4f29 (patch)
tree77619d8d1e53240f967c91d3f15ca1f1862908cd /Source
parentc84ac46afcfad457773056602eab0b098ed86b8e (diff)
parent34f6d767552b60436d2d6aec35ae2a3d137a8b20 (diff)
downloadCMake-9fe62a34c159d7badffa6f1a3c22e41b368a4f29.zip
CMake-9fe62a34c159d7badffa6f1a3c22e41b368a4f29.tar.gz
CMake-9fe62a34c159d7badffa6f1a3c22e41b368a4f29.tar.bz2
Merge topic 'enable-extensions-on-qnx'
34f6d76755 QNX: Do not disable compiler extensions for CMake itself Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5537
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index d1616ad..7608056 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.