I'm using ExternalProject_Add
to build an external make
-based project. I'd like to propagate flags according to the current build-configuration.
I basically have to following command:
ExternalProject_Add(
...
BUILD_COMMAND make CFLAGS=${CMAKE_C_FLAGS_???}
...
)
and I want to use CMAKE_C_FLAGS_DEBUG
when the project is built in Debug, or whatever the current configuration is. How can that be done? I've tried this, but it doesn't parse:
ExternalProject_Add(
...
BUILD_COMMAND make CFLAGS=${CMAKE_C_FLAGS_$<CONFIG>}
...
)