Bläddra i källkod

Set CMAKE_CXX_STANDARD in root CMakeLists.txt

Setting this variable ensures that cmake will pass the necessary
compiler flags to use the given C++ standard.

Targetting C++11 seems to make g++ happy so far (but not everything
builds yet).
Marc Legendre 9 år sedan
förälder
incheckning
1f2c171e13
1 ändrade filer med 4 tillägg och 0 borttagningar
  1. 4 0
      Source/CMakeLists.txt

+ 4 - 0
Source/CMakeLists.txt

@@ -23,6 +23,10 @@ if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
 endif()
 
 # Global compile & linker flags
+## Compiler-agnostic settings
+### Target at least C++11
+set(CMAKE_CXX_STANDARD 11)
+## Compiler-specific settings
 if(MSVC)
 	# Linker
 	set(BS_LINKER_FLAGS_COMMON "/DLL /DYNAMICBASE /NOLOGO")