diff options
author | Brad King <brad.king@kitware.com> | 2023-12-13 20:49:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-01-03 21:22:50 (GMT) |
commit | 03e16701664f33e7682780d176b58d5ff7ada49c (patch) | |
tree | a9b731b602e25258f9966e200461e9283290bfc8 /Tests | |
parent | 0523cc501dfb0107fee71359bcd4780fb4dea731 (diff) | |
download | CMake-03e16701664f33e7682780d176b58d5ff7ada49c.zip CMake-03e16701664f33e7682780d176b58d5ff7ada49c.tar.gz CMake-03e16701664f33e7682780d176b58d5ff7ada49c.tar.bz2 |
Tests: Cover detection of linker tool for MSVC
Cover both Ninja and Visual Studio generators.
Diffstat (limited to 'Tests')
9 files changed, 148 insertions, 0 deletions
diff --git a/Tests/RunCMake/ParseImplicitData/windows_x86_64-C-MSVC-19.36.32543.0.input b/Tests/RunCMake/ParseImplicitData/windows_x86_64-C-MSVC-19.36.32543.0.input new file mode 100644 index 0000000..cc73ff7 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitData/windows_x86_64-C-MSVC-19.36.32543.0.input @@ -0,0 +1,19 @@ +CMAKE_LANG=C +CMAKE_LINKER=C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/link.exe +CMAKE_C_COMPILER_ABI= +CMAKE_C_COMPILER_AR= +CMAKE_C_COMPILER_ARCHITECTURE_ID=x64 +CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN= +CMAKE_C_COMPILER_ID=MSVC +CMAKE_C_COMPILER_LAUNCHER= +CMAKE_C_COMPILER_LOADED=1 +CMAKE_C_COMPILER_RANLIB= +CMAKE_C_COMPILER_TARGET= +CMAKE_C_COMPILER_VERSION=19.36.32543.0 +CMAKE_C_COMPILER_VERSION_INTERAL= +CMAKE_HOST_SYSTEM_NAME=Windows +Change Dir: 'C:/DoesNotExist/Temp/CMakeFiles/CMakeTmp' + +Run Build Command(s): C:/DoesNotExist/ninja/bin/ninja.exe -v cmTC_ccd96 +[1/2] C:\PROGRA~1\MIB055~1\2022\PROFES~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe /nologo /DWIN32 /D_WINDOWS /W3 /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\cmTC_ccd96.dir\CMakeCCompilerABI.c.obj /FdCMakeFiles\cmTC_ccd96.dir\ /FS -c "C:\DoesNotExist\CMake\Modules\CMakeCCompilerABI.c" +[2/2] C:\Windows\system32\cmd.exe /C "cd . && "C:\DoesNotExist\CMake\build\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_ccd96.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests -- C:\PROGRA~1\MIB055~1\2022\PROFES~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_ccd96.dir\CMakeCCompilerABI.c.obj /out:cmTC_ccd96.exe /implib:cmTC_ccd96.lib /pdb:cmTC_ccd96.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ." diff --git a/Tests/RunCMake/ParseImplicitData/windows_x86_64-C-MSVC-19.38.33130.0-VS.input b/Tests/RunCMake/ParseImplicitData/windows_x86_64-C-MSVC-19.38.33130.0-VS.input new file mode 100644 index 0000000..77bae76 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitData/windows_x86_64-C-MSVC-19.38.33130.0-VS.input @@ -0,0 +1,48 @@ +CMAKE_LANG=C +CMAKE_LINKER=C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/link.exe +CMAKE_C_COMPILER_ABI= +CMAKE_C_COMPILER_AR= +CMAKE_C_COMPILER_ARCHITECTURE_ID=x64 +CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN= +CMAKE_C_COMPILER_ID=MSVC +CMAKE_C_COMPILER_LAUNCHER= +CMAKE_C_COMPILER_LOADED=1 +CMAKE_C_COMPILER_RANLIB= +CMAKE_C_COMPILER_TARGET= +CMAKE_C_COMPILER_VERSION=19.38.33130.0 +CMAKE_C_COMPILER_VERSION_INTERAL= +CMAKE_HOST_SYSTEM_NAME=Windows +Change Dir: 'C:/DoesNotExist/Temp/CMakeFiles/CMakeTmp' + +Run Build Command(s): "C:/Program Files/Microsoft Visual Studio/2022/Professional/MSBuild/Current/Bin/amd64/MSBuild.exe" cmTC_7cc99.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:n +MSBuild version 17.8.3+195e7f5a3 for .NET Framework +Build started 12/14/2023 11:53:27 AM. + +Project "C:\DoesNotExist\Temp\CMakeFiles\CMakeTmp\cmTC_7cc99.vcxproj" on node 1 (default targets). +PrepareForBuild: + Creating directory "cmTC_7cc99.dir\Debug\". + Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://aka.ms/cpp/structured-output for more details. + Creating directory "C:\DoesNotExist\Temp\CMakeFiles\CMakeTmp\Debug\". + Creating directory "cmTC_7cc99.dir\Debug\cmTC_7cc99.tlog\". +InitializeBuildStatus: + Creating "cmTC_7cc99.dir\Debug\cmTC_7cc99.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified. + Touching "cmTC_7cc99.dir\Debug\cmTC_7cc99.tlog\unsuccessfulbuild". +ClCompile: + C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_7cc99.dir\Debug\\" /Fd"cmTC_7cc99.dir\Debug\vc143.pdb" /external:W3 /Gd /TC /errorReport:queue "C:\DoesNotExist\CMake\Modules\CMakeCCompilerABI.c" + Microsoft (R) C/C++ Optimizing Compiler Version 19.38.33130 for x64 + Copyright (C) Microsoft Corporation. All rights reserved. + cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_7cc99.dir\Debug\\" /Fd"cmTC_7cc99.dir\Debug\vc143.pdb" /external:W3 /Gd /TC /errorReport:queue "C:\DoesNotExist\CMake\Modules\CMakeCCompilerABI.c" + CMakeCCompilerABI.c +Link: + C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\DoesNotExist\Temp\CMakeFiles\CMakeTmp\Debug\cmTC_7cc99.exe" /INCREMENTAL /ILK:"cmTC_7cc99.dir\Debug\cmTC_7cc99.ilk" /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:/DoesNotExist/Temp/CMakeFiles/CMakeTmp/Debug/cmTC_7cc99.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/DoesNotExist/Temp/CMakeFiles/CMakeTmp/Debug/cmTC_7cc99.lib" /MACHINE:X64 /machine:x64 cmTC_7cc99.dir\Debug\CMakeCCompilerABI.obj + cmTC_7cc99.vcxproj -> C:\DoesNotExist\Temp\CMakeFiles\CMakeTmp\Debug\cmTC_7cc99.exe +FinalizeBuildStatus: + Deleting file "cmTC_7cc99.dir\Debug\cmTC_7cc99.tlog\unsuccessfulbuild". + Touching "cmTC_7cc99.dir\Debug\cmTC_7cc99.tlog\cmTC_7cc99.lastbuildstate". +Done Building Project "C:\DoesNotExist\Temp\CMakeFiles\CMakeTmp\cmTC_7cc99.vcxproj" (default targets). + +Build succeeded. + 0 Warning(s) + 0 Error(s) + +Time Elapsed 00:00:00.86 diff --git a/Tests/RunCMake/ParseImplicitData/windows_x86_64-CXX-MSVC-19.36.32543.0.input b/Tests/RunCMake/ParseImplicitData/windows_x86_64-CXX-MSVC-19.36.32543.0.input new file mode 100644 index 0000000..5575537 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitData/windows_x86_64-CXX-MSVC-19.36.32543.0.input @@ -0,0 +1,19 @@ +CMAKE_LANG=CXX +CMAKE_LINKER=C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/link.exe +CMAKE_CXX_COMPILER_ABI= +CMAKE_CXX_COMPILER_AR= +CMAKE_CXX_COMPILER_ARCHITECTURE_ID=x64 +CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN= +CMAKE_CXX_COMPILER_ID=MSVC +CMAKE_CXX_COMPILER_LAUNCHER= +CMAKE_CXX_COMPILER_LOADED=1 +CMAKE_CXX_COMPILER_RANLIB= +CMAKE_CXX_COMPILER_TARGET= +CMAKE_CXX_COMPILER_VERSION=19.36.32543.0 +CMAKE_CXX_COMPILER_VERSION_INTERAL= +CMAKE_HOST_SYSTEM_NAME=Windows +Change Dir: 'C:/DoesNotExist/Temp/CMakeFiles/CMakeTmp' + +Run Build Command(s): C:/DoesNotExist/ninja/bin/ninja.exe -v cmTC_bb116 +[1/2] C:\PROGRA~1\MIB055~1\2022\PROFES~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe /nologo /TP /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\cmTC_bb116.dir\CMakeCXXCompilerABI.cpp.obj /FdCMakeFiles\cmTC_bb116.dir\ /FS -c "C:\DoesNotExist\CMake\Modules\CMakeCXXCompilerABI.cpp" +[2/2] C:\Windows\system32\cmd.exe /C "cd . && "C:\DoesNotExist\build\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_bb116.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests -- C:\PROGRA~1\MIB055~1\2022\PROFES~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_bb116.dir\CMakeCXXCompilerABI.cpp.obj /out:cmTC_bb116.exe /implib:cmTC_bb116.lib /pdb:cmTC_bb116.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ." diff --git a/Tests/RunCMake/ParseImplicitData/windows_x86_64-CXX-MSVC-19.38.33130.0-VS.input b/Tests/RunCMake/ParseImplicitData/windows_x86_64-CXX-MSVC-19.38.33130.0-VS.input new file mode 100644 index 0000000..16d1b37 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitData/windows_x86_64-CXX-MSVC-19.38.33130.0-VS.input @@ -0,0 +1,48 @@ +CMAKE_LANG=CXX +CMAKE_LINKER=C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/link.exe +CMAKE_CXX_COMPILER_ABI= +CMAKE_CXX_COMPILER_AR= +CMAKE_CXX_COMPILER_ARCHITECTURE_ID=x64 +CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN= +CMAKE_CXX_COMPILER_ID=MSVC +CMAKE_CXX_COMPILER_LAUNCHER= +CMAKE_CXX_COMPILER_LOADED=1 +CMAKE_CXX_COMPILER_RANLIB= +CMAKE_CXX_COMPILER_TARGET= +CMAKE_CXX_COMPILER_VERSION=19.38.33130.0 +CMAKE_CXX_COMPILER_VERSION_INTERAL= +CMAKE_HOST_SYSTEM_NAME=Windows +Change Dir: 'C:/DoesNotExist/Temp/CMakeFiles/CMakeTmp' + +Run Build Command(s): "C:/Program Files/Microsoft Visual Studio/2022/Professional/MSBuild/Current/Bin/amd64/MSBuild.exe" cmTC_29675.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:n +MSBuild version 17.8.3+195e7f5a3 for .NET Framework +Build started 12/14/2023 11:53:28 AM. + +Project "C:\DoesNotExist\Temp\CMakeFiles\CMakeTmp\cmTC_29675.vcxproj" on node 1 (default targets). +PrepareForBuild: + Creating directory "cmTC_29675.dir\Debug\". + Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://aka.ms/cpp/structured-output for more details. + Creating directory "C:\DoesNotExist\Temp\CMakeFiles\CMakeTmp\Debug\". + Creating directory "cmTC_29675.dir\Debug\cmTC_29675.tlog\". +InitializeBuildStatus: + Creating "cmTC_29675.dir\Debug\cmTC_29675.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified. + Touching "cmTC_29675.dir\Debug\cmTC_29675.tlog\unsuccessfulbuild". +ClCompile: + C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /EHsc /RTC1 /MDd /GS /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_29675.dir\Debug\\" /Fd"cmTC_29675.dir\Debug\vc143.pdb" /external:W3 /Gd /TP /errorReport:queue "C:\DoesNotExist\CMake\Modules\CMakeCXXCompilerABI.cpp" + Microsoft (R) C/C++ Optimizing Compiler Version 19.38.33130 for x64 + Copyright (C) Microsoft Corporation. All rights reserved. + cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /EHsc /RTC1 /MDd /GS /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_29675.dir\Debug\\" /Fd"cmTC_29675.dir\Debug\vc143.pdb" /external:W3 /Gd /TP /errorReport:queue "C:\DoesNotExist\CMake\Modules\CMakeCXXCompilerABI.cpp" + CMakeCXXCompilerABI.cpp +Link: + C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\DoesNotExist\Temp\CMakeFiles\CMakeTmp\Debug\cmTC_29675.exe" /INCREMENTAL /ILK:"cmTC_29675.dir\Debug\cmTC_29675.ilk" /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:/DoesNotExist/Temp/CMakeFiles/CMakeTmp/Debug/cmTC_29675.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/DoesNotExist/Temp/CMakeFiles/CMakeTmp/Debug/cmTC_29675.lib" /MACHINE:X64 /machine:x64 cmTC_29675.dir\Debug\CMakeCXXCompilerABI.obj + cmTC_29675.vcxproj -> C:\DoesNotExist\Temp\CMakeFiles\CMakeTmp\Debug\cmTC_29675.exe +FinalizeBuildStatus: + Deleting file "cmTC_29675.dir\Debug\cmTC_29675.tlog\unsuccessfulbuild". + Touching "cmTC_29675.dir\Debug\cmTC_29675.tlog\cmTC_29675.lastbuildstate". +Done Building Project "C:\DoesNotExist\Temp\CMakeFiles\CMakeTmp\cmTC_29675.vcxproj" (default targets). + +Build succeeded. + 0 Warning(s) + 0 Error(s) + +Time Elapsed 00:00:00.92 diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake index a002d92..6da6ff2 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake +++ b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake @@ -48,6 +48,8 @@ set(targets sunos-C-SunPro-5.13.0 sunos-CXX-SunPro-5.13.0 sunos-Fortran-SunPro-8.8.0 sunos5.10_sparc32-C-GNU-5.5.0 sunos5.10_sparc32-CXX-GNU-5.5.0 sunos5.10_sparc32-Fortran-GNU-5.5.0 sunos5.11_i386-C-GNU-5.5.0 sunos5.11_i386-CXX-GNU-5.5.0 sunos5.11_i386-Fortran-GNU-5.5.0 + windows_x86_64-C-MSVC-19.36.32543.0 windows_x86_64-CXX-MSVC-19.36.32543.0 + windows_x86_64-C-MSVC-19.38.33130.0-VS windows_x86_64-CXX-MSVC-19.38.33130.0-VS windows_x86_64-C-Clang-17.0.1-MSVC windows_x86_64-CXX-Clang-17.0.1-MSVC windows_x86_64-Fortran-LLVMFlang-17.0.1-MSVC windows_x86_64-Fortran-LLVMFlang-18.0.0-MSVC windows_arm64-C-Clang-17.0.1-MSVC windows_arm64-CXX-Clang-17.0.1-MSVC windows_arm64-Fortran-LLVMFlang-17.0.1-MSVC diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-C-MSVC-19.36.32543.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-C-MSVC-19.36.32543.0.output new file mode 100644 index 0000000..e159ed5 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-C-MSVC-19.36.32543.0.output @@ -0,0 +1,3 @@ +libs= +dirs= +linker_tool=C:/PROGRA~1/MIB055~1/2022/PROFES~1/VC/Tools/MSVC/1436~1.325/bin/Hostx64/x64/link.exe diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-C-MSVC-19.38.33130.0-VS.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-C-MSVC-19.38.33130.0-VS.output new file mode 100644 index 0000000..0ffc15b --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-C-MSVC-19.38.33130.0-VS.output @@ -0,0 +1,3 @@ +libs= +dirs= +linker_tool=C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.38.33130/bin/HostX64/x64/link.exe diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-CXX-MSVC-19.36.32543.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-CXX-MSVC-19.36.32543.0.output new file mode 100644 index 0000000..e159ed5 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-CXX-MSVC-19.36.32543.0.output @@ -0,0 +1,3 @@ +libs= +dirs= +linker_tool=C:/PROGRA~1/MIB055~1/2022/PROFES~1/VC/Tools/MSVC/1436~1.325/bin/Hostx64/x64/link.exe diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-CXX-MSVC-19.38.33130.0-VS.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-CXX-MSVC-19.38.33130.0-VS.output new file mode 100644 index 0000000..0ffc15b --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/windows_x86_64-CXX-MSVC-19.38.33130.0-VS.output @@ -0,0 +1,3 @@ +libs= +dirs= +linker_tool=C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.38.33130/bin/HostX64/x64/link.exe |