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                  
 
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to