Skip to content

Commit

Permalink
build: test: link to libm appropriately
Browse files Browse the repository at this point in the history
  • Loading branch information
mgouicem committed Oct 6, 2021
1 parent 56d650b commit a08d385
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ append(CMAKE_CXX_FLAGS "${CMAKE_TEST_CCXX_NOWARN_FLAGS}")
append_host_compiler_options(CMAKE_CXX_FLAGS "${DPCPP_CXX_NOWARN_FLAGS}")

if(NOT DNNL_CPU_RUNTIME STREQUAL "NONE")
register_exe(api-c api.c "test")
if(NOT WIN32)
find_library(LIBM m REQUIRED)
endif()
register_exe(api-c api.c "test" "${LIBM}")
endif()

if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND (UNIX OR MINGW))
Expand Down

0 comments on commit a08d385

Please sign in to comment.