Skip to content

Commit 8d31a8e

Browse files
authored
Change official build to use 1ES templates (#7048)
With any luck this doesn't break our builds (official build tests have been done from a branch)
1 parent 164fde0 commit 8d31a8e

File tree

8 files changed

+347
-302
lines changed

8 files changed

+347
-302
lines changed

build/vsts-ci.yml

Lines changed: 314 additions & 302 deletions
Large diffs are not rendered by default.

src/Native/CpuMathNative/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@ endif()
1313

1414
add_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+
1621
install_library_and_symbols (CpuMathNative)

src/Native/FastTreeNative/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,9 @@ endif()
1717

1818
add_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+
2025
install_library_and_symbols (FastTreeNative)

src/Native/LdaNative/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ set(SOURCES
1616

1717
add_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+
1924
if (${ARCHITECTURE} STREQUAL "arm")
2025
if (WIN32)
2126
target_link_libraries(LdaNative shell32.lib)

src/Native/MatrixFactorizationNative/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ endif()
4343

4444
add_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+
4651
if (${ARCHITECTURE} STREQUAL "arm")
4752
if (WIN32)
4853
target_link_libraries(MatrixFactorizationNative shell32.lib)

src/Native/MklProxyNative/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ endif()
1818
add_library(MklProxyNative SHARED ${SOURCES} ${RESOURCES})
1919
target_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+
2126
if(APPLE)
2227
set_target_properties(MklProxyNative PROPERTIES INSTALL_RPATH "@loader_path")
2328
endif()

src/Native/OneDalNative/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,9 @@ endif()
2424

2525
set(SOURCES OneDalAlgorithms.cpp)
2626
add_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()
2731
target_link_libraries(OneDalNative PUBLIC ${WRAPPER_LINK_OPTIONS})
2832
install_library_and_symbols(OneDalNative)

src/Native/SymSgdNative/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ endif()
3939

4040
add_definitions(-DUSE_OMP)
4141
add_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()
4246
target_link_libraries(SymSgdNative PUBLIC ${MKL_LIBRARY} PUBLIC ${OPENMP_LIBRARY})
4347

4448
if(APPLE)

0 commit comments

Comments
 (0)