summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorfgodi <fgodi@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-04-04 13:14:31 +0000
committerfgodi <fgodi@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-04-04 13:14:31 +0000
commitfa1ff1284f51341d452b6adc3a667d13a5d35747 (patch)
treeacad49f44643f6ed5f69707377732790ef463ada /src/CMakeLists.txt
parent42a123c74255be2e2471eb35fd9226ceea5a011c (diff)
cmake lists
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/bottleneckDistance@1092 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 77b2a427cb3ff80b9a0c5d1c71f9f1de11547530
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ceb993fa..1436d65a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -40,4 +40,20 @@ else()
add_subdirectory(example/Alpha_shapes)
add_subdirectory(example/Bottleneck)
-endif()
+endif()
+
+ include( ${CGAL_USE_FILE} )
+ # In CMakeLists.txt, when include(${CGAL_USE_FILE}), CXX_FLAGS are overwritten.
+ # cf. http://doc.cgal.org/latest/Manual/installation.html#title40
+ # A workaround is to add "-std=c++11" again.
+ # A fix would be to use https://cmake.org/cmake/help/v3.1/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html
+ # or even better https://cmake.org/cmake/help/v3.1/variable/CMAKE_CXX_STANDARD.html
+ # but it implies to use cmake version 3.1 at least.
+ if(NOT MSVC)
+ include(CheckCXXCompilerFlag)
+ CHECK_CXX_COMPILER_FLAG(-std=c++11 COMPILER_SUPPORTS_CXX11)
+ if(COMPILER_SUPPORTS_CXX11)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ endif()
+ endif()
+ # - End of workaround