Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Apr 2021 18:31:40 GMT
From:      Adriaan de Groot <adridg@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 1b240c8d4d42 - main - misc/mxnet: don't build the tests if testing is not enabled
Message-ID:  <202104161831.13GIVe6n093235@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by adridg:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1b240c8d4d427bf16a8fc0cf7ad4e831620aa2e6

commit 1b240c8d4d427bf16a8fc0cf7ad4e831620aa2e6
Author:     Adriaan de Groot <adridg@FreeBSD.org>
AuthorDate: 2021-04-15 23:15:52 +0000
Commit:     Adriaan de Groot <adridg@FreeBSD.org>
CommitDate: 2021-04-16 18:31:06 +0000

    misc/mxnet: don't build the tests if testing is not enabled
    
    Local (testport) builds were failing like so:
    
    ld: error: undefined symbol: testing::Message::GetString() const
    >>> referenced by base.cc
    >>>               tests/CMakeFiles/mxnet_unit_tests.dir/cpp/misc/base.cc.o:(testing::AssertionResult::AppendMessage(testing::Message const&))
    
    because the testing libraries were not being linked -- because
    they're not even searched for when testing is not enabled.
    Extend previous patch that put the searching-for-testlibs
    behind a check, to apply the same check to building-tests.
---
 misc/mxnet/files/patch-CMakeLists.txt | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/misc/mxnet/files/patch-CMakeLists.txt b/misc/mxnet/files/patch-CMakeLists.txt
index 8c50b22bf675..239130b5f5ee 100644
--- a/misc/mxnet/files/patch-CMakeLists.txt
+++ b/misc/mxnet/files/patch-CMakeLists.txt
@@ -1,6 +1,6 @@
---- CMakeLists.txt.orig	2019-12-13 19:55:11 UTC
+--- CMakeLists.txt.orig	2020-07-15 07:03:28 UTC
 +++ CMakeLists.txt
-@@ -490,6 +490,7 @@ if(USE_JEMALLOC)
+@@ -464,6 +464,7 @@ if(USE_JEMALLOC)
    endif()
  endif()
  
@@ -8,15 +8,15 @@
  include(CTest)
  set(GTEST_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/googletest/googletest")
  set(GTEST_INCLUDE_DIR ${GTEST_ROOT}/include)
-@@ -500,6 +501,7 @@ set(GTEST_LIBRARY gtest)
+@@ -474,6 +475,7 @@ set(GTEST_LIBRARY gtest)
  
  add_subdirectory(${GTEST_ROOT})
  find_package(GTest REQUIRED)
 +endif()
  
  # cudnn detection
- if(USE_CUDNN AND USE_CUDA)
-@@ -819,7 +821,7 @@ install(TARGETS ${MXNET_INSTALL_TARGETS}
+ if(USE_CUDNN)
+@@ -865,7 +867,7 @@ install(TARGETS ${MXNET_INSTALL_TARGETS}
  #       https://cmake.org/cmake/help/v3.0/module/GNUInstallDirs.html
  
  install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/dlpack/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
@@ -25,3 +25,13 @@
  if(USE_MKLDNN)
    install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/mkldnn/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
  endif()
+@@ -913,7 +915,9 @@ endif()
+ if(BUILD_CPP_EXAMPLES)
+   add_subdirectory(example/image-classification/predict-cpp)
+ endif()
++if(ENABLE_TESTING)
+ add_subdirectory(tests)
++endif()
+ 
+ # ---[ Linter target
+ if(MSVC)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104161831.13GIVe6n093235>