mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Merge topic 'GNU-4.4-compile-features'
004e1540Features: Record for GNU 4.4.2a5ca650Features: Wrap failure-test in UNIX condition.1ae2c6b2Features: Blacklist cxx_constexpr test for GNU 4.5.c66e3317Features: Use a more-common feature in cycle-test.c43a6dc5Features: Update comment in test to match the code.78259135Features: Test presence of cxx_auto_type with genex.7b9fc88bFeatures: Remove outdated comment.
This commit is contained in:
@@ -25,12 +25,14 @@ if (NOT CMAKE_CXX_COMPILE_FEATURES AND NOT CMAKE_C_COMPILE_FEATURES)
|
||||
)
|
||||
add_executable(WriteCompilerDetectionHeader "${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp")
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
check_cxx_source_compiles("#include \"${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h\"\nint main() { return 0; }\n"
|
||||
file_include_works
|
||||
)
|
||||
if (file_include_works)
|
||||
message(SEND_ERROR "Inclusion of ${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h was expected to cause an error, but did not.")
|
||||
if(UNIX OR NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
include(CheckCXXSourceCompiles)
|
||||
check_cxx_source_compiles("#include \"${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h\"\nint main() { return 0; }\n"
|
||||
file_include_works
|
||||
)
|
||||
if (file_include_works)
|
||||
message(SEND_ERROR "Inclusion of ${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h was expected to cause an error, but did not.")
|
||||
endif()
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user