File grantlee-5.2.0-fix-ctest-ld-library-path.patch of Package grantlee5
From: Matthias Fehring <buschmann23@opensuse.org>
Date: 2019-12-19 14:39:00 +0100
Subject: fix ctest not finding libraries
Upstream: no
As rpath is skipped, the libraries can not be found
by the tests.
---
templates/tests/CMakeLists.txt | 1 +
textdocument/tests/CMakeLists.txt | 1 +
2 files changed, 2 insertions(+)
Index: grantlee-5.3.1/textdocument/tests/CMakeLists.txt
===================================================================
--- grantlee-5.3.1.orig/textdocument/tests/CMakeLists.txt
+++ grantlee-5.3.1/textdocument/tests/CMakeLists.txt
@@ -23,6 +23,7 @@ macro(GRANTLEE_TEXTDOCUMENT_UNIT_TESTS)
add_test(${_testname} ${_testname}_exec )
target_link_libraries(${_testname}_exec Grantlee::TextDocument textdocument_test_builtins)
set_property(GLOBAL APPEND PROPERTY TEST_COVERAGE "${CMAKE_CURRENT_BINARY_DIR}/${_testname}_exec" )
+ set_property(TEST ${_testname} PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/textdocument/lib")
endforeach(_testname)
endmacro(GRANTLEE_TEXTDOCUMENT_UNIT_TESTS)
Index: grantlee-5.3.1/templates/tests/CMakeLists.txt
===================================================================
--- grantlee-5.3.1.orig/templates/tests/CMakeLists.txt
+++ grantlee-5.3.1/templates/tests/CMakeLists.txt
@@ -89,6 +89,7 @@ macro(grantlee_templates_unit_tests)
endif()
set_property(GLOBAL APPEND PROPERTY TEST_COVERAGE "${CMAKE_CURRENT_BINARY_DIR}/${_testname}_exec" )
+ set_property(TEST ${_testname} PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/templates/lib:${CMAKE_BINARY_DIR}/grantlee")
endforeach(_testname)
endmacro()