[Cmake-commits] CMake branch, next, updated. v2.8.12.1-7205-ga388258

Stephen Kelly steveire at gmail.com
Tue Jan 21 09:55:31 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  a3882587d98bdd8fb4f5053297de84356ff4454e (commit)
       via  2845e208cc9b8922acc9651948d6702f48a2b8a9 (commit)
       via  f99968b9ef76f56a7fb1f5077790577ba60417b1 (commit)
      from  94c1be73e3066ac1e8708070e3ad2ddbaa32a9fb (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=a3882587d98bdd8fb4f5053297de84356ff4454e
commit a3882587d98bdd8fb4f5053297de84356ff4454e
Merge: 94c1be7 2845e20
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jan 21 09:55:30 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jan 21 09:55:30 2014 -0500

    Merge topic 'qcc-id' into next
    
    2845e208 Updates.
    f99968b9 Revert "Extend the cmake_policy command to get warnings from cmake code."


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2845e208cc9b8922acc9651948d6702f48a2b8a9
commit 2845e208cc9b8922acc9651948d6702f48a2b8a9
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jan 21 15:28:25 2014 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Jan 21 15:53:59 2014 +0100

    Updates.

diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index b07f59b..067892d 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -57,17 +57,9 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
       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()
+      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()
 
diff --git a/Modules/Platform/QNX-QCC-C.cmake b/Modules/Platform/QNX-QCC-C.cmake
index 4569df3..e5721a7 100644
--- a/Modules/Platform/QNX-QCC-C.cmake
+++ b/Modules/Platform/QNX-QCC-C.cmake
@@ -1,5 +1,4 @@
 
 include(Platform/QNX)
 
-set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-Wp,-isystem,")
-set(CMAKE_DEPFILE_FLAGS_C "-Wc,-MMD,<DEPFILE>,-MT,<OBJECT>,-MF,<DEPFILE>")
+__compiler_qcc(C)
diff --git a/Modules/Platform/QNX-QCC-CXX.cmake b/Modules/Platform/QNX-QCC-CXX.cmake
index ea364f8..e490bbe 100644
--- a/Modules/Platform/QNX-QCC-CXX.cmake
+++ b/Modules/Platform/QNX-QCC-CXX.cmake
@@ -1,5 +1,4 @@
 
 include(Platform/QNX)
 
-set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-Wp,-isystem,")
-set(CMAKE_DEPFILE_FLAGS_CXX "-Wc,-MMD,<DEPFILE>,-MT,<OBJECT>,-MF,<DEPFILE>")
+__compiler_qcc(CXX)
diff --git a/Modules/Platform/QNX.cmake b/Modules/Platform/QNX.cmake
index 9afde05..cc551bd 100644
--- a/Modules/Platform/QNX.cmake
+++ b/Modules/Platform/QNX.cmake
@@ -1,24 +1,6 @@
 set(QNXNTO 1)
 
-# The QNX GCC does not seem to have -isystem so remove the flag.
-set(CMAKE_INCLUDE_SYSTEM_FLAG_C)
-set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX)
-# ... Nor does the driver support appropriate flags to create depfiles.
-set(CMAKE_DEPFILE_FLAGS_C)
-set(CMAKE_DEPFILE_FLAGS_CXX)
-
 set(CMAKE_DL_LIBS "")
-set(CMAKE_SHARED_LIBRARY_C_FLAGS "")
-set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
-set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
-set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
-set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
-set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
-set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
-set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
-# http://www.qnx.com/developers/docs/6.4.0/neutrino/utilities/q/qcc.html#examples
-set(CMAKE_C_COMPILE_OPTIONS_TARGET "-V")
-set(CMAKE_CXX_COMPILE_OPTIONS_TARGET "-V")
 
 # Shared libraries with no builtin soname may not be linked safely by
 # specifying the file path.
