Skip to content

Commit fac6c31

Browse files
committed
Workaround broken flag detection on GCC
1 parent 58a05fd commit fac6c31

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libcxx/cmake/config-ix.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,5 +135,7 @@ else()
135135
check_library_exists(pthread pthread_create "" LIBCXX_HAS_PTHREAD_LIB)
136136
check_library_exists(rt clock_gettime "" LIBCXX_HAS_RT_LIB)
137137
check_library_exists(atomic __atomic_fetch_add_8 "" LIBCXX_HAS_ATOMIC_LIB)
138-
check_library_exists(m lgamma_r "" LIBCXX_HAS_MATH_LIB)
138+
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
139+
set(LIBCXX_HAS_MATH_LIB ON)
140+
endif()
139141
endif()

0 commit comments

Comments
 (0)