View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015934 | CMake | CMake | public | 2016-01-26 02:58 | 2016-06-10 14:31 | ||||
Reporter | Guy Harris | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | minor | Reproducibility | N/A | ||||
Status | closed | Resolution | moved | ||||||
Platform | all | OS | all | OS Version | all | ||||
Product Version | CMake 2.8.12.2 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0015934: There's no way to test whether a given *linker* flag works | ||||||||
Description | There are macros to test whether a given *compiler* flag works, such as CHECK_C_COMPILER_FLAG and CHECK_CXX_COMPILER_FLAG. There is no macro to test whether a given *linker* flag works. Furthermore, there does not appear to be a way to do a CHECK_C_SOURCE_RUNS with a given *linker* flag, so there does not appear to be a way to *write* a macro to test whether a given linker flag works. Setting CMAKE_REQUIRED_FLAGS does *not* affect what flags are used with, for example, the Xcode generator; it works with the Unix makefile generator, but that's not sufficient to support multiple build systems. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0040327) Brad King (manager) 2016-01-26 10:09 |
There are some ways to get linker flags through try_compile. Since CMake 2.8.11 the try_compile command supports a LINK_LIBRARIES option that is implemented by calling target_link_libraries in the generated project. This may be able to pass linker flags too. Since CMake 3.2 the try_run command supports the option too. Since CMake 3.2 the CMAKE_EXE_LINKER_FLAGS will be passed. See 0014066:0037379 and policy CMP0056: https://cmake.org/cmake/help/v3.4/policy/CMP0056.html [^] Still, there is no first-class option giving link flags to try_compile. |
(0042921) Kitware Robot (administrator) 2016-06-10 14:29 |
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 |
2016-01-26 02:58 | Guy Harris | New Issue | |
2016-01-26 10:02 | Brad King | Relationship added | related to 0014066 |
2016-01-26 10:09 | Brad King | Note Added: 0040327 | |
2016-06-10 14:29 | Kitware Robot | Note Added: 0042921 | |
2016-06-10 14:29 | Kitware Robot | Status | new => resolved |
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:29 | Kitware Robot | Assigned To | => Kitware Robot |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |