Hi!

I'd like to call the c-compiler by hand as pre-link step to compile in the current svn version.

on windows i first separate the arguments

separate_arguments(CFLAGS WINDOWS_COMMAND "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} /c")

and then I do

add_custom_command(TARGET MyProject PRE_LINK
COMMAND ${CMAKE_CXX_COMPILER} ${CFLAGS} "${CMAKE_CURRENT_SOURCE_DIR}/VersionInfo.cpp"
    VERBATIM
)

Now the problem: currently CMAKE_CXX_FLAGS_DEBUG is hard-coded. how can i substitute it with the current configuration? If it is release then the contents of CMAKE_CXX_FLAGS_RELEASE should
be taken.

-Jochen

_______________________________________________
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

Reply via email to