Build: Use the standards conforming preprocessor when using VS2022
This is primarily to solve Intellisense failures with various USD header files and macros. However, it also unifies Windows x64 with Windows arm64 (though MSVC is unused for arm64 currently) since it would be required for proper `sse2neon` support anyhow. Pull Request: https://projects.blender.org/blender/blender/pulls/135844
This commit is contained in:
committed by
Jesse Yurkovich
parent
36826f0237
commit
c29a50a6d9
@@ -229,9 +229,8 @@ if(NOT MSVC_CLANG)
|
||||
string(APPEND CMAKE_CXX_FLAGS " /permissive- /Zc:__cplusplus /Zc:inline")
|
||||
string(APPEND CMAKE_C_FLAGS " /Zc:inline")
|
||||
|
||||
# For ARM64 devices, we need to tell MSVC to use the new preprocessor
|
||||
# This is because sse2neon requires it.
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
|
||||
# For VS2022+ we can enable the the new preprocessor
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.30.30423)
|
||||
string(APPEND CMAKE_CXX_FLAGS " /Zc:preprocessor")
|
||||
string(APPEND CMAKE_C_FLAGS " /Zc:preprocessor")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user