[CMake] add_custom_command, TARGET_LINKER_FILE and CMAKE_BUILD_TYPE
Romain LEGUAY
romain.leguay at gmail.com
Mon Sep 30 11:00:50 EDT 2013
Hello everyonne,
I try to build my lybrary in debug and release mode in only one command.
The purpose is to create a package with the minimum files (library in
debug and release mode and headers) inside it.
Actually, I do something like this:
add_custom_command(OUTPUT build_release_debug_lib
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy $<TARGET_LINKER_FILE:myLib> ${CMAKE_CURRENT_BINARY_DIR}/lib)
I don't know how to add a new command to specify the CMAKE_BUILD_TYPE.
Is it possible?
Thank you!
Regards,
Romain
More information about the CMake
mailing list