Skip to content

Commit

Permalink
Ensure that tests pass fine with GZ_RELOCATABLE_INSTALL option enabled (
Browse files Browse the repository at this point in the history
#394)

Signed-off-by: Silvio Traversaro <[email protected]>
Co-authored-by: Michael Carroll <[email protected]>
  • Loading branch information
traversaro and mjcarroll authored Nov 7, 2023
1 parent 3d60486 commit 4f32cf4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ gz_build_tests(TYPE UNIT
${gtest_sources}
LIB_DEPS
TINYXML2::TINYXML2
ENVIRONMENT
GZ_MSG_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
)

add_subdirectory(include/gz/msgs)
Expand Down
3 changes: 2 additions & 1 deletion test/integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ if (NOT HAVE_GZ_TOOLS)
list(REMOVE_ITEM tests gz_TEST.cc)
endif()

gz_build_tests(TYPE INTEGRATION SOURCES ${tests} TEST_LIST test_targets)
gz_build_tests(TYPE INTEGRATION SOURCES ${tests} TEST_LIST test_targets
ENVIRONMENT GZ_MSG_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX})

foreach(test ${test_targets})
target_link_libraries(${test} ${PROJECT_LIBRARY_TARGET_NAME})
Expand Down
3 changes: 2 additions & 1 deletion test/performance/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
gz_get_sources(tests)

gz_build_tests(TYPE PERFORMANCE SOURCES ${tests})
gz_build_tests(TYPE PERFORMANCE SOURCES ${tests}
ENVIRONMENT GZ_MSG_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX})
3 changes: 2 additions & 1 deletion test/regression/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
gz_get_sources(tests)

gz_build_tests(TYPE REGRESSION SOURCES ${tests})
gz_build_tests(TYPE REGRESSION SOURCES ${tests}
ENVIRONMENT GZ_MSG_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX})

0 comments on commit 4f32cf4

Please sign in to comment.