Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
add OpenMP to top cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
luoyu-intel committed Dec 29, 2023
1 parent 76e8b52 commit 5fe0d8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ endif()
if (NE_BTLA_UT)
set(BTLA_UT_ALL ON)
endif()
include(FindOpenMP)

add_subdirectory(bestla)

add_subdirectory(neural_speed)
2 changes: 2 additions & 0 deletions neural_speed/cmake/Common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ endfunction()

function(add_executable_w_warning TARGET)
add_executable(${TARGET} ${ARGN})
target_link_libraries(${TARGET} PUBLIC bestla::bestla OpenMP::OpenMP_CXX OpenMP::OpenMP_C)
set_target_properties(${TARGET} PROPERTIES C_STANDARD 11 C_STANDARD_REQUIRED ON C_EXTENSIONS OFF)
set_target_properties(${TARGET} PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED ON CXX_EXTENSIONS OFF)
warning_check(${TARGET})
endfunction()

function(add_library_w_warning_ TARGET)
add_library(${TARGET} ${ARGN})
target_link_libraries(${TARGET} PUBLIC bestla::bestla OpenMP::OpenMP_CXX OpenMP::OpenMP_C)
set_target_properties(${TARGET} PROPERTIES C_STANDARD 11 C_STANDARD_REQUIRED ON C_EXTENSIONS OFF)
set_target_properties(${TARGET} PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED ON CXX_EXTENSIONS OFF)
warning_check(${TARGET})
Expand Down

0 comments on commit 5fe0d8e

Please sign in to comment.