Skip to content

Commit

Permalink
Change official build to use 1ES templates (dotnet#7048)
Browse files Browse the repository at this point in the history
With any luck this doesn't break our builds (official build tests have been done from a branch)
  • Loading branch information
directhex authored and ericstj committed Mar 13, 2024
1 parent 4ae582b commit 3e3768c
Show file tree
Hide file tree
Showing 8 changed files with 347 additions and 302 deletions.
616 changes: 314 additions & 302 deletions build/vsts-ci.yml

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/Native/CpuMathNative/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@ endif()

add_library(CpuMathNative SHARED ${SOURCES} ${RESOURCES})

if (MSVC AND NOT MSVC_VERSION LESS 1900)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qspectre")
endif()

install_library_and_symbols (CpuMathNative)
5 changes: 5 additions & 0 deletions src/Native/FastTreeNative/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,9 @@ endif()

add_library(FastTreeNative SHARED ${SOURCES} ${RESOURCES})

if (MSVC AND NOT MSVC_VERSION LESS 1900)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qspectre")
endif()

install_library_and_symbols (FastTreeNative)
5 changes: 5 additions & 0 deletions src/Native/LdaNative/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ set(SOURCES

add_library(LdaNative SHARED ${SOURCES} ${RESOURCES})

if (MSVC AND NOT MSVC_VERSION LESS 1900)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qspectre")
endif()

if (${ARCHITECTURE} STREQUAL "arm")
if (WIN32)
target_link_libraries(LdaNative shell32.lib)
Expand Down
5 changes: 5 additions & 0 deletions src/Native/MatrixFactorizationNative/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ endif()

add_library(MatrixFactorizationNative SHARED ${SOURCES} ${RESOURCES})

if (MSVC AND NOT MSVC_VERSION LESS 1900)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qspectre")
endif()

if (${ARCHITECTURE} STREQUAL "arm")
if (WIN32)
target_link_libraries(MatrixFactorizationNative shell32.lib)
Expand Down
5 changes: 5 additions & 0 deletions src/Native/MklProxyNative/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ endif()
add_library(MklProxyNative SHARED ${SOURCES} ${RESOURCES})
target_link_libraries(MklProxyNative PUBLIC ${MKL_LIBRARY})

if (MSVC AND NOT MSVC_VERSION LESS 1900)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qspectre")
endif()

if(APPLE)
set_target_properties(MklProxyNative PROPERTIES INSTALL_RPATH "@loader_path")
endif()
Expand Down
4 changes: 4 additions & 0 deletions src/Native/OneDalNative/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,9 @@ endif()

set(SOURCES OneDalAlgorithms.cpp)
add_library(OneDalNative SHARED ${SOURCES} ${RESOURCES})
if (MSVC AND NOT MSVC_VERSION LESS 1900)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qspectre")
endif()
target_link_libraries(OneDalNative PUBLIC ${WRAPPER_LINK_OPTIONS})
install_library_and_symbols(OneDalNative)
4 changes: 4 additions & 0 deletions src/Native/SymSgdNative/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ endif()

add_definitions(-DUSE_OMP)
add_library(SymSgdNative SHARED ${SOURCES} ${RESOURCES})
if (MSVC AND NOT MSVC_VERSION LESS 1900)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qspectre")
endif()
target_link_libraries(SymSgdNative PUBLIC ${MKL_LIBRARY} PUBLIC ${OPENMP_LIBRARY})

if(APPLE)
Expand Down

0 comments on commit 3e3768c

Please sign in to comment.