[cmake-developers] Debug through config/gen inside Visual Studio
csiga.biga at aol.com
csiga.biga at aol.com
Wed Sep 14 10:10:02 EDT 2016
Hi everyone!
I wanted to see how CMake actually Works under the covers to see how much actual work it would take to implement a feature I proposed quite a while ago. My problem is that even though I built CMake with the „Visual Studio 14 2015 Win64” generator, I setup the cmake target to use:
Command Arguments: -G "NMake Makefiles" C:\Users\Matty\OneDrive\Develop\Tests\CMake\CMake_example
Working Directory: C:\Users\Matty\Build\CMake_Example\NMake
There is even an option to create new environtment variables prior to debugging. My problem is that even though I checked what vcvarsall.bat creates on the command line, I exported the same variables, but the compiler fails according to CMake (see at the end).
How do you setup Visual Studio to debug through a config/gen process?
Thanks in advance,
Máté
-- The C compiler identification is MSVC 19.0.24213.1
-- The CXX compiler identification is MSVC 19.0.24213.1
-- Check for working C compiler: C:/Kellekek/Microsoft/Visual Studio/14.0/VC/bin/amd64/cl.exe
-- Check for working C compiler: C:/Kellekek/Microsoft/Visual Studio/14.0/VC/bin/amd64/cl.exe -- broken
CMake Error at C:/Users/Matty/Source/Repos/CMake/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "C:/Kellekek/Microsoft/Visual
Studio/14.0/VC/bin/amd64/cl.exe" is not able to compile a simple test
program.
It fails with the following output:
Change Dir: C:/Users/Matty/Build/CMake_Example/NMake/CMakeFiles/CMakeTmp
Run Build Command:"nmake" "/NOLOGO" "cmTC_064d4\fast"
"C:\Kellekek\Microsoft\Visual Studio\14.0\VC\bin\amd64\nmake.exe" -f
CMakeFiles\cmTC_064d4.dir\build.make /nologo -L
CMakeFiles\cmTC_064d4.dir\build
Building C object CMakeFiles/cmTC_064d4.dir/testCCompiler.c.obj
C:\Kellekek\MICROS~1\VISUAL~1\14.0\VC\bin\amd64\cl.exe
@C:\Users\Matty\AppData\Local\Temp\nmBF98.tmp
testCCompiler.c
Linking C executable cmTC_064d4.exe
C:\Users\Matty\Build\CMake\VS14\bin\Debug\cmake.exe -E vs_link_exe
--intdir=CMakeFiles\cmTC_064d4.dir --manifests --
C:\Kellekek\MICROS~1\VISUAL~1\14.0\VC\bin\amd64\link.exe /nologo
@CMakeFiles\cmTC_064d4.dir\objects1.rsp
@C:\Users\Matty\AppData\Local\Temp\nmC1FA.tmp
RC Pass 1 failed to run.
NMAKE : fatal error U1077:
'C:\Users\Matty\Build\CMake\VS14\bin\Debug\cmake.exe' : return code
'0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Kellekek\Microsoft\Visual
Studio\14.0\VC\bin\amd64\nmake.exe"' : return code '0x2'
Stop.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:5 (project)
-- Configuring incomplete, errors occurred!
See also "C:/Users/Matty/Build/CMake_Example/NMake/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Matty/Build/CMake_Example/NMake/CMakeFiles/CMakeError.log".
Press any key to continue . . .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160914/89ce3e71/attachment.html>
More information about the cmake-developers
mailing list