[CMake] set_target_properties - compile flags problem II
"Sören Freudiger"
muffmolch at gmx.de
Sat Nov 21 06:08:38 EST 2009
Okay, after using google again I figured out that unlike LINK_FLAGS_<CONFIG> the COMPILE_FLAG property does not support COMPILE_FLAG_<CONFIG>.
Changing the global CMAKE_CXX_FLAGS_<CONFIG> for that purpose is not an option because I need different flags for different project and different configurations.
The last information was from
Fri Jun 20 09:26:43 EDT 2008
by Bill.
Is there another workaround? Or will this feature be included somewhen?
Cannot be the hardest one. Should some way of copy and paste from the LINK_FLAGS_<CONFIG> :-)
-SirAnn
-----Ursprüngliche Nachricht-----
Von: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] Im Auftrag von "Sören Freudiger"
Gesendet: Samstag, 21. November 2009 11:34
An: cmake at cmake.org
Betreff: [CMake] set_target_properties - compile flags problem
Hello
I'm in big trouble. I cannot change the cxx compile flags as I want.
binary project for VS 2008 - example:
...
ADD_EXECUTABLE( project ${source_files} )
SET_TARGET_PROPERTIES(project PROPERTIES COMPILE_FLAGS_DEBUG "/MTd")
SET_TARGET_PROPERTIES(project PROPERTIES COMPILE_FLAGS_RELEASE "/MT")
-> the resulting flag in my project is still /MD for ALL configrations
changing the flag like:
ADD_EXECUTABLE( project ${source_files} ) SET_TARGET_PROPERTIES(project PROPERTIES COMPILE_FLAGS "/MT")
-> leads to /MT in my project file for ALL configurations
but this would be only a sucking workaround and I really need to have:
/MT for release and /MTd for debug
I also tried this one:
ADD_EXECUTABLE( project ${source_files} ) SET_TARGET_PROPERTIES(project PROPERTIES COMPILE_FLAGS "/MT")
SET_TARGET_PROPERTIES(serial PROPERTIES COMPILE_FLAGS_DEBUG "/MTd")
SET_TARGET_PROPERTIES(serial PROPERTIES COMPILE_FLAGS_RELEASE "/MT")
-> still all configs have /MT only
I think the problem is the predefined CXX_FLAG of CMake "/MD"
Adding "/MT" overwrites the "/MD" but adding different flags for other configurations doesn't has any effects.
What can I do? Any clue?
Best,
SirAnn
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
_______________________________________________
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
--
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser
More information about the CMake
mailing list