summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2017-03-08 22:07:34 +0100
committerAlbert Astals Cid <aacid@kde.org>2017-03-08 22:07:34 +0100
commitda490581b1b4d50efdba1e25115697e17bb0ef51 (patch)
tree946e63c1597133732a8fd3585e3ecc98cc651ea3
parentaa8633267d1d0e2079bb4a2b82bc7b36a4d306f5 (diff)
Compile in C++11 mode
I tried using AX_CXX_COMPILE_STDCXX_11 for the autotools side but could not get it to fill CXXFLAGS or any other variable i could find, help welcome
-rw-r--r--CMakeLists.txt4
-rw-r--r--configure.ac1
2 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d36e06e3..e0bdb0b1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
project(poppler)
-cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
@@ -26,6 +26,8 @@ set(POPPLER_MINOR_VERSION "52")
set(POPPLER_MICRO_VERSION "0")
set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}")
+set (CMAKE_CXX_STANDARD 11)
+
# command line switches
option(ENABLE_XPDF_HEADERS "Install unsupported xpdf headers." OFF)
option(BUILD_GTK_TESTS "Whether compile the GTK+ test programs." ON)
diff --git a/configure.ac b/configure.ac
index 5caa8ae5..19bf10dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,7 @@ AC_PROG_CC_STDC
#fi
AC_PROG_CXX
AC_PROG_INSTALL
+CXXFLAGS="$CXXFLAGS -std=c++11"
dnl ##### Check for pkgconfig
PKG_PROG_PKG_CONFIG