@@ -32,8 +14,22 @@ 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()
-# force the language to be c++ since qnx only has gcc and not g++ and c++?
-set(CMAKE_CXX_COMPILE_OBJECT
-  "<CMAKE_CXX_COMPILER> -x c++ <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
 
-include(Platform/UnixPaths)
+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()
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 8a7eee4..583b150 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -748,7 +748,12 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf,
 {
   std::string compilerIdVar = "CMAKE_" + lang + "_COMPILER_ID";
   const char* compilerId = mf->GetDefinition(compilerIdVar.c_str());
-  if(compilerId && strcmp(compilerId, "AppleClang") == 0)
+  if(!compilerId)
+    {
+    return;
+    }
+
+  if(strcmp(compilerId, "AppleClang") == 0)
     {
     cmPolicies* policies = this->CMakeInstance->GetPolicies();
     switch(mf->GetPolicyStatus(cmPolicies::CMP0025))
@@ -778,6 +783,37 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf,
         break;
       }
     }
+
+  if(strcmp(compilerId, "QCC") == 0)
+    {
+    cmPolicies* policies = this->CMakeInstance->GetPolicies();
+    switch(mf->GetPolicyStatus(cmPolicies::CMP0047))
+      {
+      case cmPolicies::WARN:
+        if(!this->CMakeInstance->GetIsInTryCompile())
+          {
+          cmOStringStream w;
+          w << policies->GetPolicyWarning(cmPolicies::CMP0047) << "\n"
+            "Converting " << lang <<
+            " compiler id \"QCC\" to \"GNU\" for compatibility."
+            ;
+          mf->IssueMessage(cmake::AUTHOR_WARNING, w.str());
+          }
+      case cmPolicies::OLD:
+        // OLD behavior is to convert AppleClang to Clang.
+        mf->AddDefinition(compilerIdVar.c_str(), "GNU");
+        break;
+      case cmPolicies::REQUIRED_IF_USED:
+      case cmPolicies::REQUIRED_ALWAYS:
+        mf->IssueMessage(
+          cmake::FATAL_ERROR,
+          policies->GetRequiredPolicyError(cmPolicies::CMP0047)
+          );
+      case cmPolicies::NEW:
+        // NEW behavior is to keep QCC.
+        break;
+      }
+    }
 }
 
 //----------------------------------------------------------------------------

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f99968b9ef76f56a7fb1f5077790577ba60417b1
commit f99968b9ef76f56a7fb1f5077790577ba60417b1
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jan 21 15:23:44 2014 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Jan 21 15:23:44 2014 +0100

    Revert "Extend the cmake_policy command to get warnings from cmake code."
    
    This reverts commit 5caf3e3055b31b528cec4eb31d2d0eb286c44e14.

diff --git a/Help/command/cmake_policy.rst b/Help/command/cmake_policy.rst
index ffeb892..46db8d3 100644
--- a/Help/command/cmake_policy.rst
+++ b/Help/command/cmake_policy.rst
@@ -76,9 +76,3 @@ 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 627ba7e..f4be559 100644
--- a/Source/cmCMakePolicyCommand.cxx
+++ b/Source/cmCMakePolicyCommand.cxx
@@ -31,10 +31,6 @@ 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)
@@ -158,38 +154,6 @@ 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 fd9468d..7e3f4e6 100644
--- a/Source/cmCMakePolicyCommand.h
+++ b/Source/cmCMakePolicyCommand.h
@@ -52,7 +52,6 @@ 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);
 };
 

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

Summary of changes:
 Help/command/cmake_policy.rst          |    6 -----
 Modules/CMakeDetermineCompilerId.cmake |   14 +++--------
 Modules/Platform/QNX-QCC-C.cmake       |    3 +--
 Modules/Platform/QNX-QCC-CXX.cmake     |    3 +--
 Modules/Platform/QNX.cmake             |   40 ++++++++++++++------------------
 Source/cmCMakePolicyCommand.cxx        |   36 ----------------------------
 Source/cmCMakePolicyCommand.h          |    1 -
 Source/cmGlobalGenerator.cxx           |   38 +++++++++++++++++++++++++++++-
 8 files changed, 60 insertions(+), 81 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list