Skip to content

Commit

Permalink
link libatomic for unit-tests, skip clang/macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
crocdialer committed Sep 29, 2024
1 parent a011ba6 commit 005ecaa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
include_directories(${vierkant_INCLUDE_DIRS})
set(LIBS ${vierkant_LIBRARIES} GTest::gtest_main)

if (NOT APPLE)
# gcc and msvc require additional linking against libatomic, clang does not provide it.
set(LIBS ${LIBS} atomic)
endif ()
FILE(GLOB TEST_SOURCES "*.c*")
FILE(GLOB TEST_HEADERS "*.h")

Expand All @@ -13,4 +16,4 @@ FOREACH (test_file ${TEST_SOURCES})
add_executable(${test_name} ${test_file} ${TEST_HEADERS})
TARGET_LINK_LIBRARIES(${test_name} ${LIBS})
gtest_discover_tests(${test_name})
ENDFOREACH(test_file)
ENDFOREACH (test_file)

0 comments on commit 005ecaa

Please sign in to comment.