Skip to content

Commit bbdfc0f

Browse files
committed
strptime: better check
1 parent 7b3e66c commit bbdfc0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/time/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ foreach(t IN LISTS tests)
1717
add_test(NAME ${t} COMMAND ${t})
1818
endforeach()
1919

20-
file(READ strptime.f90 src)
21-
check_source_compiles(Fortran "${src}" HAVE_C_STRPTIME)
20+
set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
21+
check_symbol_exists(strptime "time.h" HAVE_C_STRPTIME)
2222

2323
if(NOT HAVE_C_STRPTIME)
2424
add_library(cpp_strptime OBJECT strptime.cpp)

0 commit comments

Comments
 (0)