File tree Expand file tree Collapse file tree
MatrixFactorizationNative Expand file tree Collapse file tree Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -13,4 +13,9 @@ endif()
1313
1414add_library (CpuMathNative SHARED ${SOURCES} ${RESOURCES} )
1515
16+ if (MSVC AND NOT MSVC_VERSION LESS 1900)
17+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf" )
18+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qspectre" )
19+ endif ()
20+
1621install_library_and_symbols (CpuMathNative )
Original file line number Diff line number Diff line change @@ -17,4 +17,9 @@ endif()
1717
1818add_library (FastTreeNative SHARED ${SOURCES} ${RESOURCES} )
1919
20+ if (MSVC AND NOT MSVC_VERSION LESS 1900)
21+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf" )
22+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qspectre" )
23+ endif ()
24+
2025install_library_and_symbols (FastTreeNative )
Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ set(SOURCES
1616
1717add_library (LdaNative SHARED ${SOURCES} ${RESOURCES} )
1818
19+ if (MSVC AND NOT MSVC_VERSION LESS 1900)
20+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf" )
21+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qspectre" )
22+ endif ()
23+
1924if (${ARCHITECTURE} STREQUAL "arm" )
2025 if (WIN32 )
2126 target_link_libraries (LdaNative shell32.lib )
Original file line number Diff line number Diff line change @@ -43,6 +43,11 @@ endif()
4343
4444add_library (MatrixFactorizationNative SHARED ${SOURCES} ${RESOURCES} )
4545
46+ if (MSVC AND NOT MSVC_VERSION LESS 1900)
47+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf" )
48+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qspectre" )
49+ endif ()
50+
4651if (${ARCHITECTURE} STREQUAL "arm" )
4752 if (WIN32 )
4853 target_link_libraries (MatrixFactorizationNative shell32.lib )
Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ endif()
1818add_library (MklProxyNative SHARED ${SOURCES} ${RESOURCES} )
1919target_link_libraries (MklProxyNative PUBLIC ${MKL_LIBRARY} )
2020
21+ if (MSVC AND NOT MSVC_VERSION LESS 1900)
22+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf" )
23+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qspectre" )
24+ endif ()
25+
2126if (APPLE )
2227 set_target_properties (MklProxyNative PROPERTIES INSTALL_RPATH "@loader_path" )
2328endif ()
Original file line number Diff line number Diff line change @@ -24,5 +24,9 @@ endif()
2424
2525set (SOURCES OneDalAlgorithms.cpp)
2626add_library (OneDalNative SHARED ${SOURCES} ${RESOURCES} )
27+ if (MSVC AND NOT MSVC_VERSION LESS 1900)
28+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf" )
29+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qspectre" )
30+ endif ()
2731target_link_libraries (OneDalNative PUBLIC ${WRAPPER_LINK_OPTIONS} )
2832install_library_and_symbols (OneDalNative )
Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ endif()
3939
4040add_definitions (-DUSE_OMP )
4141add_library (SymSgdNative SHARED ${SOURCES} ${RESOURCES} )
42+ if (MSVC AND NOT MSVC_VERSION LESS 1900)
43+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf" )
44+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qspectre" )
45+ endif ()
4246target_link_libraries (SymSgdNative PUBLIC ${MKL_LIBRARY} PUBLIC ${OPENMP_LIBRARY} )
4347
4448if (APPLE )
You can’t perform that action at this time.
0 commit comments