[Cmake-commits] CMake branch, next, updated. v2.8.12.1-7197-gab65538

Stephen Kelly steveire at gmail.com
Tue Jan 21 08:14:38 EST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  ab65538f5706038fdb51b9479e1b8779aafa4892 (commit)
       via  858f57c0d0ad061d02fad3a04170daed85dadc68 (commit)
      from  e6533b1013dfec180a0d64200f49f9f53f6e613a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ab65538f5706038fdb51b9479e1b8779aafa4892
commit ab65538f5706038fdb51b9479e1b8779aafa4892
Merge: e6533b1 858f57c
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jan 21 08:14:38 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jan 21 08:14:38 2014 -0500

    Merge topic 'qcc-id' into next
    
    858f57c0 Introduce QCC compiler id for that QNX platform compiler.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=858f57c0d0ad061d02fad3a04170daed85dadc68
commit 858f57c0d0ad061d02fad3a04170daed85dadc68
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jan 20 17:57:40 2014 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Jan 21 14:13:23 2014 +0100

    Introduce QCC compiler id for that QNX platform compiler.
    
    Introduce policy CMP0047 to control whether the new id is used.
    Populate new module files to handle system includes and depfiles
    when using the QCC compiler.
    
    QNX toolchains in use in the wild use the g++ compiler driver
    directly instead of the recommended qcc driver. Those toolchains
    are not affected by this change.

diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index 891333c..02f596b 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -98,3 +98,4 @@ All Policies
    /policy/CMP0044
    /policy/CMP0045
    /policy/CMP0046
+   /policy/CMP0047
diff --git a/Help/policy/CMP0047.rst b/Help/policy/CMP0047.rst
new file mode 100644
index 0000000..7b87c4d
--- /dev/null
+++ b/Help/policy/CMP0047.rst
@@ -0,0 +1,16 @@
+CMP0047
+-------
+
+Use QCC compiler id for the qcc drivers on QNX.
+
+CMake 2.8.12 and lower assigned the QNX qcc and QCC compiler drivers the "GNU"
+compiler id.
+
+The OLD behavior for this policy is to use the "GNU" compiler id for the qcc
+and QCC compiler drivers. The NEW behavior for this policy is to use the "QCC"
+compiler id for those drivers.
+
+This policy was introduced in CMake version 3.0.0.
+CMake version |release| warns when the policy is not set and uses
+OLD behavior.  Use the cmake_policy command to set it to OLD or
+NEW explicitly.
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index d53247a..52f9590 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -227,6 +227,10 @@ char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
 char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
 #endif
 
+#ifdef __QNXNTO__
+char const* qnxnto = "INFO" ":" "qnxnto";
+#endif
+
 @CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@
 @CMAKE_C_COMPILER_ID_ERROR_FOR_TEST@
 
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index b5d498d..25ceb3f 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -220,6 +220,10 @@ char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
 char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
 #endif
 
+#ifdef __QNXNTO__
+char const* qnxnto = "INFO" ":" "qnxnto";
+#endif
+
 @CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@
 @CMAKE_CXX_COMPILER_ID_ERROR_FOR_TEST@
 
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 2bcf3d1..b07f59b 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -48,6 +48,29 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
     CMAKE_DETERMINE_COMPILER_ID_VENDOR(${lang})
   endif()
 
