dcmqi
dcmqi copied to clipboard
CMake flags set at the superbuild level are not propagated to dcmqi-build inner target
@jcfr as discussed in #247, flags set at cmake configure time for the top-level project are not propagated into dcmqi target. This looks like a bug to me.
Specific example.
Flags passed to cmake at the superbuild level:
$ cmake -DCMAKE_CXX_FLAGS="-g -O0 -fprofile-arcs -ftest-coverage"
-DCMAKE_C_FLAGS="-g -O0 -fprofile-arcs -ftest-coverage"
-DCMAKE_EXE_LINKER_FLAGS="-fprofile-arcs -ftest-coverage"
-DCMAKE_MODULE_LINKER_FLAGS="-fprofile-arcs -ftest-coverage"
-DCMAKE_SHARED_LINKER_FLAGS="-fprofile-arcs -ftest-coverage" ..
Flags visible in ccmake at the superbuild level:

Flags in dcmqi-build inner build directory:

Workaround for this specific situation: set env variables CFLAGS, CXXFLAGS, LDFLAGS.