[Cmake-commits] CMake branch, next, updated. v3.3.0-rc2-515-g83b997d

Brad King brad.king at kitware.com
Thu Jun 18 12:01:34 EDT 2015


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  83b997d41a65361e5bd56c601b2896146606cc96 (commit)
       via  7cd539b163a58f8b594e2318bdc7e7d7b1ba6577 (commit)
       via  0d204c1c1dabba2dc87957e9ce6bcd32aab70dae (commit)
       via  5f0dad75a9dd9bb9e7b2f917806588563c3ed39e (commit)
       via  c65a060e1b19a463312f9003bc4d7793db9630e5 (commit)
      from  82c1f16f8c74f6cba2cf2cc2e98062559a0c072e (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=83b997d41a65361e5bd56c601b2896146606cc96
commit 83b997d41a65361e5bd56c601b2896146606cc96
Merge: 82c1f16 7cd539b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jun 18 12:01:33 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jun 18 12:01:33 2015 -0400

    Merge topic 'ConcurrentFortran-compiler-id' into next
    
    7cd539b1 Add support for Concurrent Fortran 77 Compiler
    0d204c1c CMakeDetermineCompilerId: Try matching compiler output to detect id
    5f0dad75 CMakeDetermineCompilerId: Refactor id build/check loop logic
    c65a060e CMakeDetermineCompilerId: Optionally try some flags before no flags


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7cd539b163a58f8b594e2318bdc7e7d7b1ba6577
commit 7cd539b163a58f8b594e2318bdc7e7d7b1ba6577
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jun 18 11:33:45 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jun 18 11:36:12 2015 -0400

    Add support for Concurrent Fortran 77 Compiler
    
    The Concurrent Fortran compiler (ccur.com) is available on Linux and can
    be used much like the GNU Fortran compiler.  Currently it has no
    preprocessor symbols to identify it so we need to detect it by matching
    compiler output.
    
    Suggested-by: Anthony Ette <Anthony.R.Ette at controlsdata.com>

diff --git a/Help/variable/CMAKE_LANG_COMPILER_ID.rst b/Help/variable/CMAKE_LANG_COMPILER_ID.rst
index f554f4e..1c3b134 100644
--- a/Help/variable/CMAKE_LANG_COMPILER_ID.rst
+++ b/Help/variable/CMAKE_LANG_COMPILER_ID.rst
@@ -11,6 +11,7 @@ include:
   Absoft = Absoft Fortran (absoft.com)
   ADSP = Analog VisualDSP++ (analog.com)
   AppleClang = Apple Clang (apple.com)
+  CCur = Concurrent Fortran (ccur.com)
   Clang = LLVM Clang (clang.llvm.org)
   Cray = Cray Compiler (cray.com)
   Embarcadero, Borland = Embarcadero (embarcadero.com)
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index ca68900..52ec25a 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -98,7 +98,10 @@ else()
   # Each entry in this list is a set of extra flags to try
   # adding to the compile line to see if it helps produce
   # a valid identification executable.
-  set(CMAKE_Fortran_COMPILER_ID_TEST_FLAGS_FIRST)
+  set(CMAKE_Fortran_COMPILER_ID_TEST_FLAGS_FIRST
+    # Get verbose output to help distinguish compilers.
+    "-v"
+    )
   set(CMAKE_Fortran_COMPILER_ID_TEST_FLAGS
     # Try compiling to an object file only.
     "-c"
@@ -112,6 +115,10 @@ endif()
 if(NOT CMAKE_Fortran_COMPILER_ID_RUN)
   set(CMAKE_Fortran_COMPILER_ID_RUN 1)
 
+  # Table of per-vendor compiler output regular expressions.
+  list(APPEND CMAKE_Fortran_COMPILER_ID_MATCH_VENDORS CCur)
+  set(CMAKE_Fortran_COMPILER_ID_MATCH_VENDOR_REGEX_CCur "Concurrent Fortran [0-9]+ Compiler")
+
   # Table of per-vendor compiler id flags with expected output.
   list(APPEND CMAKE_Fortran_COMPILER_ID_VENDORS Compaq)
   set(CMAKE_Fortran_COMPILER_ID_VENDOR_FLAGS_Compaq "-what")
diff --git a/Modules/Compiler/CCur-Fortran.cmake b/Modules/Compiler/CCur-Fortran.cmake
new file mode 100644
index 0000000..6ec06ae
--- /dev/null
+++ b/Modules/Compiler/CCur-Fortran.cmake
@@ -0,0 +1 @@
+include(Compiler/GNU-Fortran)
diff --git a/Modules/Platform/Linux-CCur-Fortran.cmake b/Modules/Platform/Linux-CCur-Fortran.cmake
new file mode 100644
index 0000000..ceecc2f
--- /dev/null
+++ b/Modules/Platform/Linux-CCur-Fortran.cmake
@@ -0,0 +1 @@
+include(Platform/Linux-GNU-Fortran)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0d204c1c1dabba2dc87957e9ce6bcd32aab70dae
commit 0d204c1c1dabba2dc87957e9ce6bcd32aab70dae
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jun 18 11:28:36 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jun 18 11:28:36 2015 -0400

    CMakeDetermineCompilerId: Try matching compiler output to detect id
    
    Some compilers can only be distinguished by their compilation output
    rather than preprocessor symbols or special flags.  Add infrastructure
    to determine the compiler id by matching output.

diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 3c715e9..68f2194 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -38,6 +38,10 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
                 ""
                 ${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()
@@ -358,6 +362,7 @@ ${CMAKE_${lang}_COMPILER_ID_OUTPUT}
 
     # No output files should be inspected.
     set(COMPILER_${lang}_PRODUCED_FILES)
+    set(COMPILER_${lang}_PRODUCED_OUTPUT)
   else()
     # Compilation succeeded.
     file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
@@ -398,10 +403,24 @@ ${CMAKE_${lang}_COMPILER_ID_OUTPUT}
         "${src}\" did not produce an executable in \""
         "${CMAKE_${lang}_COMPILER_ID_DIR}\".\n\n")
     endif()
+
+    set(COMPILER_${lang}_PRODUCED_OUTPUT "${CMAKE_${lang}_COMPILER_ID_OUTPUT}")
   endif()
 
   # Return the files produced by the compilation.
   set(COMPILER_${lang}_PRODUCED_FILES "${COMPILER_${lang}_PRODUCED_FILES}" PARENT_SCOPE)
+  set(COMPILER_${lang}_PRODUCED_OUTPUT "${COMPILER_${lang}_PRODUCED_OUTPUT}" PARENT_SCOPE)
+endfunction()
+
+#-----------------------------------------------------------------------------
+# Function to extract the compiler id from compiler output.
+function(CMAKE_DETERMINE_COMPILER_ID_MATCH_VENDOR lang output)
+  foreach(vendor ${CMAKE_${lang}_COMPILER_ID_MATCH_VENDORS})
+    if(output MATCHES "${CMAKE_${lang}_COMPILER_ID_MATCH_VENDOR_REGEX_${vendor}}")
+      set(CMAKE_${lang}_COMPILER_ID "${vendor}")
+    endif()
+  endforeach()
+  set(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
 endfunction()
 
 #-----------------------------------------------------------------------------

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5f0dad75a9dd9bb9e7b2f917806588563c3ed39e
commit 5f0dad75a9dd9bb9e7b2f917806588563c3ed39e
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jun 18 11:24:54 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jun 18 11:27:00 2015 -0400

    CMakeDetermineCompilerId: Refactor id build/check loop logic
    
    Callers of CMAKE_DETERMINE_COMPILER_ID initialize the
    CMAKE_${lang}_COMPILER_ID to unset so we can check it at the end of each
    loop iteration instead of the beginning.  This approach allows us to
    break out of the loop as soon as we succeed.  It will also allow checks
    to be added in more places within the loop later.

diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 7ddf33f..3c715e9 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -37,11 +37,12 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
   foreach(flags ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS_FIRST}
                 ""
                 ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS})
-    if(NOT CMAKE_${lang}_COMPILER_ID)
-      CMAKE_DETERMINE_COMPILER_ID_BUILD("${lang}" "${flags}" "${src}")
-      foreach(file ${COMPILER_${lang}_PRODUCED_FILES})
-        CMAKE_DETERMINE_COMPILER_ID_CHECK("${lang}" "${CMAKE_${lang}_COMPILER_ID_DIR}/${file}" "${src}")
-      endforeach()
+    CMAKE_DETERMINE_COMPILER_ID_BUILD("${lang}" "${flags}" "${src}")
+    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()
   endforeach()
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c65a060e1b19a463312f9003bc4d7793db9630e5
commit c65a060e1b19a463312f9003bc4d7793db9630e5
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jun 18 10:57:46 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jun 18 10:59:35 2015 -0400

    CMakeDetermineCompilerId: Optionally try some flags before no flags
    
    Teach CMAKE_DETERMINE_COMPILER_ID to optionally try detecting the
    compiler id using some given flags before trying to detect it with no
    special flags.  This will be useful for Fortran detection to distinguish
    some compilers that use the preprocessors of others but have no macro of
    their own by getting verbose output.

diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 937aa8c..40d4ce6 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -80,6 +80,7 @@ else()
   # Each entry in this list is a set of extra flags to try
   # adding to the compile line to see if it helps produce
   # a valid identification file.
+  set(CMAKE_C_COMPILER_ID_TEST_FLAGS_FIRST)
   set(CMAKE_C_COMPILER_ID_TEST_FLAGS
     # Try compiling to an object file only.
     "-c"
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 893c454..a673525 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -78,6 +78,7 @@ else()
   # Each entry in this list is a set of extra flags to try
   # adding to the compile line to see if it helps produce
   # a valid identification file.
+  set(CMAKE_CXX_COMPILER_ID_TEST_FLAGS_FIRST)
   set(CMAKE_CXX_COMPILER_ID_TEST_FLAGS
     # Try compiling to an object file only.
     "-c"
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 403ac08..7ddf33f 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -34,7 +34,9 @@ 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(flags "" ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS})
+  foreach(flags ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS_FIRST}
+                ""
+                ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS})
     if(NOT CMAKE_${lang}_COMPILER_ID)
       CMAKE_DETERMINE_COMPILER_ID_BUILD("${lang}" "${flags}" "${src}")
       foreach(file ${COMPILER_${lang}_PRODUCED_FILES})
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 3a27127..ca68900 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -98,6 +98,7 @@ else()
   # Each entry in this list is a set of extra flags to try
   # adding to the compile line to see if it helps produce
   # a valid identification executable.
+  set(CMAKE_Fortran_COMPILER_ID_TEST_FLAGS_FIRST)
   set(CMAKE_Fortran_COMPILER_ID_TEST_FLAGS
     # Try compiling to an object file only.
     "-c"

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

Summary of changes:
 Help/variable/CMAKE_LANG_COMPILER_ID.rst    |    1 +
 Modules/CMakeDetermineCCompiler.cmake       |    1 +
 Modules/CMakeDetermineCXXCompiler.cmake     |    1 +
 Modules/CMakeDetermineCompilerId.cmake      |   34 ++++++++++++++++++++++-----
 Modules/CMakeDetermineFortranCompiler.cmake |    8 +++++++
 Modules/Compiler/CCur-Fortran.cmake         |    1 +
 Modules/Platform/Linux-CCur-Fortran.cmake   |    1 +
 7 files changed, 41 insertions(+), 6 deletions(-)
 create mode 100644 Modules/Compiler/CCur-Fortran.cmake
 create mode 100644 Modules/Platform/Linux-CCur-Fortran.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list