[Cmake-commits] CMake branch, next, updated. v3.0.0-rc5-3166-gcad5ad5
Stephen Kelly
steveire at gmail.com
Thu May 15 13:38:47 EDT 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 cad5ad5449d2f9ff87997c75a760592e9e48c6b0 (commit)
via f6f1095413772e5d52f6699ff7324180e30f5c35 (commit)
from e8f8000289ea812e8f97d58940bbec218c34e4ac (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=cad5ad5449d2f9ff87997c75a760592e9e48c6b0
commit cad5ad5449d2f9ff87997c75a760592e9e48c6b0
Merge: e8f8000 f6f1095
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu May 15 13:38:47 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu May 15 13:38:47 2014 -0400
Merge topic 'minor-cleanups' into next
f6f10954 Features: Use the features symbol in the feature-test compile.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f6f1095413772e5d52f6699ff7324180e30f5c35
commit f6f1095413772e5d52f6699ff7324180e30f5c35
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed May 14 23:56:53 2014 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Thu May 15 19:38:25 2014 +0200
Features: Use the features symbol in the feature-test compile.
Clang discards the entire string if it is not used, removing
the ability to read the features from the compiled binary. That
is prevented by using the symbol.
GNU with -O3 also discards the string, so use the string in a
way which is determined by a runtime value (argc) to prevent
it being discarded.
diff --git a/Modules/Internal/FeatureTesting.cmake b/Modules/Internal/FeatureTesting.cmake
index 7bf6d91..abd9a26 100644
--- a/Modules/Internal/FeatureTesting.cmake
+++ b/Modules/Internal/FeatureTesting.cmake
@@ -20,7 +20,7 @@ macro(record_compiler_features lang compile_flags feature_list)
endif()
endforeach()
file(APPEND "${CMAKE_BINARY_DIR}/CMakeFiles/feature_tests.${lang_lc}"
- "\n};\n\nint main() { return 0; }\n")
+ "\n};\n\nint main(int argc, char** argv) { (void)argv; return features[argc]; }\n")
try_compile(CMAKE_${lang}_FEATURE_TEST
${CMAKE_BINARY_DIR} "${CMAKE_BINARY_DIR}/CMakeFiles/feature_tests.${lang_lc}"
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list