[CMake] Unix make files and CMAKE_EXE_LINKER_FLAGS_RELEASE

Neal Meyer nmeyer at dottedzebra.com
Tue Feb 24 18:45:10 EST 2009


Philip,
Ok... so it works with the Build_Type thing set, but now with out it.  I
also I'm using XCode sometimes and it doesn't use the linker flags at all.

-Neal



> It could be something simple like
> 1. The CMAKE_EXE_LINKER_FLAGS_<config> variable is somehow not in scope
> when you're calling add_executable()
> 2. Setting CMAKE_EXE_LINKER_FLAGS_MinSizeRel (uppercase config names seems
> to be the only thing that works for me).
> 3. You forgot to set CMAKE_BUILD_TYPE at configure time
>
> Could you try the following small CMakeLists.txt on your system and see if
> it works OK?
>
> ====
> project(Foo)
> cmake_minimum_required(VERSION 2.6)
>
> set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-L/FOO_DEBUG_OK")
> set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-L/FOO_RELEASE_OK")
> set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "-L/FOO_MINSIZEREL_OK")
> set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "-L/FOO_RELWITHDEBINFO_OK")
>
> add_executable(foo foo.cc)
> ====
> cmake -DCMAKE_BUILD_TYPE=Debug
>
>
>
> --
> Philip Lowman
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090224/c8f7976e/attachment.htm>


More information about the CMake mailing list