Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CamiTK
CamiTK Community Edition
Commits
c7fb3a99
Commit
c7fb3a99
authored
Dec 26, 2017
by
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
c7fb3a99
...
...
@@ -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
)
...
...
sdk/libraries/cepgenerator/resources/cep.CMakeLists.txt.in
View file @
c7fb3a99
...
...
@@ -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})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment