[cmake-developers] [CMake 0011615]: CHECK_C_COMPILER_FLAG Problem, simple fix.

Mantis Bug Tracker mantis at public.kitware.com
Thu Dec 16 12:37:39 EST 2010


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=11615 
====================================================================== 
Reported By:                Campbell Barton
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   11615
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2010-12-16 12:37 EST
Last Modified:              2010-12-16 12:37 EST
====================================================================== 
Summary:                    CHECK_C_COMPILER_FLAG Problem, simple fix.
Description: 
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
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-12-16 12:37 Campbell BartonNew Issue                                    
======================================================================




More information about the cmake-developers mailing list