[Cmake-commits] CMake branch, next, updated. v3.1.0-2066-g9fc3a06
Stephen Kelly
steveire at gmail.com
Sat Jan 17 08:47:43 EST 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 9fc3a06c31fe89f9ee3cebe9d4f971398a366633 (commit)
via 652e4a00e7e0da981915e509baf69c74a93e3225 (commit)
via 025fdb46f909cfccb003ac3ae6c69b2e371fc13b (commit)
via 9072a6898d628d13518eedec5bf6496d6c1cde78 (commit)
via 467662dee413f413049d036446023606e067144d (commit)
from 5528f24229ee49e2bb5fab3e7b4e4d117099021f (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=9fc3a06c31fe89f9ee3cebe9d4f971398a366633
commit 9fc3a06c31fe89f9ee3cebe9d4f971398a366633
Merge: 5528f24 652e4a0
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jan 17 08:47:42 2015 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Jan 17 08:47:42 2015 -0500
Merge topic 'SolarisStudio-compile-features' into next
652e4a00 SunPro WCDH.
025fdb46 WCDH: Generate per-language files in multi-file mode.
9072a689 WCDH: Allow compilers to specify features for one language but not the other.
467662de WCDH: Find a language-specific DetermineCompiler.cmake if present.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=652e4a00e7e0da981915e509baf69c74a93e3225
commit 652e4a00e7e0da981915e509baf69c74a93e3225
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jan 17 14:44:38 2015 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jan 17 14:44:38 2015 +0100
SunPro WCDH.
diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake
index a6ff475..e81bc08 100644
--- a/Modules/WriteCompilerDetectionHeader.cmake
+++ b/Modules/WriteCompilerDetectionHeader.cmake
@@ -321,6 +321,7 @@ function(write_compiler_detection_header
GNU
Clang
AppleClang
+ SunPro
)
set(_hex_compilers ADSP Borland Embarcadero SunPro)
diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
index 401de95..b725919 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
+++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
@@ -11,7 +11,7 @@ get_property(c_known_features GLOBAL PROPERTY CMAKE_C_KNOWN_FEATURES)
write_compiler_detection_header(
FILE "${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h"
PREFIX TEST
- COMPILERS GNU Clang AppleClang
+ COMPILERS GNU Clang AppleClang SunPro
VERSION 3.1
PROLOG "// something"
EPILOG "// more"
@@ -58,7 +58,8 @@ endmacro()
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
- OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
+ OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"
+ OR CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
# False for C++98 mode.
list(APPEND false_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS)
list(APPEND false_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES)
@@ -81,7 +82,7 @@ write_compiler_detection_header(
PREFIX MULTI
OUTPUT_FILES_VAR multi_files
OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/compiler_multi_files/compiler_support"
- COMPILERS GNU Clang AppleClang
+ COMPILERS GNU Clang AppleClang SunPro
VERSION 3.1
FEATURES
${cxx_known_features} ${c_known_features}
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=025fdb46f909cfccb003ac3ae6c69b2e371fc13b
commit 025fdb46f909cfccb003ac3ae6c69b2e371fc13b
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jan 17 14:42:08 2015 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jan 17 14:43:38 2015 +0100
WCDH: Generate per-language files in multi-file mode.
Otherwise we generate defines for C/CXX features unguarded by the presence of
the __cplusplus macro and available to the wrong compiler.
diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake
index d9ab9fb..a6ff475 100644
--- a/Modules/WriteCompilerDetectionHeader.cmake
+++ b/Modules/WriteCompilerDetectionHeader.cmake
@@ -419,12 +419,12 @@ function(write_compiler_detection_header
set(file_content "${file_content}\n# ${pp_if} ${prefix_arg}_COMPILER_IS_${compiler}\n")
if(_WCD_OUTPUT_FILES_VAR)
- set(compile_file_name "${_WCD_OUTPUT_DIR}${prefix_arg}_COMPILER_INFO_${compiler}.h")
+ set(compile_file_name "${_WCD_OUTPUT_DIR}${prefix_arg}_COMPILER_INFO_${compiler}_${_lang}.h")
set(file_content "${file_content}\n# include \"${compile_file_name}\"\n")
endif()
if(_WCD_OUTPUT_FILES_VAR)
- set(compiler_file_content compiler_file_content_${compiler})
+ set(compiler_file_content compiler_file_content_${compiler}_${_lang})
else()
set(compiler_file_content file_content)
endif()
@@ -627,16 +627,20 @@ function(write_compiler_detection_header
if(_WCD_OUTPUT_FILES_VAR)
foreach(compiler ${_WCD_COMPILERS})
- set(CMAKE_CONFIGURABLE_FILE_CONTENT "${compiler_file_content_}")
- set(CMAKE_CONFIGURABLE_FILE_CONTENT "${CMAKE_CONFIGURABLE_FILE_CONTENT}${compiler_file_content_${compiler}}")
-
- set(compile_file_name "${_WCD_OUTPUT_DIR}${prefix_arg}_COMPILER_INFO_${compiler}.h")
- set(full_path "${main_file_dir}/${compile_file_name}")
- list(APPEND ${_WCD_OUTPUT_FILES_VAR} ${full_path})
- configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
- "${full_path}"
- @ONLY
- )
+ foreach(_lang ${_langs})
+ if(compiler_file_content_${compiler}_${_lang})
+ set(CMAKE_CONFIGURABLE_FILE_CONTENT "${compiler_file_content_}")
+ set(CMAKE_CONFIGURABLE_FILE_CONTENT "${CMAKE_CONFIGURABLE_FILE_CONTENT}${compiler_file_content_${compiler}_${_lang}}")
+
+ set(compile_file_name "${_WCD_OUTPUT_DIR}${prefix_arg}_COMPILER_INFO_${compiler}_${_lang}.h")
+ set(full_path "${main_file_dir}/${compile_file_name}")
+ list(APPEND ${_WCD_OUTPUT_FILES_VAR} ${full_path})
+ configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
+ "${full_path}"
+ @ONLY
+ )
+ endif()
+ endforeach()
endforeach()
set(${_WCD_OUTPUT_FILES_VAR} ${${_WCD_OUTPUT_FILES_VAR}} PARENT_SCOPE)
endif()
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9072a6898d628d13518eedec5bf6496d6c1cde78
commit 9072a6898d628d13518eedec5bf6496d6c1cde78
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jan 17 14:10:26 2015 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jan 17 14:10:26 2015 +0100
WCDH: Allow compilers to specify features for one language but not the other.
diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake
index 0464e66..d9ab9fb 100644
--- a/Modules/WriteCompilerDetectionHeader.cmake
+++ b/Modules/WriteCompilerDetectionHeader.cmake
@@ -386,6 +386,13 @@ function(write_compiler_detection_header
endif()
foreach(_lang ${_langs})
+ set(target_compilers)
+ foreach(compiler ${_WCD_COMPILERS})
+ _load_compiler_variables(${compiler} ${_lang} ${${_lang}_features})
+ if(_cmake_oldestSupported_${compiler})
+ list(APPEND target_compilers ${compiler})
+ endif()
+ endforeach()
get_property(known_features GLOBAL PROPERTY CMAKE_${_lang}_KNOWN_FEATURES)
foreach(feature ${${_lang}_features})
@@ -408,8 +415,7 @@ function(write_compiler_detection_header
set(file_content "${file_content}${ID_CONTENT}\n")
set(pp_if "if")
- foreach(compiler ${_WCD_COMPILERS})
- _load_compiler_variables(${compiler} ${_lang} ${${_lang}_features})
+ foreach(compiler ${target_compilers})
set(file_content "${file_content}\n# ${pp_if} ${prefix_arg}_COMPILER_IS_${compiler}\n")
if(_WCD_OUTPUT_FILES_VAR)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=467662dee413f413049d036446023606e067144d
commit 467662dee413f413049d036446023606e067144d
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jan 17 14:08:47 2015 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jan 17 14:08:47 2015 +0100
WCDH: Find a language-specific DetermineCompiler.cmake if present.
The SolarisStudio compiler module uses language specific files.
diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake
index d61358f..0464e66 100644
--- a/Modules/WriteCompilerDetectionHeader.cmake
+++ b/Modules/WriteCompilerDetectionHeader.cmake
@@ -234,7 +234,11 @@ function(_load_compiler_variables CompilerId lang)
foreach(feature ${ARGN})
set(_cmake_feature_test_${CompilerId}_${feature} ${_cmake_feature_test_${feature}} PARENT_SCOPE)
endforeach()
- include("${CMAKE_ROOT}/Modules/Compiler/${CompilerId}-DetermineCompiler.cmake" OPTIONAL)
+ include("${CMAKE_ROOT}/Modules/Compiler/${CompilerId}-${lang}-DetermineCompiler.cmake" OPTIONAL
+ RESULT_VARIABLE determinedCompiler)
+ if (NOT determinedCompiler)
+ include("${CMAKE_ROOT}/Modules/Compiler/${CompilerId}-DetermineCompiler.cmake" OPTIONAL)
+ endif()
set(_compiler_id_version_compute_${CompilerId} ${_compiler_id_version_compute} PARENT_SCOPE)
endfunction()
-----------------------------------------------------------------------
Summary of changes:
Modules/WriteCompilerDetectionHeader.cmake | 45 +++++++++++++-------
.../WriteCompilerDetectionHeader/CMakeLists.txt | 7 +--
2 files changed, 34 insertions(+), 18 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list