[CMake] Setting special visual studio options from CMake

Tyler tyler at cryptio.net
Wed May 18 11:07:47 EDT 2011


I think CMAKE_SHARED_LINKER_FLAGS is a cache variables, so you need to
use the CACHE flag (and probably the FORCE flag) to set(). You can
verify this by inspecting ${CMAKE_BINARY_DIR}/CMakeCache.txt. Consult
the docs for more details.

tyler

On Wed, May 18, 2011 at 6:32 AM, Gerhard Gappmeier
<gerhard.gappmeier at ascolab.com> wrote:
> Hi,
>
> for one project I need to set special linker options in Visual Studio.
> I tried this:
> SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /BASE:0x61000000
> /DYNAMICBASE:NO /FIXED")
>
> but the generated project now shows my options in the "Additional options"
> section,
> and still shows the default settings like "/DYNAMICBASE" in the advanced
> section.
>
> It compiles and links without error, but I don't think the result is
> correct.
> Any ideas how these settings could be set from CMake?
>
> --
> mit freundlichen Grüßen / best regards
>
> Gerhard Gappmeier
> ascolab GmbH - automation systems communication laboratory
> Tel.: +49 9131 691 123
> Fax: +49 9131 691 128
> Web: http://www.ascolab.com
> GPG-KeyId: 5AAC50C4
> GPG-Fingerprint: 967A 15F1 2788 164D CCA3 6C46 07CD 6F82 5AAC 50C4
>
> --
> ascolab GmbH
> Geschäftsführer: Gerhard Gappmeier, Matthias Damm, Uwe Steinkrauß
> Sitz der Gesellschaft: Am Weichselgarten 7 • 91058 Erlangen • Germany
> Registernummer: HRB 9360
> Registergericht: Amtsgericht Fürth
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>


More information about the CMake mailing list