Skip to content

Commit

Permalink
setting compiler agnostic C++ standard and flags
Browse files Browse the repository at this point in the history
  • Loading branch information
christianrauch committed Dec 20, 2018
1 parent ae6e904 commit 816ac65
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.1)
project(msp)

add_definitions(-std=c++11)
add_definitions(-Wall)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

if(UNIX)
set(BUILD_SHARED_LIBS "ON")
Expand Down

0 comments on commit 816ac65

Please sign in to comment.