Is there a sensible way to get a CMake variable containing the build command or all the compiler flags that CMake will associate with a target?
It doesn't seem practical to try to gather and maintain a list of all properties that could add flags. Besides, CMake must have this info somewhere, since it has to eventually generate a build system.
From the CMake docs it looks like this feature once existed and was provided by calling build_command()
but this was replaced:
Note In CMake versions prior to 3.0 this command returned a command line that directly invokes the native build tool for the current generator.
Is there a new command that gives the old behavior of build_command()
?