| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0015550 | CMake | CMake | public | 2015-05-01 13:26 | 2015-11-02 09:15 | ||||
| Reporter | Daniel Schepler | ||||||||
| Assigned To | |||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||
| Status | closed | Resolution | duplicate | ||||||
| Platform | Debian | OS | Linux | OS Version | stretch | ||||
| Product Version | CMake 3.2.2 | ||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0015550: check_cxx_source_compiles() does not honor CMAKE_CXX_STANDARD | ||||||||
| Description | In a project I recently converted to use set(CMAKE_CXX_STANDARD 11) instead of the previous hard coding of -std=* compile flags in cxx_flag_overrides.cmake, I just noticed that our test for std::unordered_map<> broke. | ||||||||
| Steps To Reproduce | set(CMAKE_CXX_STANDARD 11) check_cxx_source_compiles( "#include <unordered_map> int main() { std::unordered_map<int, int> m; return m.size(); }" HAVE_STD_UNORDERED_MAP) | ||||||||
| Additional Information | I can work around that with set(CMAKE_REQUIRED_FLAGS ${CMAKE_CXX11_EXTENSION_COMPILE_OPTION}) . That seems a bit ugly, though. I'm not sure what a proper "fix" to this would be. My ideas would be adding *_STANDARD arguments to try_compile() which might not quite be scalable; or maybe having check_cxx_source_compiles add -DCMAKE_CXX_STANDARD=... to the CMAKE_FLAGS it passes to try_compile(), based on CMAKE_CXX_STANDARD which could be overridden by setting CMAKE_REQUIRED_CXX_STANDARD which also seems like it might not be the best possible solution. | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
| Relationships | ||||||
|
||||||
| Relationships |
| Notes | |
|
(0038675) Brad King (manager) 2015-05-01 13:30 |
See 0015361:0037760. |
|
(0039799) Robert Maynard (manager) 2015-11-02 09:15 |
Closing resolved issues that have not been updated in more than 4 months. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2015-05-01 13:26 | Daniel Schepler | New Issue | |
| 2015-05-01 13:29 | Brad King | Relationship added | duplicate of 0015361 |
| 2015-05-01 13:30 | Brad King | Note Added: 0038675 | |
| 2015-05-01 13:30 | Brad King | Status | new => resolved |
| 2015-05-01 13:30 | Brad King | Resolution | open => duplicate |
| 2015-11-02 09:15 | Robert Maynard | Note Added: 0039799 | |
| 2015-11-02 09:15 | Robert Maynard | Status | resolved => closed |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |