Skip to content

Commit

Permalink
[CMake] Add -lm flag for queue tests build (undefined sqrt function)
Browse files Browse the repository at this point in the history
  • Loading branch information
khizmax committed Aug 9, 2020
1 parent b6097c0 commit 81d5c29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/stress/queue/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
)

set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lm")

# stress-queue-pop
set(CDSSTRESS_QUEUE_POP stress-queue-pop)
set(CDSSTRESS_QUEUE_POP_SOURCES
Expand Down
2 changes: 2 additions & 0 deletions test/unit/queue/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
)

set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lm")

add_executable(${PACKAGE_NAME} ${CDSGTEST_QUEUE_SOURCES})
target_link_libraries(${PACKAGE_NAME} ${CDS_TEST_LIBRARIES})
strip_binary(${PACKAGE_NAME})
Expand Down

0 comments on commit 81d5c29

Please sign in to comment.