Commit c7fb3a99 authored by Emmanuel Promayon's avatar Emmanuel Promayon
Browse files

Merge branch 'bug/cxx11-for-old-cmake' into 'develop'

Bug/cxx11 for old cmake

Closes #5

See merge request !16
parents a9f21ef3 f2b9490b
......@@ -33,9 +33,14 @@ camitk_opensource_packaging()
# Configure CamiTK test coverage report generation (if and only if CAMITK_TEST_COVERAGE is set to TRUE)
include(camitk/test/CamiTKTestCoverage)
# From now on, CamiTK is C++11 compliant (this flag is needed for early support of C++11 in g++)
# All target after this declaration wil be compile with c++11 policy
set(CMAKE_CXX_STANDARD 11)
# CamiTK requires C++11
if(${CMAKE_VERSION} VERSION_LESS "3.1.3")
# CMAKE_CXX_STANDARD not available for cmake 3.0.2 (as in debian old stable)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else()
# All target after this declaration will be compile with c++11 policy
set(CMAKE_CXX_STANDARD 11)
endif()
# Specific to SDK: first compile the SDK (it looks like a CEP but is sooooo special...)
add_subdirectory(sdk)
......
......@@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.0)
# Find CamiTK SDK
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_CXX_STANDARD 11)
# CamiTK requires C++11
if(${CMAKE_VERSION} VERSION_LESS "3.1.3")
# CMAKE_CXX_STANDARD not available for cmake 3.0.2 (as in debian old stable)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else()
# All target after this declaration will be compile with c++11 policy
set(CMAKE_CXX_STANDARD 11)
endif()
find_package(CamiTK REQUIRED)
include(${CAMITK_USE_FILE})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment