The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15264 ====================================================================== Reported By: Evgeniy Stepanov Assigned To: ====================================================================== Project: CMake Issue ID: 15264 Category: CMake Reproducibility: always Severity: major Priority: normal Status: new ====================================================================== Date Submitted: 2014-11-25 04:22 EST Last Modified: 2014-11-25 04:22 EST ====================================================================== Summary: check_cxx_compiler_flag fails to use linker flags Description: check_cxx_compiler_flag test compilation AND linking of a test source file, but it fails to use linker flags when doing so.
In certain configurations, custom compiler flags used by the project require custom linker flags. For example, if I've got libc++ in a non-standard location, I would use CMAKE_CXX_FLAGS=-stdlib=libc++ CMAKE_EXE_LINKER_FLAGS=-L/path/to/libc++ CMAKE_MODULE_LINKER_FLAGS=-L/path/to/libc++ CMAKE_SHARED_LINKER_FLAGS=-L/path/to/libc++. In this situation, check_cxx_compiler_flag uses compiler flags, but not linker flags, which fails linking if there is no system-wide installation of libc++. See also: http://llvm.org/bugs/show_bug.cgi?id=19071 Note that there is a similar problem with the compiler test ("Check for working CXX compiler"). It uses CMAKE_CXX_FLAGS and env['LDFLAGS']. It does not use any of CMAKE_*_LINKER_FLAGS or env['CXXFLAGS']. It does not make any sense to me. Let me know if I should file it as a separate issue. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2014-11-25 04:22 Evgeniy StepanovNew Issue ====================================================================== -- 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
