diff --git a/.azuredevops/policies/branchClassification.yml b/.azuredevops/policies/branchClassification.yml new file mode 100644 index 0000000..a855fde --- /dev/null +++ b/.azuredevops/policies/branchClassification.yml @@ -0,0 +1,15 @@ +name: branch_classification +description: Branch classification configuration for repository +resource: repository +disabled: false +where: +configuration: + branchClassificationSettings: + defaultClassification: nonproduction + ruleset: + - name: prod-branches + branchNames: + - main + - ms_sdk_release + - release + classification: production diff --git a/SHMath/CMakeLists.txt b/SHMath/CMakeLists.txt index fbad6e5..0d814f8 100644 --- a/SHMath/CMakeLists.txt +++ b/SHMath/CMakeLists.txt @@ -69,7 +69,9 @@ if(WIN32 AND BUILD_DX12) set(LIBRARY_SOURCES ${LIBRARY_SOURCES} DirectXSHD3D12.cpp) endif() -add_library(${PROJECT_NAME} STATIC ${LIBRARY_SOURCES} ${LIBRARY_HEADERS}) +add_library(${PROJECT_NAME} STATIC) + +target_sources(${PROJECT_NAME} PRIVATE ${LIBRARY_HEADERS} ${LIBRARY_SOURCES}) target_include_directories(${PROJECT_NAME} PUBLIC $ @@ -129,7 +131,7 @@ install(FILES #--- Compiler switches if(MSVC) - target_compile_options(${PROJECT_NAME} PRIVATE /Wall /EHsc /GR "$<$>:/guard:cf>") + target_compile_options(${PROJECT_NAME} PRIVATE /Wall /EHsc /GR /Gd /GS /Zc:forScope /Zc:inline /Zc:wchar_t "$<$>:/guard:cf>") if((MSVC_VERSION GREATER_EQUAL 1928) AND (CMAKE_SIZEOF_VOID_P EQUAL 8) @@ -164,7 +166,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") target_compile_options(${PROJECT_NAME} PRIVATE /Zc:__cplusplus /Zc:inline /fp:fast /Qdiag-disable:161) elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") target_compile_options(${PROJECT_NAME} PRIVATE - /sdl /Zc:forScope /Zc:inline /Zc:wchar_t /fp:fast + /sdl /fp:fast /wd4061 /wd4365 /wd4514 /wd4571 /wd4668 /wd4710 /wd4820 /wd5039 /wd5045) if(CMAKE_INTERPROCEDURAL_OPTIMIZATION) @@ -179,6 +181,10 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") target_compile_options(${PROJECT_NAME} PRIVATE /Zc:__cplusplus) endif() + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.15) + target_compile_options(${PROJECT_NAME} PRIVATE /JMC-) + endif() + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.24) target_compile_options(${PROJECT_NAME} PRIVATE /ZH:SHA_256) endif() @@ -210,6 +216,10 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") target_compile_options(${PROJECT_NAME} PRIVATE $<$:/Zc:templateScope>) endif() + + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.50) + target_compile_options(${PROJECT_NAME} PRIVATE /Zc:u8EscapeEncoding) + endif() endif() if((NOT WIN32) AND (NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/sal/sal.h"))