From f6be667600f954b2934ba9744ea333489a66b942 Mon Sep 17 00:00:00 2001 From: sarathnandu Date: Thu, 22 Aug 2024 09:39:53 -0500 Subject: [PATCH] Add Control Flow integrity flags for windows. --- cmake/compilers/MSVC.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/compilers/MSVC.cmake b/cmake/compilers/MSVC.cmake index 6568ec7eb8..8459cc7621 100644 --- a/cmake/compilers/MSVC.cmake +++ b/cmake/compilers/MSVC.cmake @@ -88,5 +88,8 @@ else() set(TBB_IPO_LINK_FLAGS $<$>:-LTCG> $<$>:-INCREMENTAL:NO>) endif() +set(TBB_LIB_COMPILE_FLAGS ${TBB_LIB_COMPILE_FLAGS} /guard:cf) +set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} /guard:cf) + set(TBB_OPENMP_FLAG /openmp) set(TBB_OPENMP_NO_LINK_FLAG TRUE) # TBB_OPENMP_FLAG will be used only on compilation but not on linkage