Skip to content

Commit

Permalink
[cmakelists] Fix atomic target link to linux
Browse files Browse the repository at this point in the history
  • Loading branch information
CastagnaIT committed Oct 4, 2024
1 parent bbd8408 commit 14c708a
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 14c708a

Please sign in to comment.