Skip to content

Commit e563860

Browse files
committed
Compile with c++11
src/xbrz/* uses c++11 constructs such as auto, so c++11 should be enabled to compile wyrmgus
1 parent 8aa8fc6 commit e563860

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ set(STRATAGUS_PATCH_LEVEL2 0)
4040
#########################
4141

4242
project(stratagus)
43-
cmake_minimum_required(VERSION 2.6)
43+
cmake_minimum_required(VERSION 3.1)
4444

4545
set(STRATAGUS_VERSION "${STRATAGUS_MAJOR_VERSION}.${STRATAGUS_MINOR_VERSION}.${STRATAGUS_PATCH_LEVEL}")
4646
set(STRATAGUS_VERSION_FULL "${STRATAGUS_VERSION}.${STRATAGUS_PATCH_LEVEL2}")
@@ -897,6 +897,10 @@ if(CMAKE_COMPILER_IS_GNUC)
897897
endif()
898898
# TODO: Add support for other compilers
899899
900+
#Wyrmgus start
901+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX11_STANDARD_COMPILE_OPTION}")
902+
#Wyrmgus end
903+
900904
check_type_size(errno_t ERRNOT)
901905
check_function_exists("strcpy_s" HAVE_STRCPYS)
902906
check_function_exists("strncpy_s" HAVE_STRNCPYS)

0 commit comments

Comments
 (0)