[CMake] How can I avoid the addition of Debug/Release to the link path?

David Cole david.cole at kitware.com
Tue Oct 9 13:31:23 EDT 2007


On 10/9/07, Mike Jackson <imikejackson at gmail.com> wrote:
> I think this is more of an Xcode issue than a Cmake issue. Xcode by
> default will have 2 types of "Configurations", Debug and Release.
> Xcode _will_ make the subdirectories (just like VS) named after the
> configuration. This is hard coded into Xcode and from what I can
> tell, can not be changed.

Actually, for an Xcode project that is not driven by CMake, there is a
"Build Products Path" setting and a "Per-configuration Build Products
Path" setting, both of which have reasonable defaults, but also both
of which can be set in a project's "General" info panel.

The default setting that Xcode uses for "per configuration" settings
typically reference the "$(CONFIGURATION)" variable so that it is easy
to separate build products by configuration. This is why CMake
generates the code that it does...

The problem (from a CMake perspective) is how to go about giving
override control of that setting to CMakeLists.txt files / developers
using CMake. If anybody has a reasonable suggestion of how to achieve
this in a non-Xcode-centric way (i.e., one that also works for Visual
Studio on Windows and makefile generators), please feel free to
continue this discussion here, or better yet, submit a feature request
to the CMake bug tracker.


David Cole


More information about the CMake mailing list