[Cmake-commits] CMake branch, next, updated. v2.8.12.1-7193-g6267d03

Stephen Kelly steveire at gmail.com
Tue Jan 21 08:00:37 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  6267d03391d1cf39e75afe973ada21742d6b5f72 (commit)
       via  6c19b139d587faaac496d967ce815b8da531a249 (commit)
       via  5caf3e3055b31b528cec4eb31d2d0eb286c44e14 (commit)
       via  e32777e8adc32fa714d1475f619ea567970b7b5c (commit)
      from  dd6dc19ce99a880ea78e3b78f9dfca3dc806c4d4 (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=6267d03391d1cf39e75afe973ada21742d6b5f72
commit 6267d03391d1cf39e75afe973ada21742d6b5f72
Merge: dd6dc19 6c19b13
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jan 21 08:00:36 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jan 21 08:00:36 2014 -0500

    Merge topic 'qcc-id' into next
    
    6c19b139 Introduce QCC compiler id for that QNX platform compiler.
    5caf3e30 Extend the cmake_policy command to get warnings from cmake code.
    e32777e8 Modules: Fix typo.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c19b139d587faaac496d967ce815b8da531a249
commit 6c19b139d587faaac496d967ce815b8da531a249
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 13:59:16 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/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.
      *

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5caf3e3055b31b528cec4eb31d2d0eb286c44e14
commit 5caf3e3055b31b528cec4eb31d2d0eb286c44e14
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Jan 11 12:07:23 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Jan 21 13:59:16 2014 +0100

    Extend the cmake_policy command to get warnings from cmake code.

diff --git a/Help/command/cmake_policy.rst b/Help/command/cmake_policy.rst
index 46db8d3..ffeb892 100644
--- a/Help/command/cmake_policy.rst
+++ b/Help/command/cmake_policy.rst
@@ -76,3 +76,9 @@ use the pre-record policies when they are invoked.  If the function or
 macro implementation sets policies, the changes automatically
 propagate up through callers until they reach the closest nested
 policy stack entry.
+
+::
+
+  cmake_policy(GET_WARNING CMP<NNNN> <variable>)
+
+Populate <variable> with the policy warning message for the given policy.
diff --git a/Source/cmCMakePolicyCommand.cxx b/Source/cmCMakePolicyCommand.cxx
index f4be559..627ba7e 100644
--- a/Source/cmCMakePolicyCommand.cxx
+++ b/Source/cmCMakePolicyCommand.cxx
@@ -31,6 +31,10 @@ bool cmCMakePolicyCommand
     {
     return this->HandleGetMode(args);
     }
+  else if(args[0] == "GET_WARNING")
+    {
+    return this->HandleGetWarningMode(args);
+    }
   else if(args[0] == "PUSH")
     {
     if(args.size() > 1)
@@ -154,6 +158,38 @@ bool cmCMakePolicyCommand::HandleGetMode(std::vector<std::string> const& args)
 }
 
 //----------------------------------------------------------------------------
+bool cmCMakePolicyCommand::HandleGetWarningMode(std::vector<std::string> const& args)
+{
+  if(args.size() != 3)
+    {
+    this->SetError("GET_WARNING must be given exactly 2 additional "
+                   "arguments.");
+    return false;
+    }
+
+  // Get arguments.
+  std::string const& id = args[1];
+  std::string const& var = args[2];
+
+  // Lookup the policy number.
+  cmPolicies::PolicyID pid;
+  if(!this->Makefile->GetPolicies()->GetPolicyID(id.c_str(), pid))
+    {
+    cmOStringStream e;
+    e << "GET_WARNING given policy \"" << id << "\" which is not known to "
+      << "this version of CMake.";
+    this->SetError(e.str().c_str());
+    return false;
+    }
+
+  // Lookup the policy setting.
+  this->Makefile->AddDefinition(var.c_str(),
+                this->Makefile->GetPolicies()->GetPolicyWarning(pid).c_str());
+
+  return true;
+}
+
+//----------------------------------------------------------------------------
 bool
 cmCMakePolicyCommand::HandleVersionMode(std::vector<std::string> const& args)
 {
diff --git a/Source/cmCMakePolicyCommand.h b/Source/cmCMakePolicyCommand.h
index 7e3f4e6..fd9468d 100644
--- a/Source/cmCMakePolicyCommand.h
+++ b/Source/cmCMakePolicyCommand.h
@@ -52,6 +52,7 @@ public:
 private:
   bool HandleSetMode(std::vector<std::string> const& args);
   bool HandleGetMode(std::vector<std::string> const& args);
+  bool HandleGetWarningMode(std::vector<std::string> const& args);
   bool HandleVersionMode(std::vector<std::string> const& args);
 };
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e32777e8adc32fa714d1475f619ea567970b7b5c
commit e32777e8adc32fa714d1475f619ea567970b7b5c
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jan 21 13:17:36 2014 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Jan 21 13:59:06 2014 +0100

    Modules: Fix typo.
    
    lile -> like.

diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 5f9d9bf..21864f1 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -145,7 +145,7 @@ endif ()
 # e.g. powerpc-linux-g++, arm-elf-g++ or i586-mingw32msvc-g++ , optionally
 # with a 3-component version number at the end (e.g. arm-eabi-gcc-4.5.2).
 # The other tools of the toolchain usually have the same prefix
-# NAME_WE cannot be used since then this test will fail for names lile
+# NAME_WE cannot be used since then this test will fail for names like
 # "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be
 # "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
 

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

Summary of changes:
 Help/command/cmake_policy.rst           |    6 ++++++
 Help/policy/CMP0047.rst                 |   16 ++++++++++++++
 Modules/CMakeCCompilerId.c.in           |    4 ++++
 Modules/CMakeCXXCompilerId.cpp.in       |    4 ++++
 Modules/CMakeDetermineCXXCompiler.cmake |    2 +-
 Modules/CMakeDetermineCompilerId.cmake  |   27 +++++++++++++++++++++++
 Modules/Platform/QNX-QCC-C.cmake        |    5 +++++
 Modules/Platform/QNX-QCC-CXX.cmake      |    5 +++++
 Source/cmCMakePolicyCommand.cxx         |   36 +++++++++++++++++++++++++++++++
 Source/cmCMakePolicyCommand.h           |    1 +
 Source/cmPolicies.cxx                   |    5 +++++
 Source/cmPolicies.h                     |    1 +
 12 files changed, 111 insertions(+), 1 deletion(-)
 create mode 100644 Help/policy/CMP0047.rst
 create mode 100644 Modules/Platform/QNX-QCC-C.cmake
 create mode 100644 Modules/Platform/QNX-QCC-CXX.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list