Skip to content

Commit b468b60

Browse files
authored
Merge pull request #1683 from CastagnaIT/fix_tests
[cmakelists] Fix atomic target link to linux
2 parents ee01b0b + 14c708a commit b468b60

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ else()
3434
add_definitions(-D__STDC_FORMAT_MACROS)
3535
endif()
3636

37+
if(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
38+
list(APPEND DEPLIBS "atomic")
39+
endif()
40+
3741
# Sources to build
3842
# (use add_dir_sources function to add source/header files from the CMakeLists files of subdirectories)
3943
add_subdirectory(src)

src/test/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ add_executable(${BINARY}
5353
../utils/XMLUtils.cpp
5454
)
5555

56-
if(LINUX)
56+
if(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
5757
SET(ADD_LINK_LIBS "atomic")
5858
endif()
5959

0 commit comments

Comments
 (0)