View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0013918 | CMake | CMake | public | 2013-02-14 04:41 | 2016-06-10 14:31 | ||||
Reporter | Petr Kmoch | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | Windows | OS Version | 7 | |||||
Product Version | CMake 2.8.10.2 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0013918: enable_language() sets CMAKE_<lang>_COMPILER_LOADED in local scope | ||||||||
Description | When enable_language(<lang>) is called within a function, it sets the variable CMAKE_<lang>_COMPILER_LOADED within the scope of that function only. This behaviour is rather unexpected, or at least not mentioned in the documentation. | ||||||||
Steps To Reproduce | Run CMake on the attached CMakeList. Expected output: -- C was loaded -- C reports as loaded Actual output: -- C was loaded -- C reports as not loaded | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | ![]() | ||||||||
Relationships | |
Relationships |
Notes | |
(0032280) Brad King (manager) 2013-02-14 08:36 |
The variable gets set as documented here: http://www.cmake.org/cmake/help/v2.8.10/cmake.html#variable:CMAKE_LANG_COMPILER_LOADED [^] but it gets eaten by the function's nested variable scope. As a generalization of my comments in this thread: http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/45460 [^] the language initialization needs an overhaul to be scoped properly. Sending to backlog for now. Use a macro to work around. |
(0042224) Kitware Robot (administrator) 2016-06-10 14:28 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-02-14 04:41 | Petr Kmoch | New Issue | |
2013-02-14 04:41 | Petr Kmoch | File Added: CMakeLists.txt | |
2013-02-14 08:36 | Brad King | Note Added: 0032280 | |
2013-02-14 08:36 | Brad King | Status | new => backlog |
2016-06-10 14:28 | Kitware Robot | Note Added: 0042224 | |
2016-06-10 14:28 | Kitware Robot | Status | backlog => resolved |
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:28 | Kitware Robot | Assigned To | => Kitware Robot |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |