From bf89f9103410036c6b09aba79330bb41ad300bcf Mon Sep 17 00:00:00 2001 From: Nate Eldredge Date: Mon, 4 Aug 2014 21:00:55 -0600 Subject: [PATCH] CheckIncludeFiles: Use modern C declaration for 'main' (#15058) Otherwise some compilers will incorrectly fail the checks when certain warning/error flags are enabled. --- Modules/CheckIncludeFiles.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake index eb4cf0dd2..f8378c0e0 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)