[Cmake-commits] CMake branch, next, updated. v3.7.2-2323-gf9f1d9f

Brad King brad.king at kitware.com
Tue Jan 24 16:48:24 EST 2017


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  f9f1d9f2333ca6f76b816c303187abd2ae976e93 (commit)
       via  842491d93681faa0d874bbaf0d31ace78df0ac1f (commit)
      from  972dd56913054eedfc1f8cf39bf47c7132b973c6 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f9f1d9f2333ca6f76b816c303187abd2ae976e93
commit f9f1d9f2333ca6f76b816c303187abd2ae976e93
Merge: 972dd56 842491d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 24 16:48:24 2017 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jan 24 16:48:24 2017 -0500

    Merge topic 'determine_id_without_user_specified_flags' into next
    
    842491d9 Revert "CMakeDetermineCompilerId: check with and without user-specified flags"


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=842491d93681faa0d874bbaf0d31ace78df0ac1f
commit 842491d93681faa0d874bbaf0d31ace78df0ac1f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 24 16:48:07 2017 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Jan 24 16:48:07 2017 -0500

    Revert "CMakeDetermineCompilerId: check with and without user-specified flags"
    
    This reverts commit 0256ba65a806b9e9aefa03acec4f39cdcf71f2e4.

diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index ae485bf..bb34de5 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -24,21 +24,16 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
 
   # Try building with no extra flags and then try each set
   # of helper flags.  Stop when the compiler is identified.
-  foreach(userflags "${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}" "")
-    foreach(testflags ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS_FIRST}
-                      ""
-                      ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS})
-      CMAKE_DETERMINE_COMPILER_ID_BUILD("${lang}" "${testflags}" "${userflags}" "${src}")
-      CMAKE_DETERMINE_COMPILER_ID_MATCH_VENDOR("${lang}" "${COMPILER_${lang}_PRODUCED_OUTPUT}")
-      if(CMAKE_${lang}_COMPILER_ID)
-        break()
-      endif()
-      foreach(file ${COMPILER_${lang}_PRODUCED_FILES})
-        CMAKE_DETERMINE_COMPILER_ID_CHECK("${lang}" "${CMAKE_${lang}_COMPILER_ID_DIR}/${file}" "${src}")
-      endforeach()
-      if(CMAKE_${lang}_COMPILER_ID)
-        break()
-      endif()
+  foreach(flags ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS_FIRST}
+                ""
+                ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS})
+    CMAKE_DETERMINE_COMPILER_ID_BUILD("${lang}" "${flags}" "${src}")
+    CMAKE_DETERMINE_COMPILER_ID_MATCH_VENDOR("${lang}" "${COMPILER_${lang}_PRODUCED_OUTPUT}")
+    if(CMAKE_${lang}_COMPILER_ID)
+      break()
+    endif()
+    foreach(file ${COMPILER_${lang}_PRODUCED_FILES})
+      CMAKE_DETERMINE_COMPILER_ID_CHECK("${lang}" "${CMAKE_${lang}_COMPILER_ID_DIR}/${file}" "${src}")
     endforeach()
     if(CMAKE_${lang}_COMPILER_ID)
       break()
@@ -47,9 +42,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
 
   # If the compiler is still unknown, try to query its vendor.
   if(CMAKE_${lang}_COMPILER AND NOT CMAKE_${lang}_COMPILER_ID)
-    foreach(userflags "${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}" "")
-      CMAKE_DETERMINE_COMPILER_ID_VENDOR(${lang} "${userflags}")
-    endforeach()
+    CMAKE_DETERMINE_COMPILER_ID_VENDOR(${lang})
   endif()
 
   if (COMPILER_QNXNTO AND CMAKE_${lang}_COMPILER_ID STREQUAL "GNU")
@@ -73,9 +66,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
   endif()
 
   if(CMAKE_GENERATOR STREQUAL "Ninja" AND MSVC_${lang}_ARCHITECTURE_ID)
-    foreach(userflags "${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}" "")
-      CMAKE_DETERMINE_MSVC_SHOWINCLUDES_PREFIX(${lang} "${userflags}")
-    endforeach()
+    CMAKE_DETERMINE_MSVC_SHOWINCLUDES_PREFIX(${lang})
   else()
     set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "")
   endif()
@@ -136,7 +127,7 @@ endfunction()
 #-----------------------------------------------------------------------------
 # Function to build the compiler id source file and look for output
 # files.
-function(CMAKE_DETERMINE_COMPILER_ID_BUILD lang testflags userflags src)
+function(CMAKE_DETERMINE_COMPILER_ID_BUILD lang testflags src)
   # Create a clean working directory.
   file(REMOVE_RECURSE ${CMAKE_${lang}_COMPILER_ID_DIR})
   file(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR})
@@ -146,7 +137,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_BUILD lang testflags userflags src)
   # Construct a description of this test case.
   set(COMPILER_DESCRIPTION
     "Compiler: ${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ID_ARG1}
-Build flags: ${userflags}
+Build flags: ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
 Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
 ")
 
@@ -336,7 +327,7 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
     execute_process(
       COMMAND "${CMAKE_${lang}_COMPILER}"
               ${CMAKE_${lang}_COMPILER_ID_ARG1}
-              ${userflags}
+              ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
               ${testflags}
               ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
               "${src}"
@@ -624,7 +615,7 @@ endfunction()
 #   set(CMAKE_${lang}_COMPILER_ID_VENDOR_REGEX_${vendor} "Some Vendor Output")
 # We try running the compiler with the flag for each vendor and
 # matching its regular expression in the output.
-function(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang userflags)
+function(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
 
   if(NOT CMAKE_${lang}_COMPILER_ID_DIR)
     # We get here when this function is called not from within CMAKE_DETERMINE_COMPILER_ID()
@@ -642,7 +633,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang userflags)
     execute_process(
       COMMAND "${CMAKE_${lang}_COMPILER}"
       ${CMAKE_${lang}_COMPILER_ID_ARG1}
-      ${userflags}
+      ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
       ${flags}
       WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}
       OUTPUT_VARIABLE output ERROR_VARIABLE output
@@ -670,7 +661,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang userflags)
   endforeach()
 endfunction()
 
-function(CMAKE_DETERMINE_MSVC_SHOWINCLUDES_PREFIX lang userflags)
+function(CMAKE_DETERMINE_MSVC_SHOWINCLUDES_PREFIX lang)
   # Run this MSVC-compatible compiler to detect what the /showIncludes
   # option displays.  We can use a C source even with the C++ compiler
   # because MSVC-compatible compilers handle both and show the same output.
@@ -680,7 +671,7 @@ function(CMAKE_DETERMINE_MSVC_SHOWINCLUDES_PREFIX lang userflags)
   execute_process(
     COMMAND "${CMAKE_${lang}_COMPILER}"
             ${CMAKE_${lang}_COMPILER_ID_ARG1}
-            ${userflags}
+            ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
             /nologo /showIncludes /c main.c
     WORKING_DIRECTORY ${showdir}
     OUTPUT_VARIABLE out

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

Summary of changes:
 Modules/CMakeDetermineCompilerId.cmake |   47 +++++++++++++-------------------
 1 file changed, 19 insertions(+), 28 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list