Unity build need to check for VS 15.8, instead of just VS 15
The link in the original change (#19526 (closed)) mentioned that the VS experimental support for Unity (Jumbo) build was added in version 15.8; however the updated CMake code only check for version greater or equal to 15, which is not enough...
The attached minimum project files built fine with VS 14.0 & 15.9, but failed with VS 15.6
CMakeLists.txt main.cpp test.h test.cpp
Error:
Microsoft (R) Build Engine version 15.6.85.37198 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Checking Build System
Building Custom Rule E:/builds/744a1ec6/0/tests/unity-test/CMakeLists.txt
unity_0_cxx.cxx
test.cpp
main.cpp
test.obj : error LNK2005: "int __cdecl testFunc(void)" (?testFunc@@YAHXZ) already defined in unity_0_cxx.obj [E:\builds\744a1ec6\0\build-windows64_vs2017\tests\unity-test\UnityTest.vcxproj]
main.obj : error LNK2005: main already defined in unity_0_cxx.obj [E:\builds\744a1ec6\0\build-windows64_vs2017\tests\unity-test\UnityTest.vcxproj]
E:\builds\744a1ec6\0\build-windows64_vs2017\tests\unity-test\Release\UnityTest.exe : fatal error LNK1169: one or more multiply defined symbols found [E:\builds\744a1ec6\0\build-windows64_vs2017\tests\unity-test\UnityTest.vcxproj]
-- End of build log
CMake Error at E:/builds/744a1ec6/0/ci_job.cmake:139 (message):
Build step failed