MantisBT - CMake
View Issue Details
0016010CMakeCMakepublic2016-03-10 10:332016-06-10 14:31
Klaus R 
Kitware Robot 
normalminoralways
closedmoved 
Apple MacOS X10.4.10
CMake 3.5 
 
0016010: cmake with clang sanitizers fails
I tried to rebuild XCode projects with cmake 3.5.0. Failed to work if clang sanitizers were enabled, most likely because the optiones necessary for linking sanitized binaries were not passed to the linker.
if( WITH_SANITIZER )
    ## http://clang.llvm.org/docs/AddressSanitizer.html [^]
    set(SANITIZERS "-fsanitize=address -fno-omit-frame-pointer")
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SANITIZERS}")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SANITIZERS}")
    set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${SANITIZERS}" )
    set(CMAKE_MODULE_LINKER_FLAGS_INIT "${CMAKE_MODULE_LINKER_FLAGS_INIT} ${SANITIZERS}" )
    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${SANITIZERS}" )
endif()
Workaround was to revert to previous 3.4 version
No tags attached.
Issue History
2016-03-10 10:33Klaus RNew Issue
2016-03-10 11:17Brad KingNote Added: 0040658
2016-03-11 02:44Klaus RNote Added: 0040659
2016-06-10 14:29Kitware RobotNote Added: 0042961
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0040658)
Brad King   
2016-03-10 11:17   
I cannot reproduce this failure. Please provide a complete minimal source tarball that shows the problem.
(0040659)
Klaus R   
2016-03-11 02:44   
ok, proved not to be soo easy, but I work on it.
(0042961)
Kitware Robot   
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.