Skip to content

Commit

Permalink
Use CMAKE_CXX_STANDARD instead of custom flags
Browse files Browse the repository at this point in the history
  • Loading branch information
markand authored and dacap committed Aug 3, 2018
1 parent 09e571a commit da1f4bb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
cmake_minimum_required(VERSION 2.6)

project(clip)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED On)

option(CLIP_EXAMPLES "Compile clip examples" on)
option(CLIP_TESTS "Compile clip tests" on)
if(UNIX AND NOT APPLE)
Expand All @@ -23,12 +27,9 @@ if(WIN32)
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
list(APPEND CLIP_SOURCES clip_win.cpp)
elseif(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
add_definitions(-fobjc-arc)
list(APPEND CLIP_SOURCES clip_osx.mm)
elseif(UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

include(CheckIncludeFiles)
check_include_files(xcb/xcb.h HAVE_XCB_XLIB_H)

Expand Down

0 comments on commit da1f4bb

Please sign in to comment.