Skip to content

Commit 7638e0e

Browse files
committed
CMake: improves wordexp/glob detection and messaging
1 parent 302b8a7 commit 7638e0e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,8 +1823,14 @@ if(NOT WIN32)
18231823
CHECK_INCLUDE_FILE("wordexp.h" HAVE_WORDEXP)
18241824
if(HAVE_WORDEXP)
18251825
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_WORDEXP=1)
1826+
message(STATUS "wordexp.h found, wordexp support enabled")
1827+
else()
1828+
set(ENABLE_WORDEXP OFF)
18261829
endif()
18271830
endif()
1831+
if(NOT ENABLE_WORDEXP)
1832+
message(STATUS "wordexp.h not found or disabled, glob used instead")
1833+
endif()
18281834
if(ENABLE_THREADS AND CMAKE_USE_PTHREADS_INIT)
18291835
CHECK_INCLUDE_FILE("pthread_np.h" HAVE_PTHREAD_NP)
18301836
if(HAVE_PTHREAD_NP)

src/common/io/io_unix.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#if FF_HAVE_WORDEXP
1717
#include <wordexp.h>
1818
#else
19-
#warning "<wordexp.h> is not available, use glob(3) instead"
2019
#include <glob.h>
2120
#endif
2221

0 commit comments

Comments
 (0)