summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-05-16 14:21:08 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-05-16 14:21:08 (GMT)
commit61856c8011bf7d14712cdad3842d177a002fd3ee (patch)
tree4faaaa86e91b9019648eba1aaa46d5069935ea0d
parent567ca4c79ecfa5665c475d9176d682908bade012 (diff)
parentf6f1095413772e5d52f6699ff7324180e30f5c35 (diff)
downloadCMake-61856c8011bf7d14712cdad3842d177a002fd3ee.zip
CMake-61856c8011bf7d14712cdad3842d177a002fd3ee.tar.gz
CMake-61856c8011bf7d14712cdad3842d177a002fd3ee.tar.bz2
Merge topic 'minor-cleanups'
f6f10954 Features: Use the features symbol in the feature-test compile. 5c04dfe4 Features: Only require AppleClang policy to be NEW on APPLE.
-rw-r--r--Modules/Compiler/Clang-CXX.cmake2
-rw-r--r--Modules/Internal/FeatureTesting.cmake2
2 files changed, 2 insertions, 2 deletions
diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake
index a1b3a10..0409c24 100644
--- a/Modules/Compiler/Clang-CXX.cmake
+++ b/Modules/Compiler/Clang-CXX.cmake
@@ -6,7 +6,7 @@ if(NOT CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
endif()
cmake_policy(GET CMP0025 appleClangPolicy)
-if(NOT appleClangPolicy STREQUAL NEW)
+if(APPLE AND NOT appleClangPolicy STREQUAL NEW)
return()
endif()
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}"