mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-07 15:49:43 -06:00
CheckIncludeFiles: Use modern C declaration for 'main' (#15058)
Otherwise some compilers will incorrectly fail the checks when certain warning/error flags are enabled.
This commit is contained in:
@@ -53,7 +53,7 @@ macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
|
||||
"${CMAKE_CONFIGURABLE_FILE_CONTENT}#include <${FILE}>\n")
|
||||
endforeach()
|
||||
set(CMAKE_CONFIGURABLE_FILE_CONTENT
|
||||
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n\nint main(){return 0;}\n")
|
||||
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n\nint main(void){return 0;}\n")
|
||||
configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.c" @ONLY)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user