Skip to content

Commit

Permalink
Merge pull request #1683 from CastagnaIT/fix_tests
Browse files Browse the repository at this point in the history
[cmakelists] Fix atomic target link to linux
  • Loading branch information
CastagnaIT authored Oct 11, 2024
2 parents ee01b0b + 14c708a commit b468b60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ else()
add_definitions(-D__STDC_FORMAT_MACROS)
endif()

if(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
list(APPEND DEPLIBS "atomic")
endif()

# Sources to build
# (use add_dir_sources function to add source/header files from the CMakeLists files of subdirectories)
add_subdirectory(src)
Expand Down
2 changes: 1 addition & 1 deletion src/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ add_executable(${BINARY}
../utils/XMLUtils.cpp
)

if(LINUX)
if(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
SET(ADD_LINK_LIBS "atomic")
endif()

Expand Down

0 comments on commit b468b60

Please sign in to comment.