From 7f7ab6ed64ed342df5ce5f506409dece66c14754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kali=C5=84ski?= <michal.kalinski@pwr.edu.pl> Date: Fri, 5 Aug 2016 13:29:52 +0200 Subject: [PATCH] Made compatible with Ubuntu 16. --- libmwereader/CMakeLists.txt | 5 +++++ libmwereader/tests/CMakeLists.txt | 5 +++++ swig/CMakeLists.txt | 2 +- tests/CMakeLists.txt | 6 +++++- wccl-apps/CMakeLists.txt | 11 +++++++++++ 5 files changed, 27 insertions(+), 2 deletions(-) diff --git a/libmwereader/CMakeLists.txt b/libmwereader/CMakeLists.txt index 093b88c..f3d3dbe 100644 --- a/libmwereader/CMakeLists.txt +++ b/libmwereader/CMakeLists.txt @@ -42,6 +42,11 @@ target_link_libraries(corpus2_mwereader ${LIBS}) set_target_properties(corpus2_mwereader PROPERTIES VERSION "${libmwereader_major}.${libmwereader_minor}" SOVERSION ${libmwereader_major}) +# Newer LibXML++ requires c++11 +if(NOT ${LibXML++_PKGCONF_VERSION} VERSION_LESS 2.40) + set_target_properties(corpus2_mwereader PROPERTIES + CXX_STANDARD 11) +endif() install(TARGETS corpus2_mwereader diff --git a/libmwereader/tests/CMakeLists.txt b/libmwereader/tests/CMakeLists.txt index f7c36ad..fe468fd 100644 --- a/libmwereader/tests/CMakeLists.txt +++ b/libmwereader/tests/CMakeLists.txt @@ -11,3 +11,8 @@ add_executable( mwtests ) target_link_libraries(mwtests corpus2_mwereader ${LIBS} antlr) add_custom_target(mwtest mwtests --log_level=message) +# Newer LibXML++ requires c++11 +if(NOT ${LibXML++_PKGCONF_VERSION} VERSION_LESS 2.40) + set_target_properties(mwtests PROPERTIES + CXX_STANDARD 11) +endif(NOT ${LibXML++_PKGCONF_VERSION} VERSION_LESS 2.40) diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt index 62c0b14..8f3495a 100644 --- a/swig/CMakeLists.txt +++ b/swig/CMakeLists.txt @@ -27,7 +27,7 @@ link_directories(${Libwccl_BINARY_DIR}) FIND_PACKAGE(SWIG REQUIRED) INCLUDE(${SWIG_USE_FILE}) -find_package(PythonLibs) +find_package(PythonLibs 2) find_package(PythonInterp) # idea taken from pyplot build system execute_process( diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7f8557e..3ca296c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -49,6 +49,11 @@ add_executable(tests ) target_link_libraries ( tests wccl ${LIBS} ) +# Newer LibXML++ requires c++11 +if(NOT ${LibXML++_PKGCONF_VERSION} VERSION_LESS 2.40) + set_target_properties(tests PROPERTIES + CXX_STANDARD 11) +endif(NOT ${LibXML++_PKGCONF_VERSION} VERSION_LESS 2.40) include_directories(${Boost_INCLUDE_DIR}) link_directories(${Boost_LIBRARY_DIRS}) @@ -56,4 +61,3 @@ link_directories(${Boost_LIBRARY_DIRS}) add_custom_target(test tests) add_dependencies(test mwtest) add_custom_target(test-verbose test --log_level=message) - diff --git a/wccl-apps/CMakeLists.txt b/wccl-apps/CMakeLists.txt index 14f84f3..70914b4 100644 --- a/wccl-apps/CMakeLists.txt +++ b/wccl-apps/CMakeLists.txt @@ -30,6 +30,17 @@ add_executable(wccl-rules wccl-rules.cpp) target_link_libraries (wccl-rules wccl ${Boost_LIBRARIES} antlr ${LIBS}) add_executable(wccl-parser wccl-parser.cpp) target_link_libraries (wccl-parser wccl ${Boost_LIBRARIES} antlr ${LIBS}) +# Newer LibXML++ requires c++11 +if(NOT ${LibXML++_PKGCONF_VERSION} VERSION_LESS 2.40) + set_target_properties(wccl-features PROPERTIES + CXX_STANDARD 11) + set_target_properties(wccl-run PROPERTIES + CXX_STANDARD 11) + set_target_properties(wccl-rules PROPERTIES + CXX_STANDARD 11) + set_target_properties(wccl-parser PROPERTIES + CXX_STANDARD 11) +endif(NOT ${LibXML++_PKGCONF_VERSION} VERSION_LESS 2.40) install(TARGETS wccl-features wccl-run wccl-rules wccl-parser RUNTIME DESTINATION bin -- GitLab