Skip to content

Unknown CMake command "get_target_output_dir" in BareosSystemtestFunctions.cmake line 122 #2231

@rainerjung

Description

@rainerjung

Bareos component version

24.0.2

Steps to reproduce

rpmbuild -ba -v bareos.spec

Expected results

RPM packages get build

Actual results

...
Entering /opt/dev/bareos/rpmbuild/20250327-132831/BUILD/bareos/systemtests
   SYSTEMTESTS_S3_USE_HTTPS: ON
-- POSTGRES_BIN_PATH is /usr/bin
-- RUN_SYSTEMTESTS_ON_INSTALLED_FILES="OFF"
-- Looking for binaries and paths...
CMake Error at systemtests/cmake/BareosSystemtestFunctions.cmake:122 (get_target_output_dir):
  Unknown CMake command "get_target_output_dir".
Call Stack (most recent call first):
  systemtests/cmake/BareosSystemtestFunctions.cmake:190 (find_compiled_binary_and_set_binary_name_to_test_variable_for)
  systemtests/CMakeLists.txt:181 (find_systemtests_binary_paths)

Environment

Linux (various distributions an versions)

Relevant log output

Relevant traces output

Anything else?

Patch suggestion:

--- bareos/systemtests/CMakeLists.txt	2025-03-27 10:03:40.000000000 +0100
+++ bareos/systemtests/CMakeLists.txt	2025-03-27 13:09:22.014428254 +0100
@@ -85,6 +85,7 @@
 endif()
 
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+include(BareosTargetTools)
 include(BareosSystemtestFunctions)
 
 # ps is required for systemtests

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis addresses a bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions