[CMake] Mixing non-CMake ExternalProjects using Visual Studio
Braden McDaniel
braden at endoframe.com
Mon Apr 1 14:02:59 EDT 2013
When mixing a CMake Visual Studio build that has ExternalProjects (that is, via ExternalProject_Add) that use non-CMake makefile builds, how does one resolve the mismatch between the *_<config> variables (CMAKE_CXX_FLAGS_RELEASE, etc.)?
Specifically, how do I propagate the build flags in the *_<config> variables down to the ExternalProject? I can't seem to find a way in CMake that will let me pick which variable to propagate (that is, CMAKE_CXX_FLAGS_DEBUG when I'm building the Debug configuration, CMAKE_CXX_FLAGS_RELEASE when building the Release configuration, etc.).
One option seems to be just to build the makefile-based ExternalProject four times--one for each configuration CMake generates in its project files. But that, too, has a problem: what if the makefile-based ExternalProject has a dependency on another ExternalProject with a CMake build?
Are there any good solutions to these sorts of problems?
--
Braden McDaniel
braden at endoframe.com
More information about the CMake
mailing list