Skip to content
Permalink
Browse files

Use CMake standard method of setting C++ std

  • Loading branch information...
TheCycoONE committed Feb 11, 2019
1 parent 138aa5b commit 893f1d05ab64fa60c27909c515b26123df7a0300
Showing with 10 additions and 9 deletions.
  1. +5 −0 AnimView/CMakeLists.txt
  2. +0 −9 CMakeLists.txt
  3. +5 −0 CorsixTH/CMakeLists.txt
@@ -45,6 +45,11 @@ else()
)
endif()

# Set language standard
set_property(TARGET AnimView PROPERTY CXX_STANDARD 11)
set_property(TARGET AnimView PROPERTY CXX_EXTENSIONS OFF)
set_property(TARGET AnimView PROPERTY CXX_STANDARD_REQUIRED ON)

## Finding libraries

# Find WxWidgets
@@ -26,15 +26,6 @@ endif()

project(CorsixTH_Top_Level)

include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11)
check_cxx_compiler_flag("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

if(MINGW)
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
endif()
@@ -78,6 +78,11 @@ if(UNIX AND NOT APPLE)
set_target_properties(CorsixTH PROPERTIES OUTPUT_NAME corsix-th)
endif()

# Set language standard
set_property(TARGET CorsixTH PROPERTY CXX_STANDARD 11)
set_property(TARGET CorsixTH PROPERTY CXX_EXTENSIONS OFF)
set_property(TARGET CorsixTH PROPERTY CXX_STANDARD_REQUIRED ON)

# Add an extra step to copy built DLLs on MSVC
if(USE_VCPKG_DEPS)
include(CopyVcpkgLua)

0 comments on commit 893f1d0

Please sign in to comment.
You can’t perform that action at this time.