[CMake] different compiler flags for each executable

Eric Noulard eric.noulard at gmail.com
Wed Apr 28 13:51:58 EDT 2010


2010/4/28 Alex Flint <alex.flint at gmail.com>:
> Hi there,
> Is there a way to add compiler flags (a la CMAKE_CXX_FLAGS) for just one
> particular executable?

Did you try COMPILE_FLAGS property?

set_target_properties(myexe_target
                                PROPERTIES COMPILE_FLAGS "-Wall")



see:
cmake --help-property COMPILE_FLAGS
cmake --help-command set_target_properties


> Cheers,
> Alex
>
>
>
> _______________________________________________
> 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
>



-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list