summaryrefslogtreecommitdiff
path: root/louloulibs
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-11-07 20:26:28 +0100
committerlouiz’ <louiz@louiz.org>2016-11-07 20:26:28 +0100
commita52baa52e25c9767d1be95a10b2a56334aaeb471 (patch)
tree27744e76699c8bc2630e2289233d744f642fd114 /louloulibs
parent597cfce4b88f9318ed8b580e8b26df9be8fc637a (diff)
downloadbiboumi-a52baa52e25c9767d1be95a10b2a56334aaeb471.tar.gz
biboumi-a52baa52e25c9767d1be95a10b2a56334aaeb471.tar.bz2
biboumi-a52baa52e25c9767d1be95a10b2a56334aaeb471.tar.xz
biboumi-a52baa52e25c9767d1be95a10b2a56334aaeb471.zip
Workaround for debian and other old OS that do not have std::put_time
Diffstat (limited to 'louloulibs')
-rw-r--r--louloulibs/CMakeLists.txt8
-rw-r--r--louloulibs/louloulibs.h.cmake1
2 files changed, 9 insertions, 0 deletions
diff --git a/louloulibs/CMakeLists.txt b/louloulibs/CMakeLists.txt
index 1858bb3..908c35f 100644
--- a/louloulibs/CMakeLists.txt
+++ b/louloulibs/CMakeLists.txt
@@ -156,4 +156,12 @@ check_cxx_source_compiles("
mark_as_advanced(HAS_GET_TIME)
+check_cxx_source_compiles("
+ #include <iomanip>
+ int main()
+ { std::put_time(nullptr, \"\"); }"
+ HAS_PUT_TIME)
+
+mark_as_advanced(HAS_PUT_TIME)
+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/louloulibs.h.cmake ${CMAKE_BINARY_DIR}/src/louloulibs.h)
diff --git a/louloulibs/louloulibs.h.cmake b/louloulibs/louloulibs.h.cmake
index d5328b8..6131b70 100644
--- a/louloulibs/louloulibs.h.cmake
+++ b/louloulibs/louloulibs.h.cmake
@@ -8,3 +8,4 @@
#cmakedefine SOFTWARE_VERSION "${SOFTWARE_VERSION}"
#cmakedefine PROJECT_NAME "${PROJECT_NAME}"
#cmakedefine HAS_GET_TIME
+#cmakedefine HAS_PUT_TIME