summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt7
-rw-r--r--README.cmake2
-rw-r--r--src/CMakeLists.txt5
-rw-r--r--src/cpp0x_compat/cstdint10
-rw-r--r--src/utils/mutex.h4
5 files changed, 5 insertions, 23 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9fbf4e1b..6b0da2e3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
-CMAKE_POLICY(VERSION 2.8.12)
+CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
+CMAKE_POLICY(VERSION 3.1)
PROJECT(MANA)
@@ -7,6 +7,8 @@ IF (NOT VERSION)
SET(VERSION 0.6.1)
ENDIF()
+set (CMAKE_CXX_STANDARD 11)
+
STRING(REPLACE "." " " _VERSION ${VERSION})
SEPARATE_ARGUMENTS(_VERSION)
LIST(LENGTH _VERSION _LEN)
@@ -31,7 +33,6 @@ FIND_PACKAGE(Gettext)
OPTION(WITH_OPENGL "Enable OpenGL support" ON)
OPTION(ENABLE_NLS "Enable building of tranlations" ON)
OPTION(ENABLE_MANASERV "Enable Manaserv support" ON)
-OPTION(ENABLE_CPP0X "Enable use of C++0x features" OFF)
IF (WIN32)
SET(PKG_DATADIR ".")
diff --git a/README.cmake b/README.cmake
index c9175fa5..b5691ff1 100644
--- a/README.cmake
+++ b/README.cmake
@@ -143,6 +143,6 @@ In your mana directory:
$ export CC=/usr/bin/clang
$ export CXX=/usr/bin/clang++
-$ cmake -DENABLE_CPP0X=OFF
+$ cmake .
$ make
$ src/mana
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b4227f65..68cba816 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -35,11 +35,6 @@ ENDIF()
SET(FLAGS "-DPACKAGE_VERSION=\\\"${VERSION}\\\"")
SET(FLAGS "${FLAGS} -DPKG_DATADIR=\\\"${PKG_DATADIR}/\\\"")
SET(FLAGS "${FLAGS} -DLOCALEDIR=\\\"${LOCALEDIR}/\\\"")
-IF (ENABLE_CPP0X)
- SET(FLAGS "${FLAGS} -std=c++0x -DENABLE_CPP0X=1")
-ELSE()
- INCLUDE_DIRECTORIES("cpp0x_compat")
-ENDIF()
IF (ENABLE_NLS)
SET(FLAGS "${FLAGS} -DENABLE_NLS=1")
diff --git a/src/cpp0x_compat/cstdint b/src/cpp0x_compat/cstdint
deleted file mode 100644
index 05d56c6e..00000000
--- a/src/cpp0x_compat/cstdint
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * Compatibility header used when the compiler doesn't support C++0x.
- *
- * While GCC 4.2.1 understands types like uint16_t by default, later versions
- * are more strict so here are some typedefs for types used in our code.
- */
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned int uint32_t;
diff --git a/src/utils/mutex.h b/src/utils/mutex.h
index f7f26233..d0120cfa 100644
--- a/src/utils/mutex.h
+++ b/src/utils/mutex.h
@@ -53,9 +53,7 @@ class MutexLocker
{
public:
MutexLocker(Mutex *mutex);
-#ifdef ENABLE_CPP0X
MutexLocker(MutexLocker&&);
-#endif
~MutexLocker();
private:
@@ -95,13 +93,11 @@ inline MutexLocker::MutexLocker(Mutex *mutex):
mMutex->lock();
}
-#ifdef ENABLE_CPP0X
inline MutexLocker::MutexLocker(MutexLocker&& rhs):
mMutex(rhs.mMutex)
{
rhs.mMutex = NULL;
}
-#endif
inline MutexLocker::~MutexLocker()
{