[cmake-developers] [CMake 0015641]: In CMake 3.3.0-rc3 macro CHECK_CXX_COMPILER_FLAG is broken on OSX for some flags
Mantis Bug Tracker
mantis at public.kitware.com
Wed Jul 8 09:27:24 EDT 2015
The following issue has been SUBMITTED.
======================================================================
https://public.kitware.com/Bug/view.php?id=15641
======================================================================
Reported By: Nikolay Zapolnov
Assigned To:
======================================================================
Project: CMake
Issue ID: 15641
Category: CMake
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2015-07-08 09:27 EDT
Last Modified: 2015-07-08 09:27 EDT
======================================================================
Summary: 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.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2015-07-08 09:27 Nikolay ZapolnovNew Issue
2015-07-08 09:27 Nikolay ZapolnovFile Added: good-cmake322.log
======================================================================
More information about the cmake-developers
mailing list