summaryrefslogtreecommitdiffstats
path: root/Modules/CheckIncludeFiles.cmake
diff options
context:
space:
mode:
authorNate Eldredge <nate@thatsmathematics.com>2014-08-05 03:00:55 (GMT)
committerBrad King <brad.king@kitware.com>2014-08-05 13:09:58 (GMT)
commitbf89f9103410036c6b09aba79330bb41ad300bcf (patch)
tree98aad6fb1184ccf836791b6d932e7ece4a6dbf95 /Modules/CheckIncludeFiles.cmake
parentba60ff99ed2ea35f8b8c24bc566b6f60d51fce53 (diff)
downloadCMake-bf89f9103410036c6b09aba79330bb41ad300bcf.zip
CMake-bf89f9103410036c6b09aba79330bb41ad300bcf.tar.gz
CMake-bf89f9103410036c6b09aba79330bb41ad300bcf.tar.bz2
CheckIncludeFiles: Use modern C declaration for 'main' (#15058)
Otherwise some compilers will incorrectly fail the checks when certain warning/error flags are enabled.
Diffstat (limited to 'Modules/CheckIncludeFiles.cmake')
-rw-r--r--Modules/CheckIncludeFiles.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake
index eb4cf0d..f8378c0 100644
--- a/Modules/CheckIncludeFiles.cmake
+++ b/Modules/CheckIncludeFiles.cmake
@@ -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)