On Thu, 10 Aug 2017, Rafael Sadowski wrote:

> On Thu Aug 10, 2017 at 05:26:46PM +0200, David Coppa wrote:
> > 
> > Hi all,
> > 
> > Here's the update to the latest CMake.
> > 
> > As usual, I'd like to have the attached diff tested in a ports bulk
> > build...
> > 
> > Thanks!
> > David
> 
> $ make regress
> 100% tests passed, 0 tests failed out of 451
> 
> CMake tests are all green but it breaks my graphics/lensfun build:

...

> FAILED: tests/CMakeFiles/test_modifier.dir/test_modifier.cpp.o
> /usr/ports/pobj/lensfun-0.3.2/bin/c++   -I. 
> -I/usr/ports/pobj/lensfun-0.3.2/lensfun-0.3.2/include/lensfun -isystem 
> /usr/local/lib/glib-2.0/include -isystem /usr/local/include/glib-2.0 -O2 
> -pipe NOTFOUND -DNDEBUG -MD -MT 
> tests/CMakeFiles/test_modifier.dir/test_modifier.cpp.o -MF 
> tests/CMakeFiles/test_modifier.dir/test_modifier.cpp.o.d -o 
> tests/CMakeFiles/test_modifier.dir/test_modifier.cpp.o -c 
> /usr/ports/pobj/lensfun-0.3.2/lensfun-0.3.2/tests/test_modifier.cpp
> c++: error: no such file or directory: 'NOTFOUND'
> ninja: build stopped: subcommand failed.
> *** Error 1 in . (/usr/ports/devel/cmake/cmake.port.mk:31 'do-build': @cd 
> /usr/ports/pobj/lensfun-0.3.2/build-amd64 && exec /usr/bin/env -i ...)
> *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2701 
> '/usr/ports/pobj/lensfun-0.3.2/build-amd64/.build_done')
> *** Error 1 in /usr/ports/graphics/lensfun 
> (/usr/ports/infrastructure/mk/bsd.port.mk:2408 'all')

CMake-3.9 found a bug: "${OpenMP_CXX_FLAGS}" should not be used
unconditionally...

Index: patches/patch-tests_CMakeLists_txt
===================================================================
RCS file: patches/patch-tests_CMakeLists_txt
diff -N patches/patch-tests_CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-tests_CMakeLists_txt  11 Aug 2017 05:00:09 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+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})

Reply via email to