Skip to content

Commit 31c8a85

Browse files
committed
To move the find_package requirment to the top leverl cmake file.
1 parent fa78376 commit 31c8a85

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

flang-rt/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ check_cxx_compiler_flag("-UTESTFLAG" FLANG_RT_SUPPORTS_UNDEFINE_FLAG)
245245
# Check whether -fno-lto is supported.
246246
check_cxx_compiler_flag(-fno-lto FLANG_RT_HAS_FNO_LTO_FLAG)
247247

248+
# Search for pthread library
249+
find_package(Threads REQUIRED)
248250

249251
# function checks
250252
find_package(Backtrace)

flang-rt/cmake/modules/AddFlangRT.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ function (add_flangrt_library name)
142142
endif ()
143143
if (build_shared)
144144
add_library("${name_shared}" SHARED ${extra_args} ${ARG_ADDITIONAL_HEADERS} ${ARG_UNPARSED_ARGUMENTS})
145-
find_package(Threads REQUIRED)
146145
target_link_libraries(${name_shared} PUBLIC Threads::Threads)
147146
endif ()
148147

0 commit comments

Comments
 (0)