From 8837fea64910e8f2e45bebe25c3733a8250ebca8 Mon Sep 17 00:00:00 2001 From: skachano Date: Thu, 18 Feb 2016 11:13:57 +0000 Subject: Improved the benching program a bit git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/relaxed-witness@1030 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: dc3d13fa785bee42a574134519b05e98b934d6f5 --- src/Persistent_cohomology/example/CMakeLists.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/Persistent_cohomology/example') diff --git a/src/Persistent_cohomology/example/CMakeLists.txt b/src/Persistent_cohomology/example/CMakeLists.txt index 95506631..772193c4 100644 --- a/src/Persistent_cohomology/example/CMakeLists.txt +++ b/src/Persistent_cohomology/example/CMakeLists.txt @@ -31,6 +31,7 @@ add_test(persistence_from_file_3_3_100 ${CMAKE_CURRENT_BINARY_DIR}/persistence_f if(GMPXX_FOUND AND GMP_FOUND) message("GMPXX_LIBRARIES = ${GMPXX_LIBRARIES}") message("GMP_LIBRARIES = ${GMP_LIBRARIES}") + message("CGAL_LIBRARY = ${CGAL_LIBRARY}") add_executable(rips_multifield_persistence rips_multifield_persistence.cpp ) target_link_libraries(rips_multifield_persistence ${Boost_SYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES}) @@ -40,6 +41,21 @@ if(GMPXX_FOUND AND GMP_FOUND) target_link_libraries(performance_rips_persistence ${Boost_SYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES}) if(CGAL_FOUND) + 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 if (CMAKE_BUILD_TYPE MATCHES Debug) # For programs to be more verbose add_definitions(-DDEBUG_TRACES) -- cgit v1.2.3 From d070c2916225acdd928db5929c0cab02589ca8a8 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 28 Feb 2017 16:46:54 +0000 Subject: Move boost flags for MSVC compilation issue (already moved on rev. 2115) git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/relaxed-witness@2121 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 1f2f185fbfbbd56ef9fb5a96b2d75a65db4c850e --- src/Persistent_cohomology/example/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/Persistent_cohomology/example') diff --git a/src/Persistent_cohomology/example/CMakeLists.txt b/src/Persistent_cohomology/example/CMakeLists.txt index 38d7e9a9..d2a84b1e 100644 --- a/src/Persistent_cohomology/example/CMakeLists.txt +++ b/src/Persistent_cohomology/example/CMakeLists.txt @@ -1,10 +1,6 @@ cmake_minimum_required(VERSION 2.6) project(Persistent_cohomology_examples) -# problem with Visual Studio link on Boost program_options -add_definitions( -DBOOST_ALL_NO_LIB ) -add_definitions( -DBOOST_ALL_DYN_LINK ) - add_executable(plain_homology plain_homology.cpp) target_link_libraries(plain_homology ${Boost_SYSTEM_LIBRARY}) -- cgit v1.2.3