[cmake-commits] king committed CMakeDetermineCompilerId.cmake 1.1.2.4
1.1.2.5 CMakeDetermineCCompiler.cmake 1.38.2.3 1.38.2.4
CMakeDetermineCXXCompiler.cmake 1.33.2.3 1.33.2.4
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue May 1 18:27:34 EDT 2007
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv19358
Modified Files:
Tag: CMake-Modules-CompilerId
CMakeDetermineCompilerId.cmake CMakeDetermineCCompiler.cmake
CMakeDetermineCXXCompiler.cmake
Log Message:
ENH: Added flagvar argument to CMAKE_DETERMINE_COMPILER_ID to choose the environment variable from which to get flags. Made parsing of INFO blocks robust to having more than one in a single string.
Index: CMakeDetermineCXXCompiler.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeDetermineCXXCompiler.cmake,v
retrieving revision 1.33.2.3
retrieving revision 1.33.2.4
diff -u -d -r1.33.2.3 -r1.33.2.4
--- CMakeDetermineCXXCompiler.cmake 27 Apr 2007 14:44:37 -0000 1.33.2.3
+++ CMakeDetermineCXXCompiler.cmake 1 May 2007 22:27:32 -0000 1.33.2.4
@@ -88,7 +88,7 @@
# Try to identify the compiler.
SET(CMAKE_CXX_COMPILER_ID)
INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
- CMAKE_DETERMINE_COMPILER_ID(CXX ${CMAKE_ROOT}/Modules/CMakeCXXCompilerId.cpp)
+ CMAKE_DETERMINE_COMPILER_ID(CXX CXXFLAGS ${CMAKE_ROOT}/Modules/CMakeCXXCompilerId.cpp)
# Set old compiler and platform id variables.
IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
Index: CMakeDetermineCompilerId.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeDetermineCompilerId.cmake,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -d -r1.1.2.4 -r1.1.2.5
--- CMakeDetermineCompilerId.cmake 1 May 2007 22:22:19 -0000 1.1.2.4
+++ CMakeDetermineCompilerId.cmake 1 May 2007 22:27:32 -0000 1.1.2.5
@@ -3,7 +3,7 @@
# used internally by CMake and should not be included by user code.
# If successful, sets CMAKE_<lang>_COMPILER_ID and CMAKE_<lang>_PLATFORM_ID
-MACRO(CMAKE_DETERMINE_COMPILER_ID lang src)
+MACRO(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
# Store the compiler identification source file.
SET(CMAKE_${lang}_COMPILER_ID_SRC "${src}")
IF(WIN32 AND NOT CYGWIN)
@@ -18,7 +18,7 @@
IF(CMAKE_${lang}_FLAGS)
SET(CMAKE_${lang}_COMPILER_ID_FLAGS ${CMAKE_${lang}_FLAGS})
ELSE(CMAKE_${lang}_FLAGS)
- SET(CMAKE_${lang}_COMPILER_ID_FLAGS $ENV{${lang}FLAGS})
+ SET(CMAKE_${lang}_COMPILER_ID_FLAGS $ENV{${flagvar}})
ENDIF(CMAKE_${lang}_FLAGS)
# Create an empty directory in which to run the test.
@@ -81,13 +81,14 @@
FILE(STRINGS ${CMAKE_${lang}_COMPILER_ID_EXE}
CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 2 REGEX "INFO:")
FOREACH(info ${CMAKE_${lang}_COMPILER_ID_STRINGS})
- IF("${info}" MATCHES ".*INFO:compiler\\[(.*)\\].*")
- STRING(REGEX REPLACE ".*INFO:compiler\\[(.*)\\].*" "\\1"
+ IF("${info}" MATCHES ".*INFO:compiler\\[([^]]*)\\].*")
+ STRING(REGEX REPLACE ".*INFO:compiler\\[([^]]*)\\].*" "\\1"
CMAKE_${lang}_COMPILER_ID "${info}")
- ELSEIF("${info}" MATCHES ".*INFO:platform\\[(.*)\\].*")
- STRING(REGEX REPLACE ".*INFO:platform\\[(.*)\\].*" "\\1"
+ ENDIF("${info}" MATCHES ".*INFO:compiler\\[([^]]*)\\].*")
+ IF("${info}" MATCHES ".*INFO:platform\\[([^]]*)\\].*")
+ STRING(REGEX REPLACE ".*INFO:platform\\[([^]]*)\\].*" "\\1"
CMAKE_${lang}_PLATFORM_ID "${info}")
- ENDIF("${info}" MATCHES ".*INFO:compiler\\[(.*)\\].*")
+ ENDIF("${info}" MATCHES ".*INFO:platform\\[([^]]*)\\].*")
ENDFOREACH(info)
# Check the compiler identification string.
Index: CMakeDetermineCCompiler.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeDetermineCCompiler.cmake,v
retrieving revision 1.38.2.3
retrieving revision 1.38.2.4
diff -u -d -r1.38.2.3 -r1.38.2.4
--- CMakeDetermineCCompiler.cmake 27 Apr 2007 14:44:37 -0000 1.38.2.3
+++ CMakeDetermineCCompiler.cmake 1 May 2007 22:27:32 -0000 1.38.2.4
@@ -68,7 +68,7 @@
# Try to identify the compiler.
SET(CMAKE_C_COMPILER_ID)
INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
- CMAKE_DETERMINE_COMPILER_ID(C ${CMAKE_ROOT}/Modules/CMakeCCompilerId.c)
+ CMAKE_DETERMINE_COMPILER_ID(C CFLAGS ${CMAKE_ROOT}/Modules/CMakeCCompilerId.c)
# Set old compiler and platform id variables.
IF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
More information about the Cmake-commits
mailing list