Open
Description
I have a very simple cross-platform cmake C++ project and I am editing it in visual studio 2019. Creating the CMake cache works perfectly if I remove the vcpkg integration; but fails with a loop of 1000 times if I include the vcpkg integration. I downloaded the current version of vcpkg from GitHub to check that the issue had not been fixed.
I include zipped up the CMake code tree and the very simple code.
There is one CMake included external package simdjson which builds successfully.
googling vcpkg Infinite CMake recursion when compiling yields many other cases of this problem
with vcpkg integrate remove:
1> CMake generation started for configuration: 'x64-Release'.
1> Command line: "cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A x64 -DCMAKE_CONFIGURATION_TYPES:STRING="RelWithDebInfo" -DCMAKE_INSTALL_PREFIX:PATH="C:/Users/tlyons/lyonstech/x64-Release" "C:\Users\tlyons\source\repos\terrylyons\quicktrack" 2>&1"
1> Working directory: C:\Users\tlyons\source\repos\terrylyons\quicktrack\out\build\x64-Release
1> [CMake] -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041.
1> [CMake] -- The CXX compiler identification is MSVC 19.28.29337.0
1> [CMake] -- The C compiler identification is MSVC 19.28.29337.0
1> [CMake] -- Detecting CXX compiler ABI info
1> [CMake] -- Detecting CXX compiler ABI info - done
1> [CMake] -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting CXX compile features
1> [CMake] -- Detecting CXX compile features - done
1> [CMake] -- Detecting C compiler ABI info
1> [CMake] -- Detecting C compiler ABI info - done
1> [CMake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting C compile features
1> [CMake] -- Detecting C compile features - done
1> [CMake] -- The simdjson repository appears to be used as a subdirectory.
1> [CMake] -- By default, we just build the library.
1> [CMake] -- The simdjson repository appears to be under git.
1> [CMake] -- No build type selected, default to Release
1> [CMake] -- Using SIMDJSON_GOOGLE_BENCHMARKS
1> [CMake] -- Looking for pthread.h
1> [CMake] -- Looking for pthread.h - not found
1> [CMake] -- Found Threads: TRUE
1> [CMake] -- Building just the library, omitting all tests, tools and benchmarks.
1> [CMake] -- Building a static library.
1> [CMake] grep and nm are unavailable on this system.
1> [CMake] -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041.
1> [CMake] -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041.
1> [CMake] -- Configuring done
1> [CMake] -- Generating done
1> [CMake] -- Build files have been written to: C:/Users/tlyons/source/repos/terrylyons/quicktrack/out/build/x64-Release
1> Extracted CMake variables.
1> Extracted source files and headers.
1> Extracted code model.
1> Extracted includes paths.
1> CMake generation finished.
with vcpkg integrate install:
1> CMake generation started for configuration: 'x64-Release'.
1> Found and using vcpkg toolchain file (C:/Users/tlyons/source/vcpkg/scripts/buildsystems/vcpkg.cmake).
1> Command line: "cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A x64 -DCMAKE_CONFIGURATION_TYPES:STRING="RelWithDebInfo" -DCMAKE_INSTALL_PREFIX:PATH="C:/Users/tlyons/lyonstech/x64-Release" -DCMAKE_TOOLCHAIN_FILE="C:/Users/tlyons/source/vcpkg/scripts/buildsystems/vcpkg.cmake" "C:\Users\tlyons\source\repos\terrylyons\quicktrack" 2>&1"
1> Working directory: C:\Users\tlyons\source\repos\terrylyons\quicktrack\out\build\x64-Release
1> [CMake] -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041.
1> [CMake] -- The CXX compiler identification is MSVC 19.28.29337.0
1> [CMake] -- The C compiler identification is MSVC 19.28.29337.0
1> [CMake] -- Detecting CXX compiler ABI info
1> [CMake] -- Detecting CXX compiler ABI info - done
1> [CMake] -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting CXX compile features
1> [CMake] -- Detecting CXX compile features - done
1> [CMake] -- Detecting C compiler ABI info
1> [CMake] -- Detecting C compiler ABI info - done
1> [CMake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting C compile features
1> [CMake] -- Detecting C compile features - done
1> [CMake] -- The simdjson repository appears to be used as a subdirectory.
1> [CMake] -- By default, we just build the library.
1> [CMake] -- The simdjson repository appears to be under git.
1> [CMake] -- No build type selected, default to Release
1> [CMake] -- Using SIMDJSON_GOOGLE_BENCHMARKS
1> [CMake] -- Looking for pthread.h
1> [CMake] -- Looking for pthread.h - not found
1> [CMake] -- Found Threads: TRUE
1> [CMake] -- Building just the library, omitting all tests, tools and benchmarks.
1> [CMake] -- Building a static library.
1> [CMake] grep and nm are unavailable on this system.
1> [CMake] -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041.
1> [CMake] CMake Error at C:/Users/tlyons/source/vcpkg/scripts/buildsystems/vcpkg.cmake:166 (_add_executable):
1> [CMake] Maximum recursion depth of 1000 exceeded
1> [CMake] Call Stack (most recent call first):
1> [CMake] C:/Users/tlyons/source/vcpkg/scripts/buildsystems/vcpkg.cmake:166 (_add_executable)
1> [CMake] C:/Users/tlyons/source/vcpkg/scripts/buildsystems/vcpkg.cmake:166 (_add_executable)
1> [CMake] C:/Users/tlyons/source/vcpkg/scripts/buildsystems/vcpkg.cmake:166 (_add_executable)
1> [CMake] C:/Users/tlyons/source/vcpkg/scripts/buildsystems/vcpkg.cmake:166 (_add_executable)
1> [CMake] C:/Users/tlyons/source/vcpkg/scripts/buildsystems/vcpkg.cmake:166 (_add_executable)
..........................................................................................................................................................
1> [CMake] C:/Users/tlyons/source/vcpkg/scripts/buildsystems/vcpkg.cmake:166 (_add_executable)
1> [CMake] C:/Users/tlyons/source/vcpkg/scripts/buildsystems/vcpkg.cmake:166 (_add_executable)
1> [CMake] quicktrack/CMakeLists.txt:9 (add_executable)
1> 'cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A x64 -DCMAKE_CONFIGURATION_TYPES:STRING="RelWithDebInfo" -DCMAKE_INSTALL_PREFIX:PATH="C:/Users/tlyons/lyonstech/x64-Release" -DCMAKE_TOOLCHAIN_FILE="C:/Users/tlyons/source/vcpkg/scripts/buildsystems/vcpkg.cmake" "C:\Users\tlyons\source\repos\terrylyons\quicktrack" 2>&1"' execution failed with error: ''cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A x64 -DCMAKE_CONFIGURATION_TYPES:STRING="RelWithDebInfo" -DCMAKE_INSTALL_PREFIX:PATH="C:/Users/tlyons/lyonstech/x64-Release" -DCMAKE_TOOLCHAIN_FILE="C:/Users/tlyons/source/vcpkg/scripts/buildsystems/vcpkg.cmake" "C:\Users\tlyons\source\repos\terrylyons\quicktrack" 2>&1"' returned with exit code: -1073741819'.