summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2017-10-01 12:53:38 +1030
committerAdrian Johnson <ajohnson@redneon.com>2017-10-21 21:02:25 +1030
commit5d954d1c4f25447f70d949e31afeeefb70c2a8d5 (patch)
tree0758e1cd051f4b27479b8e370d6e3e5fd1ffb6bb /cmake
parent8ccc9efb6c5f717b8cd206a92f802c66bc0a69c7 (diff)
Fix warning: implicit declaration of function ‘localtime_r’
poppler/glib/demo/utils.c:488:20: warning: implicit declaration of function ‘localtime_r’ [-Wimplicit-function-declaration] if (time == 0 || !localtime_r (&time, &t)) return NULL; ^~~~~~~~~~~ The c files also need the -D_DEFAULT_SOURCE feature macro to enable non standard C++11 functons.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/PopplerMacros.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake
index ba4bceb3..05b69476 100644
--- a/cmake/modules/PopplerMacros.cmake
+++ b/cmake/modules/PopplerMacros.cmake
@@ -132,7 +132,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS_DEBUGFULL "-g3 -fno-inline ${_save_cxxflags}")
set(CMAKE_CXX_FLAGS_PROFILE "-g3 -fno-inline -ftest-coverage -fprofile-arcs ${_save_cxxflags}")
set(_save_cflags "${CMAKE_C_FLAGS}")
- set(CMAKE_C_FLAGS "-std=c99")
+ set(CMAKE_C_FLAGS "-std=c99 -D_DEFAULT_SOURCE")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g ${_save_cflags}")
set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG ${_save_cflags}")
set(CMAKE_C_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline ${_save_cflags}")