Fix compiler flags to enable building using VS2019+ and targetting Windows 7.

This commit is contained in:
Tautvydas Žilys 2022-02-23 15:30:53 -08:00
Родитель 3df08fe234
Коммит f5b117cd4a
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -33,7 +33,8 @@ if (MSVC_VERSION LESS_EQUAL 1900)
set(TBB_TEST_COMPILE_FLAGS ${TBB_TEST_COMPILE_FLAGS} /wd4503)
endif()
set(TBB_LIB_COMPILE_FLAGS -D_CRT_SECURE_NO_WARNINGS /GS)
set(TBB_COMMON_COMPILE_FLAGS /volatile:iso /FS /EHsc)
set(TBB_COMMON_COMPILE_FLAGS /volatile:iso /FS /EHsc /d2FH4- $<$<NOT:$<CONFIG:Debug>>:/GL>)
set(TBB_COMMON_LINK_FLAGS $<$<NOT:$<CONFIG:Debug>>:-LTCG> $<$<NOT:$<CONFIG:Debug>>:-INCREMENTAL:NO>)
# Ignore /WX set through add_compile_options() or added to CMAKE_CXX_FLAGS if TBB_STRICT is disabled.
if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)
@ -44,6 +45,8 @@ if (WINDOWS_STORE OR TBB_WINDOWS_DRIVER)
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} /D_WIN32_WINNT=0x0A00)
set(TBB_COMMON_LINK_FLAGS -NODEFAULTLIB:kernel32.lib -INCREMENTAL:NO)
set(TBB_COMMON_LINK_LIBS OneCore.lib)
else()
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} /DNTDDI_VERSION=0x06010000 /D_WIN32_WINNT=0x0601 /DWINVER=0x0601)
endif()
if (WINDOWS_STORE)