From 57ace2b9933cf867efedaea0d176884584acf61e Mon Sep 17 00:00:00 2001 From: Emmanuel Promayon Date: Tue, 26 Dec 2017 16:16:10 +0100 Subject: [PATCH 1/4] FIXED C++11 for older cmake version (as in debian old stable) --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 23734f96..5fc41d15 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,8 +34,13 @@ camitk_opensource_packaging() 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) +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) -- GitLab From ea85b9f3e0b89244dd536a1cbf95034550490a54 Mon Sep 17 00:00:00 2001 From: Emmanuel Promayon Date: Tue, 26 Dec 2017 16:19:29 +0100 Subject: [PATCH 2/4] FIXED for generated CEP on older platforms --- .../cepgenerator/resources/cep.CMakeLists.txt.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sdk/libraries/cepgenerator/resources/cep.CMakeLists.txt.in b/sdk/libraries/cepgenerator/resources/cep.CMakeLists.txt.in index c4be6758..12fd59fc 100644 --- a/sdk/libraries/cepgenerator/resources/cep.CMakeLists.txt.in +++ b/sdk/libraries/cepgenerator/resources/cep.CMakeLists.txt.in @@ -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) +# From now on, CamiTK is C++11 compliant (this flag is needed for early support of C++11 in g++) +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}) -- GitLab From cb6d341a64c97c32c85e2ecc2ab4da345daf72ec Mon Sep 17 00:00:00 2001 From: Emmanuel Promayon Date: Tue, 26 Dec 2017 16:23:06 +0100 Subject: [PATCH 3/4] FIXED comment description --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5fc41d15..061ca669 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,7 @@ 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++) +# 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") -- GitLab From 4168505b084c3f349a6ce7200188fd7eb16d8459 Mon Sep 17 00:00:00 2001 From: Emmanuel Promayon Date: Tue, 26 Dec 2017 16:38:01 +0100 Subject: [PATCH 4/4] FIXED comment This branch fixes #5. --- sdk/libraries/cepgenerator/resources/cep.CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/libraries/cepgenerator/resources/cep.CMakeLists.txt.in b/sdk/libraries/cepgenerator/resources/cep.CMakeLists.txt.in index 12fd59fc..69374594 100644 --- a/sdk/libraries/cepgenerator/resources/cep.CMakeLists.txt.in +++ b/sdk/libraries/cepgenerator/resources/cep.CMakeLists.txt.in @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.0) # Find CamiTK SDK set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}) -# From now on, CamiTK is C++11 compliant (this flag is needed for early support of C++11 in g++) +# 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") -- GitLab