From 1c87c108962a70bf705abe8ea48ac415588afeae Mon Sep 17 00:00:00 2001 From: dcoppa Date: Fri, 11 Aug 2017 10:26:05 +0000 Subject: [PATCH] Bugfix: ${OpenMP_CXX_FLAGS} was used unconditionally Fix building lensfun with CMake-3.9 --- .../lensfun/patches/patch-tests_CMakeLists_txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 graphics/lensfun/patches/patch-tests_CMakeLists_txt diff --git a/graphics/lensfun/patches/patch-tests_CMakeLists_txt b/graphics/lensfun/patches/patch-tests_CMakeLists_txt new file mode 100644 index 00000000000..e5a8519018c --- /dev/null +++ b/graphics/lensfun/patches/patch-tests_CMakeLists_txt @@ -0,0 +1,16 @@ +$OpenBSD: patch-tests_CMakeLists_txt,v 1.1 2017/08/11 10:26:05 dcoppa Exp $ + +Index: tests/CMakeLists.txt +--- tests/CMakeLists.txt.orig ++++ tests/CMakeLists.txt +@@ -7,7 +7,9 @@ TARGET_LINK_LIBRARIES(test_modifier lensfun ${COMMON_L + ADD_TEST(Modifier test_modifier) + + find_package(OpenMP) +-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") ++if(OpenMP_CXX_FOUND) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") ++endif() + + ADD_EXECUTABLE(test_modifier_color test_modifier_color.cpp) + TARGET_LINK_LIBRARIES(test_modifier_color lensfun ${COMMON_LIBS})