cget icon indicating copy to clipboard operation
cget copied to clipboard

Consider giving -D defines precedence over default flags

Open thoughton opened this issue 7 years ago • 0 comments

Hi,

I recently tried using --define CMAKE_BUILD_TYPE=Debug on the cget build command line for a simple local project/package, but discovered the resulting binary still had no debug symbols.

After investigation using the --verbose flag I realised that my custom define was propogating to the resulting cmake command line, the problem was that the default -DCMAKE_BUILD_TYPE=Release flag was also being added to the command line after my define and essentially replacing it.

Is it worth considering a change whereby the user's custom commandline defines are always added to the end of the resulting cmake command and thereby always taking precedence?

(This certainly seems like it'd fix my issue of not being able to enable Debug builds on my project, but I don't know if there'd be any other unwanted side-effects...?)

Thanks!

thoughton avatar Apr 02 '18 13:04 thoughton