MantisBT - CMake | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0004772 | CMake | CMake | public | 2007-04-03 11:39 | 2008-10-01 13:25 | |||||
Reporter | irwin | |||||||||
Assigned To | Bill Hoffman | |||||||||
Priority | normal | Severity | major | Reproducibility | always | |||||
Status | closed | Resolution | fixed | |||||||
Platform | OS | OS Version | ||||||||
Product Version | ||||||||||
Target Version | Fixed in Version | |||||||||
Summary | 0004772: CMAKE_BUILD_TYPE does not work correctly for language enabled with ENABLE_LANGUAGE | |||||||||
Description | The combination PROJECT(free_eos CXX) ENABLE_LANGUAGE(C) defines the correct CXX flags, but blanks the C flags in the cache rather than defining them properly, e.g., //C compiler. CMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc //Flags for C compiler. CMAKE_C_FLAGS:STRING=' ' //Flags used by the compiler during debug builds. CMAKE_C_FLAGS_DEBUG:STRING= //Flags used by the compiler during release minsize builds. CMAKE_C_FLAGS_MINSIZEREL:STRING= //Flags used by the compiler during release builds (/MD /Ob1 /Oi // /Ot /Oy /Gs will produce slightly less optimized but smaller // files). CMAKE_C_FLAGS_RELEASE:STRING= //Flags used by the compiler during Release with Debug Info builds. // CMAKE_C_FLAGS_RELWITHDEBINFO:STRING= With these compile flags blanked, it turns, e.g., CMAKE_BUILD_TYPE=Debug into a no-op for the C language. If I try, instead PROJECT(free_eos C) ENABLE_LANGUAGE(CXX) then the C flags are defined correctly, but the CXX flags are blanked turning, e.g., CMAKE_BUILD_TYPE=Debug into a no-op for the C++ language. I don't know a fix for this bug in ENABLE_LANGUAGE for Linux, and the only workaround is never to use it, and always specify required languages with the PROJECT command (which is awkward if you want to have language support at the user's option). | |||||||||
Steps To Reproduce | ||||||||||
Additional Information | ||||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | ||||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2008-08-21 16:01 | Bill Hoffman | Status | assigned => closed | |||||||
2008-08-21 16:01 | Bill Hoffman | Note Added: 0013144 | ||||||||
2008-08-21 16:01 | Bill Hoffman | Resolution | open => fixed | |||||||
2008-08-21 17:00 | Bill Hoffman | Note Added: 0013145 | ||||||||
2008-08-21 17:00 | Bill Hoffman | Status | closed => assigned | |||||||
2008-08-21 17:01 | Bill Hoffman | Resolution | fixed => reopened | |||||||
2008-10-01 13:25 | Bill Hoffman | Status | assigned => closed | |||||||
2008-10-01 13:25 | Bill Hoffman | Note Added: 0013654 | ||||||||
2008-10-01 13:25 | Bill Hoffman | Resolution | reopened => fixed | |||||||
2009-10-05 11:22 | Brad King | Relationship added | related to 0009656 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|