CMAKE_SYSTEM_VERSION is set to "nothing" when no <WindowsTargetPlatformVersion> defined in vcxproj/props
bigla opened this issue · 0 comments
bigla commented
I get
set(CMAKE_SYSTEM_VERSION CACHE TYPE INTERNAL FORCE)
in the root CMakeLists.txt when converting a solution where no (sub-)projects or props define
<PropertyGroup Label="Globals">
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
according to CMake Doc
CMAKE_SYSTEM_VERSION is by default set to the same value as the CMAKE_HOST_SYSTEM_VERSION
a comment in related CMake Issue #16713 says
CMAKE_SYSTEM_VERSION should be available in your CMakeLists.txt since it can be a hard requirement for compiling.
So if I understand it correctly
set(CMAKE_SYSTEM_VERSION CACHE TYPE INTERNAL FORCE)
should either not exist or be
set(CMAKE_SYSTEM_VERSION ${CMAKE_HOST_SYSTEM_VERSION} CACHE TYPE INTERNAL FORCE)
in the CMakeLists.txt when there is no Version available to set.