My CMake inside the Windows Developer Toolchain for C++ used to work fine. But today, CMake cannot even run the configuration.
PS C:\Users\Song\Documents\UDEM\master thesis\uml data\yuml\parser\simple_wc_example\build> cmake ..
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041.
-- The CXX compiler identification is MSVC 19.28.29335.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.20/Modules/CMakeTestCXXCompiler.cmake:59 (message):
The C++ compiler
"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Song/Documents/UDEM/master thesis/uml data/yuml/parser/simple_wc_example/build/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_eab17.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.8.2+25e4d540b for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29335 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /I"C:\src\vcpkg\scripts\buildsystems\msbuild\..\..\..\installed\x64-windows\include" /Zi /Wall /WX- /diagnostics:column /Od /Ob0 /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_eab17.dir\Debug\\" /Fd"cmTC_eab17.dir\Debug\vc142.pdb" /Gd /TP /errorReport:queue -Wno-deprecated-register "C:\Users\Song\Documents\UDEM\master thesis\uml data\yuml\parser\simple_wc_example\build\CMakeFiles\CMakeTmp\testCXXCompiler.cxx"
cl : command line error D8021: invalid numeric argument '/Wno-deprecated-register' [C:\Users\Song\Documents\UDEM\master thesis\uml data\yuml\parser\simple_wc_example\build\CMakeFiles\CMakeTmp\cmTC_eab17.vcxproj]
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)
-- Configuring incomplete, errors occurred!
See also "C:/Users/Song/Documents/UDEM/master thesis/uml data/yuml/parser/simple_wc_example/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Song/Documents/UDEM/master thesis/uml data/yuml/parser/simple_wc_example/build/CMakeFiles/CMakeError.log".
Thanks I found the flag set inside the CMakeLists.txt
Hello, thank you for your response. I'm not aware of setting compiler options throughout my system. How can I check that?
My CMake inside the Windows Developer Toolchain for C++ used to work fine. But today, CMake cannot even run the configuration.
PS C:\Users\Song\Documents\UDEM\master thesis\uml data\yuml\parser\simple_wc_example\build> cmake ..
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041.
-- The CXX compiler identification is MSVC 19.28.29335.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.20/Modules/CMakeTestCXXCompiler.cmake:59 (message):
The C++ compiler
"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Song/Documents/UDEM/master thesis/uml data/yuml/parser/simple_wc_example/build/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_eab17.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.8.2+25e4d540b for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29335 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /I"C:\src\vcpkg\scripts\buildsystems\msbuild\..\..\..\installed\x64-windows\include" /Zi /Wall /WX- /diagnostics:column /Od /Ob0 /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_eab17.dir\Debug\\" /Fd"cmTC_eab17.dir\Debug\vc142.pdb" /Gd /TP /errorReport:queue -Wno-deprecated-register "C:\Users\Song\Documents\UDEM\master thesis\uml data\yuml\parser\simple_wc_example\build\CMakeFiles\CMakeTmp\testCXXCompiler.cxx"
cl : command line error D8021: invalid numeric argument '/Wno-deprecated-register' [C:\Users\Song\Documents\UDEM\master thesis\uml data\yuml\parser\simple_wc_example\build\CMakeFiles\CMakeTmp\cmTC_eab17.vcxproj]
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)
-- Configuring incomplete, errors occurred!
See also "C:/Users/Song/Documents/UDEM/master thesis/uml data/yuml/parser/simple_wc_example/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Song/Documents/UDEM/master thesis/uml data/yuml/parser/simple_wc_example/build/CMakeFiles/CMakeError.log".