MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0008851 | CMake | CMake | public | 2009-04-06 10:59 | 2016-06-10 14:30 |
| Reporter | Alexandre Feblot | ||||
| Assigned To | Bill Hoffman | ||||
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | closed | Resolution | moved | ||
| Platform | OS | OS Version | |||
| Product Version | |||||
| Target Version | Fixed in Version | ||||
| Summary | 0008851: Allow to globally set which compiler to use with a given file extension | ||||
| Description | CMAKE_CXX_SOURCE_FILE_EXTENSIONS and CMAKE_C_SOURCE_FILE_EXTENSIONS are currently read-only variables, as they are: - overwritten by project() or enable_language() if they are set before calling these functions. - not taken into account anymore after calling these functions. So the current and ugly way to let cmake know that you want, let's say all .c files considered as C++ is to set the LANGUAGE property for all of them. Modifications to CMAKE_CXX_SOURCE_FILE_EXTENSIONS and CMAKE_C_SOURCE_FILE_EXTENSIONS values should be honored after calling project() or enable_language(). Typical use case: project(MY_PROJECT C CXX) # also add "C" because a specific lib might need to be compiled in pure C. list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSIONS "c") list(REMOVE_ITEM CMAKE_C_SOURCE_FILE_EXTENSIONS "c") add_subdirectory(...) | ||||
| Steps To Reproduce | |||||
| Additional Information | |||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2009-04-06 10:59 | Alexandre Feblot | New Issue | |||
| 2009-04-06 11:03 | Bill Hoffman | Status | new => assigned | ||
| 2009-04-06 11:03 | Bill Hoffman | Assigned To | => Bill Hoffman | ||
| 2015-06-02 07:04 | FlorianM | Note Added: 0038873 | |||
| 2015-06-02 07:07 | FlorianM | Note Edited: 0038873 | bug_revision_view_page.php?bugnote_id=38873#r1794 | ||
| 2015-06-02 07:08 | FlorianM | Note Edited: 0038873 | bug_revision_view_page.php?bugnote_id=38873#r1795 | ||
| 2015-06-02 07:15 | FlorianM | Note Edited: 0038873 | bug_revision_view_page.php?bugnote_id=38873#r1796 | ||
| 2016-06-10 14:27 | Kitware Robot | Note Added: 0041538 | |||
| 2016-06-10 14:27 | Kitware Robot | Status | assigned => resolved | ||
| 2016-06-10 14:27 | Kitware Robot | Resolution | open => moved | ||
| 2016-06-10 14:30 | Kitware Robot | Status | resolved => closed | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||