Skip to content

Commit

Permalink
Move thread detection into compiler
Browse files Browse the repository at this point in the history
-assigns to toolchain target
-roll waypp

Signed-off-by: Joel Winarske <[email protected]>
  • Loading branch information
jwinarske committed Feb 3, 2025
1 parent d5161a6 commit a42091a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
15 changes: 11 additions & 4 deletions cmake/compiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,22 @@ if (ENABLE_LTO)
endif ()

#
# Compiler specific settings
# Toolchain target
#
message(STATUS "CMAKE_CXX_COMPILER_ID .. ${CMAKE_CXX_COMPILER_ID}")
message(STATUS "CMAKE_CXX_COMPILER_VERSION: ${CMAKE_CXX_COMPILER_VERSION}")
message(STATUS "Compiler ............... ${CMAKE_CXX_COMPILER_ID}")
message(STATUS "Compiler Version ....... ${CMAKE_CXX_COMPILER_VERSION}")

if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
include(compiler_clang)
endif ()

if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
include(compiler_gnu)
endif ()
endif ()

#
# Threads
#
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(toolchain INTERFACE Threads::Threads)
4 changes: 0 additions & 4 deletions shell/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,6 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
platform_homescreen
)

if (NOT LLVM_ENABLE_THREADS)
target_link_libraries(${PROJECT_NAME} PUBLIC Threads::Threads)
endif ()

target_link_directories(${PROJECT_NAME} PRIVATE
${CMAKE_BINARY_DIR}
)
Expand Down
2 changes: 1 addition & 1 deletion third_party/waypp

0 comments on commit a42091a

Please sign in to comment.