summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-07-17 09:41:40 -0400
committerBrad King <brad.king@kitware.com>2014-07-17 09:41:40 -0400
commitd8934eedaf679d45b2f183aa2f6f70ac1eaa93a1 (patch)
treeec433eeffcd604dce1ab6a9934fc4b3ea46648f1
parentafc452fe210f5b46e5a2c9fbbde70b4e6880d4e9 (diff)
parent3151024d241c581463d20bf0ce3d1060bdd22de4 (diff)
downloadcmake-d8934eedaf679d45b2f183aa2f6f70ac1eaa93a1.tar.gz
Merge branch 'fix-QCC-compile-flags' into release
-rw-r--r--Modules/Compiler/QCC-C.cmake2
-rw-r--r--Modules/Compiler/QCC-CXX.cmake12
-rw-r--r--Modules/Compiler/QCC.cmake24
-rw-r--r--Modules/Platform/QNX-QCC-C.cmake4
-rw-r--r--Modules/Platform/QNX-QCC-CXX.cmake4
-rw-r--r--Modules/Platform/QNX.cmake22
6 files changed, 41 insertions, 27 deletions
diff --git a/Modules/Compiler/QCC-C.cmake b/Modules/Compiler/QCC-C.cmake
new file mode 100644
index 0000000000..ae4a2f491d
--- /dev/null
+++ b/Modules/Compiler/QCC-C.cmake
@@ -0,0 +1,2 @@
+include(Compiler/QCC)
+__compiler_qcc(C)
diff --git a/Modules/Compiler/QCC-CXX.cmake b/Modules/Compiler/QCC-CXX.cmake
new file mode 100644
index 0000000000..a676bbedbc
--- /dev/null
+++ b/Modules/Compiler/QCC-CXX.cmake
@@ -0,0 +1,12 @@
+include(Compiler/QCC)
+__compiler_qcc(CXX)
+
+# If the toolchain uses qcc for CMAKE_CXX_COMPILER instead of QCC, the
+# default for the driver is not c++.
+set(CMAKE_CXX_COMPILE_OBJECT
+ "<CMAKE_CXX_COMPILER> -lang-c++ <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
+
+set(CMAKE_CXX_LINK_EXECUTABLE
+ "<CMAKE_CXX_COMPILER> -lang-c++ <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
+
+set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
diff --git a/Modules/Compiler/QCC.cmake b/Modules/Compiler/QCC.cmake
new file mode 100644
index 0000000000..76477e4bba
--- /dev/null
+++ b/Modules/Compiler/QCC.cmake
@@ -0,0 +1,24 @@
+
+#=============================================================================
+# Copyright 2002-2014 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+include(Compiler/GNU)
+
+macro(__compiler_qcc lang)
+ __compiler_gnu(${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_INCLUDE_SYSTEM_FLAG_${lang} "-Wp,-isystem,")
+ set(CMAKE_DEPFILE_FLAGS_${lang} "-Wc,-MMD,<DEPFILE>,-MT,<OBJECT>,-MF,<DEPFILE>")
+endmacro()
diff --git a/Modules/Platform/QNX-QCC-C.cmake b/Modules/Platform/QNX-QCC-C.cmake
deleted file mode 100644
index e5721a75ec..0000000000
--- a/Modules/Platform/QNX-QCC-C.cmake
+++ /dev/null
@@ -1,4 +0,0 @@
-
-include(Platform/QNX)
-
-__compiler_qcc(C)
diff --git a/Modules/Platform/QNX-QCC-CXX.cmake b/Modules/Platform/QNX-QCC-CXX.cmake
deleted file mode 100644
index e490bbed06..0000000000
--- a/Modules/Platform/QNX-QCC-CXX.cmake
+++ /dev/null
@@ -1,4 +0,0 @@
-
-include(Platform/QNX)
-
-__compiler_qcc(CXX)
diff --git a/Modules/Platform/QNX.cmake b/Modules/Platform/QNX.cmake
index cc551bdd50..ebc4609a37 100644
--- a/Modules/Platform/QNX.cmake
+++ b/Modules/Platform/QNX.cmake
@@ -1,5 +1,8 @@
set(QNXNTO 1)
+include(Platform/GNU)
+unset(CMAKE_LIBRARY_ARCHITECTURE_REGEX)
+
set(CMAKE_DL_LIBS "")
# Shared libraries with no builtin soname may not be linked safely by
@@ -14,22 +17,3 @@ foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
endforeach()
-
-include(Platform/GNU)
-unset(CMAKE_LIBRARY_ARCHITECTURE_REGEX)
-
-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_INCLUDE_SYSTEM_FLAG_${lang} "-Wp,-isystem,")
- set(CMAKE_DEPFILE_FLAGS_${lang} "-Wc,-MMD,<DEPFILE>,-MT,<OBJECT>,-MF,<DEPFILE>")
-
- if (lang STREQUAL CXX)
- # If the toolchain uses qcc for CMAKE_CXX_COMPILER instead of QCC, the
- # default for the driver is not c++.
- set(CMAKE_CXX_COMPILE_OBJECT
- "<CMAKE_CXX_COMPILER> -lang-c++ <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
- endif()
-
-endmacro()