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
[email protected]

--

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