| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0015641 | CMake | CMake | public | 2015-07-08 09:27 | 2016-01-04 11:51 | ||||
| Reporter | Nikolay Zapolnov | ||||||||
| Assigned To | Brad King | ||||||||
| Priority | normal | Severity | major | Reproducibility | always | ||||
| Status | closed | Resolution | fixed | ||||||
| Platform | Apple | OS | OSX | OS Version | 10.10.4 | ||||
| Product Version | CMake 3.2.3 | ||||||||
| Target Version | CMake 3.3 | Fixed in Version | CMake 3.3 | ||||||
| Summary | 0015641: In CMake 3.3.0-rc3 macro CHECK_CXX_COMPILER_FLAG is broken on OSX for some flags | ||||||||
| Description | In CMake 3.2.3 the CHECK_CXX_COMPILER_FLAG macro launches compiler and then linker. But tested flag is passed *only* to the compiler and test passes. But in CMake 3.3.0-rc3 argument is passed to *both* the compiler and the linker. This causes an error for some flags, for example for '-x objective-c++'. Passing this flag to the linker makes it recognize .o files as objective-c++ sources and fail. | ||||||||
| Steps To Reproduce | Use the following CMakeLists.txt INCLUDE(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG("-x objective-c++" HAVE_OBJC) This will work correctly in CMake 3.2.3 but in CMake 3.3.0-rc3 HAVE_OBJC will be always false. | ||||||||
| Additional Information | Part of CMakeOutput.log for good case and part of CMakeError.log for broken case are attached to the ticket. | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0039086) Brad King (manager) 2015-07-08 10:01 |
Thanks for testing the release candidate! This problem was introduced by the patch posted here: [PATCH] fix use of CMAKE_REQUIRED_DEFINITIONS http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/12520 [^] and committed here: Check*CompilerFlag: Refactor method used to pass flags http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5d5067ae [^] We'll have to revert it and add a test case for compiler-only flags. |
|
(0039087) Brad King (manager) 2015-07-08 10:07 |
Fixed and test case added: Check*CompilerFlag: Revert to previous method used to pass flags http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a639689c [^] I've queued this for merge to the 'release' branch for 3.3. |
|
(0040089) Robert Maynard (manager) 2016-01-04 11:51 |
Closing resolved issues that have not been updated in more than 4 months. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2015-07-08 09:27 | Nikolay Zapolnov | New Issue | |
| 2015-07-08 09:27 | Nikolay Zapolnov | File Added: good-cmake322.log | |
| 2015-07-08 09:27 | Nikolay Zapolnov | File Added: broken-cmake330rc3.log | |
| 2015-07-08 10:01 | Brad King | Note Added: 0039086 | |
| 2015-07-08 10:01 | Brad King | Assigned To | => Brad King |
| 2015-07-08 10:01 | Brad King | Status | new => assigned |
| 2015-07-08 10:01 | Brad King | Target Version | => CMake 3.3 |
| 2015-07-08 10:07 | Brad King | Note Added: 0039087 | |
| 2015-07-08 10:07 | Brad King | Status | assigned => resolved |
| 2015-07-08 10:07 | Brad King | Resolution | open => fixed |
| 2015-07-08 10:07 | Brad King | Fixed in Version | => CMake 3.3 |
| 2016-01-04 11:51 | Robert Maynard | Note Added: 0040089 | |
| 2016-01-04 11:51 | Robert Maynard | Status | resolved => closed |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |