View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0007340 | CMake | CMake | public | 2008-07-15 13:18 | 2008-07-16 11:06 | ||||
Reporter | Yuri | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake-2-6 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0007340: Can't call TRY_COMPILE before PROJECT directive. | ||||||||
Description | To tune compiler and linker options I want to use CMAKE_USER_MAKE_RULES_OVERRIDE variable (in addition to ones provided by CMake). To determine whether compiler supports particular flags I use TRY_COMPILE command. This works in cmake-2.4.8 but fails in cmake 2.6.0. See examples attached. | ||||||||
Additional Information | I suppose this is caused by splitting EnableLanguage logic in CMake 2.6. cmGlobalGenerator::EnableLanguage function: In 2.4 after CMake(LANG)Compiler.cmake processed language becomes enabled and LanguageToOutputExtension map filled before processing CMake(LANG)Information.cmake where custom rules are called from. In 2.6 after first stage, SetLanguageEnabledFlag called but LanguageToOutputExtension stays clean while CMake(LANG)Information.cmake is being processed, so nested call to ReadListFile() fails to get language by extension. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | CompilerTest.zip [^] (507 bytes) 2008-07-15 13:18 | ||||||||
Relationships | |
Relationships |
Notes | |
(0012722) Brad King (manager) 2008-07-16 11:05 |
The extension-to-language map must be filled before loading CMake<LANG>Information.cmake since that file includes the user-override files. It must be filled after loading that file since it includes the compiler- and platform-specific settings. The solution is to just fill it both before and after. Fixed: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v <-- Source/cmGlobalGenerator.cxx new revision: 1.237; previous revision: 1.236 /cvsroot/CMake/CMake/Source/cmGlobalGenerator.h,v <-- Source/cmGlobalGenerator.h new revision: 1.113; previous revision: 1.112 |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2008-07-15 13:18 | Yuri | New Issue | |
2008-07-15 13:18 | Yuri | File Added: CompilerTest.zip | |
2008-07-15 13:36 | Bill Hoffman | Status | new => assigned |
2008-07-15 13:36 | Bill Hoffman | Assigned To | => Alex Neundorf |
2008-07-16 11:03 | Brad King | Assigned To | Alex Neundorf => Brad King |
2008-07-16 11:05 | Brad King | Note Added: 0012722 | |
2008-07-16 11:06 | Brad King | Status | assigned => closed |
2008-07-16 11:06 | Brad King | Resolution | open => fixed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |