Building 2.8 from git fails with CMake error


Just checked out the latest from git. Visual Studio 17 (community edition) on Windows 10. The build itself failed due to a cmake error. Here is the log:

Checking Build System
CMake is re-running because E:/blender-2.8-git/build_windows_Full_x64_vc15_Release/CMakeFiles/generate.stamp is out-of-date.
the file ‘E:/blender-2.8-git/blender/CMakeLists.txt’
is newer than ‘E:/blender-2.8-git/build_windows_Full_x64_vc15_Release/CMakeFiles/generate.stamp.depend’
– 64 bit compiler detected.
– Visual Studio 2017 detected.
CMake Error at source/blender/collada/CMakeLists.txt:37 (add_compile_definitions):
Unknown CMake command “add_compile_definitions”.

– Configuring incomplete, errors occurred!
See also “E:/blender-2.8-git/build_windows_Full_x64_vc15_Release/CMakeFiles/CMakeOutput.log”.
CMake Configure step failed. Build files cannot be regenerated correctly. Attempting to stop IDE build.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(171,5): error MSB6006: “cmd.exe” exited with code -1073741819. [E:\blender-2.8-git\build_windows_Full_x64_vc15_Release\ZERO_CHECK.vcxproj]


I would hope this is easy to correct, but surprised it made into source control…


The CMake command add_compile_definitions is fairly new (since 3.12), so I guess your version doesn’t have it yet. Updating should fix it.


Sorry, that was my fault. Its fixed now, older cmake versions should be working again.