[CMake] CMake without C/C++ tests

Дима Dimanne at yandex.ru
Fri Jan 28 16:26:01 EST 2011


Thank you very much!
Could you explain me one more time, what should I put in toolchain file to avoid linking with -rdynamic flag?

>You should be able to put _that_ in your toolchain file
What is "that"? The above macro?


28.01.2011, 23:30, "Bill Hoffman" <bill.hoffman at kitware.com>:
> On 1/28/2011 3:07 PM, Дима wrote:
>
>>>  What compiler
>>  Compiler is cross-compiler, gcc port to our arch.
>>>  OS
>>  Both Host and Target OS is Linux.
>>>  -rdynamic will be in all the makefiles anyway
>>  But may be I can override c++ flags using CMAKE_CXX_FLAGS?
>
> Please reply on the list...
>
> No, the rdynamic flag is not in the CMAKE_CXX_FLAGS.   It comes from here:
>
> macro(__linux_compiler_gnu lang)
>    # We pass this for historical reasons.  Projects may have
>    # executables that use dlopen but do not set ENABLE_EXPORTS.
>    set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-rdynamic")
>
> You should be able to put that in your toolchain file if you are doing
> cross compiling.  You are getting the generic linux config.
>
> -Bill


More information about the CMake mailing list