[CMake] Debugging custom commands with VS project generator

James Turner james.turner at kdab.com
Thu Jun 22 06:02:47 EDT 2017


Hi,

We’re trying to debug a failure of a custom build command, in a Cmake project using Visual Studio 2015. Unfortunately the command works on some Windows setups but not others - clearly there is something install-dependent going on. (It works on my local machine, but not on our Jenkins build server)

Unfortunately, when the command fails, the only output is:

	(CustomBuild target) -> 
  C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code -1073741511. [G:\Jenkins\workspace\FlightGear-Win\build32\src\Main\fgfs.vcxproj]


(Full log is visible here: http://build.flightgear.org:8080/job/FlightGear-Win/2867/console )

The relevant Cmake file is here:

	https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/src/Main/CMakeLists.txt#l46

Is there any way to get more output from the custom command invocation? Prior to this failure, we had a different issue with missing DLLs, which we fixed by setting PATH via the ‘CMAKE_MSVCIDE_RUN_PATH’ value - this worked fine, so we think the command is running. And the ‘missing DLL’ error was reported + logged clearly in the console, unlike the current failure.

I have tried setting VERBOSE=1 but I expect this doesn’t work with the VS generator? Any other way to get the stdout / stderr of the failing custom command would help.

Kind regards,
James


More information about the CMake mailing list