Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
Fix -latomic
Browse files Browse the repository at this point in the history
  • Loading branch information
LunarWatcher committed Oct 14, 2023
1 parent e624ea5 commit 056a56f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DAPI_DEBUG")

add_library(genesis-deps INTERFACE)

if (NOT WIN32)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Wno-c++11-narrowing")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0 -DGENESIS_DEBUG")
Expand All @@ -41,7 +43,8 @@ int main() {
}
" HAS_BUILTIN_ATOMIC)
if (NOT HAS_BUILTIN_ATOMIC)
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -latomic")
set(CMAKE_REQUIRED_LIBRARIES atomic)
target_link_libraries(genesis-deps INTERFACE atomic)
endif()
else()
# As of CMake 3.15, no manual MSVC framework options have to be set
Expand Down
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ add_subdirectory(math)
add_subdirectory(render-engine)

# Meta libraries {{{
add_library(genesis-deps INTERFACE)
target_link_libraries(
genesis-deps
INTERFACE
Expand Down

0 comments on commit 056a56f

Please sign in to comment.