+  if (COMPILER_QNXNTO AND CMAKE_${lang}_COMPILER_ID STREQUAL GNU)
+    execute_process(
+      COMMAND "${CMAKE_${lang}_COMPILER}"
+      -V
+      OUTPUT_VARIABLE output ERROR_VARIABLE output
+      RESULT_VARIABLE result
+      TIMEOUT 10
+      )
+    if (output MATCHES "targets available")
+      cmake_policy(GET CMP0047 policyStatus)
+      if (policyStatus STREQUAL "" OR policyStatus STREQUAL "OLD")
+        if(policyStatus STREQUAL "")
+          cmake_policy(GET_WARNING CMP0047 policyWarning)
+          message(AUTHOR_WARNING "${policyWarning}")
+        endif()
+      elseif(policyStatus STREQUAL "NEW")
+        set(CMAKE_${lang}_COMPILER_ID QCC)
+        # http://community.qnx.com/sf/discussion/do/listPosts/projects.community/discussion.qnx_momentics_community_support.topc3555?_pagenum=2
+        # The qcc driver does not itself have a version.
+      endif()
+    endif()
+  endif()
+
   # if the format is unknown after all files have been checked, put "Unknown" in the cache
   if(NOT CMAKE_EXECUTABLE_FORMAT)
     set(CMAKE_EXECUTABLE_FORMAT "Unknown" CACHE INTERNAL "Executable file format")
@@ -369,6 +392,9 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
         string(REGEX REPLACE "^0+([0-9])" "\\1" SIMULATE_VERSION "${SIMULATE_VERSION}")
         string(REGEX REPLACE "\\.0+([0-9])" ".\\1" SIMULATE_VERSION "${SIMULATE_VERSION}")
       endif()
+      if("${info}" MATCHES ".*INFO:qnxnto")
+        set(COMPILER_QNXNTO 1)
+      endif()
     endforeach()
 
     # Detect the exact architecture from the PE header.
@@ -459,6 +485,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
   set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE)
   set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE)
   set(CMAKE_EXECUTABLE_FORMAT "${CMAKE_EXECUTABLE_FORMAT}" PARENT_SCOPE)
+  set(COMPILER_QNXNTO "${COMPILER_QNXNTO}" PARENT_SCOPE)
 endfunction()
 
 #-----------------------------------------------------------------------------
diff --git a/Modules/Platform/QNX-QCC-C.cmake b/Modules/Platform/QNX-QCC-C.cmake
new file mode 100644
index 0000000..4569df3
--- /dev/null
+++ b/Modules/Platform/QNX-QCC-C.cmake
@@ -0,0 +1,5 @@
+
+include(Platform/QNX)
+
+set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-Wp,-isystem,")
+set(CMAKE_DEPFILE_FLAGS_C "-Wc,-MMD,<DEPFILE>,-MT,<OBJECT>,-MF,<DEPFILE>")
diff --git a/Modules/Platform/QNX-QCC-CXX.cmake b/Modules/Platform/QNX-QCC-CXX.cmake
new file mode 100644
index 0000000..ea364f8
--- /dev/null
+++ b/Modules/Platform/QNX-QCC-CXX.cmake
@@ -0,0 +1,5 @@
+
+include(Platform/QNX)
+
+set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-Wp,-isystem,")
+set(CMAKE_DEPFILE_FLAGS_CXX "-Wc,-MMD,<DEPFILE>,-MT,<OBJECT>,-MF,<DEPFILE>")
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 020a782..a1451f1 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -336,6 +336,11 @@ cmPolicies::cmPolicies()
     CMP0046, "CMP0046",
     "Error on non-existent dependency in add_dependencies.",
     3,0,0,0, cmPolicies::WARN);
+
+  this->DefinePolicy(
+    CMP0047, "CMP0047",
+    "Use QCC compiler id for the qcc drivers on QNX.",
+    3,0,0,0, cmPolicies::WARN);
 }
 
 cmPolicies::~cmPolicies()
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 38f47f1..d1bba7b 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -100,6 +100,7 @@ public:
     CMP0044, ///< Case sensitive <LANG>_COMPILER_ID generator expressions
     CMP0045, ///< Error on non-existent target in get_target_property
     CMP0046, ///< Error on non-existent dependency in add_dependencies
+    CMP0047, ///< Use QCC compiler id for the qcc drivers on QNX.
 
     /** \brief Always the last entry.
      *

-----------------------------------------------------------------------

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list