View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
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). | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0013144) Bill Hoffman (manager) 2008-08-21 16:01 |
Seems to be working now. |
(0013145) Bill Hoffman (manager) 2008-08-21 17:00 |
Does not work on linux, but works on windows. |
(0013654) Bill Hoffman (manager) 2008-10-01 13:25 |
cvs commit -m "BUG: fix for bug 4772, enable_language should now work on linux with correct flags" cvs commit: Examining . cvs commit: Examining Platform Committer: Bill Hoffman <bill.hoffman@kitware.com> Committer: Bill Hoffman <bill.hoffman@kitware.com> /cvsroot/CMake/CMake/Modules/CMakeCInformation.cmake,v <-- CMakeCInformation.cmake new revision: 1.23; previous revision: 1.22 /cvsroot/CMake/CMake/Modules/Platform/Linux.cmake,v <-- Platform/Linux.cmake new revision: 1.19; previous revision: 1.18 |
Notes |
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 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |