MantisBT - CMake
View Issue Details
0011615CMakeCMakepublic2010-12-16 12:372011-01-12 07:59
Campbell Barton 
Brad King 
normalminoralways
closedfixed 
Linux 64bitArchArch (rolling)
 
CMake 2.8.4CMake 2.8.4 
0011615: CHECK_C_COMPILER_FLAG Problem, simple fix.
This fails with GCC because the macro compiles "int main() { return 0;}"
Simple fix is to change it to "int main(void) { return 0;}" in CheckCCompilerFlag.cmake

Example:

include(CheckCCompilerFlag)
CHECK_C_COMPILER_FLAG(-Werror=strict-prototypes MYRESULT
No tags attached.
related to 0011753closed James Bigler int main() can cause warnings when -Wstrict-prototypes and -Werror is used 
Issue History
2010-12-16 12:37Campbell BartonNew Issue
2010-12-16 13:24Brad KingAssigned To => Brad King
2010-12-16 13:24Brad KingStatusnew => assigned
2010-12-16 13:37Brad KingNote Added: 0024211
2010-12-16 13:37Brad KingStatusassigned => closed
2010-12-16 13:37Brad KingResolutionopen => fixed
2011-01-12 07:59David ColeFixed in Version => CMake 2.8.4
2011-01-12 07:59David ColeTarget Version => CMake 2.8.4
2011-01-26 08:52Brad KingRelationship addedrelated to 0011753

Notes
(0024211)
Brad King   
2010-12-16 13:37   
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b3efdb58 [^]