diff options
author | Brad King <brad.king@kitware.com> | 2010-12-21 18:58:57 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2010-12-21 18:58:57 (GMT) |
commit | d89514f190df4da72f211e760fbe794dec6349bf (patch) | |
tree | 870faa5a74748446ab7e8d9e35be0ab27cd3e4fa /Tests/TryCompile | |
parent | 98d9611ffa962c0f83b2e75983e82383c66cb268 (diff) | |
parent | b3efdb58d5436276b65f1dad396265a6cc742910 (diff) | |
download | CMake-d89514f190df4da72f211e760fbe794dec6349bf.zip CMake-d89514f190df4da72f211e760fbe794dec6349bf.tar.gz CMake-d89514f190df4da72f211e760fbe794dec6349bf.tar.bz2 |
Merge topic 'CheckCCompilerFlag-strict-prototypes'
b3efdb5 CheckCCompilerFlag: Strict signature of 'main' (#11615)
Diffstat (limited to 'Tests/TryCompile')
-rw-r--r-- | Tests/TryCompile/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt index a57498f..90c2cfc 100644 --- a/Tests/TryCompile/CMakeLists.txt +++ b/Tests/TryCompile/CMakeLists.txt @@ -226,3 +226,9 @@ UNSET(CXX_BOGUS_FLAG CACHE) INCLUDE(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG(${CXX_DD}-_this_is_not_a_flag_ CXX_BOGUS_FLAG) TEST_FAIL(CXX_BOGUS_FLAG "CHECK_CXX_COMPILER_FLAG() succeeded, but should have failed") + +IF("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") + UNSET(C_STRICT_PROTOTYPES CACHE) + CHECK_C_COMPILER_FLAG("-Werror;-Wstrict-prototypes" C_STRICT_PROTOTYPES) + TEST_ASSERT(C_STRICT_PROTOTYPES "CHECK_C_COMPILER_FLAG failed -Werror -Wstrict-prototypes") +ENDIF() |