I tried to build Slicer at tag v4.11.20210226 on Win10. Git version is 2.31.1. CMake version is 3.19.2. Here is what I did:
cd C:/
mkdir Git
cd Git
git clone https://github.com/Slicer/Slicer.git S4
cd S4
git reset --hard v4.11.20210226
cd ..
mkdir S4R
cd S4R
cmake -G "Visual Studio 16 2019" -A x64 -DQt5_DIR:PATH=C:/Qt/5.15.2/msvc2019_64/lib/cmake/Qt5 C:/Git/S4
cmake --build . --config Release
It seems VTK does not build due to not being able to clone on of its remote Git repositories. This is the error I get:
Creating directories for 'VTK'
Performing download step (git clone) for 'VTK'
Cloning into 'VTK'...
Note: checking out '97904fdcc7e73446b3131f32eac9fc9781b23c2d'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 97904fdcc7 [backport MR-7233] Fix vtkGPUVolumeRayCastMapper multi-volume-rendering crash
Performing update step for 'VTK'
Generate version-VTK.txt and license-VTK.txt
No patch step for 'VTK'
Performing configure step for 'VTK'
loading initial cache file C:/Git/S4R/VTK-prefix/tmp/VTK-cache-Release.cmake
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.17763.
-- The C compiler identification is MSVC 19.28.29913.0
-- The CXX compiler identification is MSVC 19.28.29913.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMake/vtkCompilerPlatformFlags.cmake:125 (set):
implicitly converting '12' to 'STRING' type.
Call Stack (most recent call first):
CMakeLists.txt:36 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Performing Test VTK_UNDEFINED_SYMBOLS_ALLOWED - Failed
-- Found Git: C:/cygwin64/bin/git.exe (found version "2.16.1")
CMake Error at CMake/vtkModuleRemote.cmake:12 (message):
Failed to clone repository:
'https : //github.com/lorensen/midas-journal-838.git' Clone error is: 'fatal: [C:\Git\S4R\VTK.vcxproj]
Invalid path '/c/Git/S4R/VTK-build/C:/Git': No such file or directory
'
Call Stack (most recent call first):
CMake/vtkModuleRemote.cmake:107 (_git_clone)
CMake/vtkModuleRemote.cmake:153 (_fetch_with_git)
Remote/SplineDrivenImageSlicer.remote.cmake:5 (vtk_fetch_module)
Remote/CMakeLists.txt:9 (include)
-- Configuring incomplete, errors occurred!
See also "C:/Git/S4R/VTK-build/CMakeFiles/CMakeOutput.log".
See also "C:/Git/S4R/VTK-build/CMakeFiles/CMakeError.log".
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(240,5): error MSB8066: Custom build for 'C:\Git\S4R\CMakeFiles\b646bbb3337db3a88c25dfe776ae682e\VTK-mkdir.rule;C:\Git\S4R\CMakeFiles\b646bbb3337db3a88c25dfe776ae682e\VTK-download.rule;C:\Git\S4R\CMakeFiles\b646bbb3337db3a88c25dfe776ae682e\VTK-update.rule;C:\Git\S4R\CMakeFiles\b646bbb3337db3a88c25dfe776ae682e\VTK-patch.rule;C:\Git\S4R\CMakeFiles\b646bbb3337db3a88c25dfe776ae682e\VTK-configure.rule;C:\Git\S4R\CMakeFiles\b646bbb3337db3a88c25dfe776ae682e\VTK-build.rule;C:\Git\S4R\CMakeFiles\b646bbb3337db3a88c25dfe776ae682e\VTK-install.rule;C:\Git\S4R\CMakeFiles\b646bbb3337db3a88c25dfe776ae682e\VTK-create_egg_info.rule;C:\Git\S4R\CMakeFiles\b646bbb3337db3a88c25dfe776ae682e\VTK-generate_project_description.rule;C:\Git\S4R\CMakeFiles\13495245e405e08eb95453be4e233434\VTK-complete.rule;C:\Git\S4R\CMakeFiles\d8a2514babf5d6ccea9a7f61243738e3\VTK.rule' exited with code 1. [C:\Git\S4R\VTK.vcxproj]