Tests: Enable some Linux cases on FreeBSD

This commit is contained in:
Gleb Popov
2026-06-22 22:50:38 +03:00
parent 144021a43b
commit ad0dfd51ba
6 changed files with 7 additions and 7 deletions

View File

@@ -80,7 +80,7 @@ set_property(
# Run the install tests.
set(install_deps)
set(rdep_tests)
if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|Windows|Darwin)$" AND NOT CMake_INSTALL_NAME_TOOL_BUG)
if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|Windows|Darwin|FreeBSD)$" AND NOT CMake_INSTALL_NAME_TOOL_BUG)
set(rdep_tests RUNTIME_DEPENDENCIES RUNTIME_DEPENDENCY_SET)
endif()
foreach(name IMPORTED_RUNTIME_ARTIFACTS ${rdep_tests})

View File

@@ -33,7 +33,7 @@ add_subdirectory(version_range)
add_subdirectory(install-IMPORTED_RUNTIME_ARTIFACTS)
# Test install(RUNTIME_DEPENDENCIES) and install(RUNTIME_DEPENDENCY_SET)
if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|Windows|Darwin)$")
if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|Windows|Darwin|FreeBSD)$")
add_subdirectory(install-RUNTIME_DEPENDENCIES)
add_subdirectory(install-RUNTIME_DEPENDENCY_SET)
endif()

View File

@@ -1,6 +1,6 @@
include("${CMAKE_CURRENT_LIST_DIR}/../check_installed.cmake")
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")
set(_dirs [[aaa;aaa/executables;aaa/executables/testExe1-4;aaa/executables/testExe3;aaa/libraries;aaa/libraries/libtestExe2lib\.so;aaa/libraries/libtestLib3lib(-d|-r)?\.so\.1\.2;aaa/libraries/libtestLib3lib(-d|-r)?\.so\.3;aaa/libraries/libtestLib4\.so;aaa/libraries/libtestMod1\.so;aaa/libraries/libtestMod2\.so]])
set(_alldest [[bbb;bbb/libtestExe2lib\.so;bbb/libtestLib3lib(-d|-r)?\.so\.1\.2;bbb/libtestLib3lib(-d|-r)?\.so\.3;bbb/libtestLib4\.so;bbb/libtestMod1\.so;bbb/libtestMod2\.so;bbb/testExe1-4;bbb/testExe3]])
set(_default [[bin;bin/testExe1-4;bin/testExe3;lib;lib/libtestExe2lib\.so;lib/libtestLib3lib(-d|-r)?\.so\.1\.2;lib/libtestLib3lib(-d|-r)?\.so\.3;lib/libtestLib4\.so;lib/libtestMod1\.so;lib/libtestMod2\.so]])

View File

@@ -1,6 +1,6 @@
include("${CMAKE_CURRENT_LIST_DIR}/../check_installed.cmake")
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")
check_installed([[^lib;lib/libdep8\.so;lib/liblib\.so;subdir;subdir/bin;subdir/bin/exe1;subdir/bin/exe2;subdir/lib;subdir/lib/libdep10\.so;subdir/lib/libdep11\.so;subdir/lib/libdep2\.so\.1;subdir/lib/libdep2\.so\.1\.2\.3;subdir/lib/libdep3\.so;subdir/lib/libdep5\.so;subdir/lib/libdep6\.so;subdir/lib/libdep8\.so;subdir/lib/libdep9\.so;subdir/lib/liblib\.so;subdir/lib/libmod\.so;subdir/lib/libsublib1\.so$]])
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
set(_msvc_check [[bin;bin/dep8\.dll;bin/lib\.dll;lib;lib/lib\.(lib|l);subdir;subdir/bin;subdir/bin/dep10\.dll;subdir/bin/dep11\.dll;subdir/bin/dep2\.dll;subdir/bin/dep3\.dll;subdir/bin/dep5\.dll;subdir/bin/dep6\.dll;subdir/bin/dep8\.dll;subdir/bin/dep9\.dll;subdir/bin/exe1\.exe;subdir/bin/exe2\.exe;subdir/bin/lib\.dll;subdir/bin/sublib1\.dll;subdir/lib;subdir/lib/mod\.dll]])

View File

@@ -1,6 +1,6 @@
include("${CMAKE_CURRENT_LIST_DIR}/../check_installed.cmake")
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")
check_installed([[^bin;bin/exe;lib;lib/libdep1\.so;lib/libdep3\.so;lib/libdeplib\.so;yyy;yyy/lib;yyy/lib/libdep1\.so;yyy/lib/libdep3\.so;yyy/lib/libdep4\.so;zzz;zzz/libdep1\.so;zzz/libdep3\.so;zzz/libdep4\.so$]])
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
set(_msvc_check [[bin;bin/dep1\.dll;bin/dep3\.dll;bin/deplib\.dll;bin/exe\.exe;yyy;yyy/bin;yyy/bin/dep1\.dll;yyy/bin/dep3\.dll;yyy/bin/dep4\.dll;zzz;zzz/dep1\.dll;zzz/dep3\.dll;zzz/dep4\.dll]])

View File

@@ -58,7 +58,7 @@ function(run_cmake_EDIT_RPATH_only case)
run_cmake(${case})
else()
# Sanity check against a platform known to be ELF-based
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
message(FATAL_ERROR "Expected platform Linux to advertise itself as ELF-based, but it did not.")
elseif(CMAKE_SYSTEM_NAME STREQUAL "AIX")
message(FATAL_ERROR "Expected platform AIX to advertise itself as XCOFF-based, but it did not.")
@@ -216,7 +216,7 @@ elseif (CMake_TEST_install_VARIANT STREQUAL "Targets")
run_cmake(TARGETS-RUNTIME_DEPENDENCIES-macos-no-framework)
endif()
if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|Darwin|Windows)$")
if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|Darwin|Windows|FreeBSD)$")
run_install_test(TARGETS-RUNTIME_DEPENDENCIES-nodep)
run_install_test(TARGETS-RUNTIME_DEPENDENCIES-empty)
set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME:STRING=${CMAKE_SYSTEM_NAME}")