Right now, there is quite a complicated scheme based on what CMAKE_BUILD_TYPE is -- Debug, Release, or DebugRelease. This leads to lengthy convolutions, but most of this can be avoided if we simply always set up debug and release targets, and in only one place actually consider CMAKE_BUILD_TYPE: There, we have to decide whether we want to set EXCLUDE_FROM_ALL for a specific target. That's because if you just call make, it builds the target ALL, which by default contains all other top-level targets. But we can set EXCLUDE_FROM_ALL on those targets we don't want to be dealt with by default. This creates 2x as many targets as perhaps necessary, but that shouldn't be too much of a problem since half of them will not actually be built.
Right now, there is quite a complicated scheme based on what
CMAKE_BUILD_TYPE
is --Debug
,Release
, orDebugRelease
. This leads to lengthy convolutions, but most of this can be avoided if we simply always set up debug and release targets, and in only one place actually considerCMAKE_BUILD_TYPE
: There, we have to decide whether we want to setEXCLUDE_FROM_ALL
for a specific target. That's because if you just callmake
, it builds the targetALL
, which by default contains all other top-level targets. But we can setEXCLUDE_FROM_ALL
on those targets we don't want to be dealt with by default. This creates 2x as many targets as perhaps necessary, but that shouldn't be too much of a problem since half of them will not actually be built.