Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@
the version. Like `hipObjGetVersionString()`, it doesn't need
`hipObjInit()`. The new `get-version` example, installed with the
others, shows how to use it.
- A project that adds hipObject with `add_subdirectory()` or
`FetchContent` can link the library as `hipobj::hipobj`, the name the
installed package gives it, as well as `hipobj`.

### Changed

Expand Down Expand Up @@ -312,6 +315,9 @@
ROCm. The option defaults to what the compiler does without it: `ON`
with GCC, and `OFF` with Clang, since Clang 18's shared runtimes ignore
the run-time options that hipObject's programs set.
- Building the MinIO bridge (`HIPOBJ_MINIO_CLIENT=ON`) requires OpenSSL 3
or later, which every supported platform has. Configuring fails with an
older OpenSSL.

### Removed

Expand Down Expand Up @@ -441,6 +447,10 @@
can't find them otherwise. It now also lists the CMake options for
sanitizers, clang-tidy, and include-what-you-use, and the environment
variables that hipObject reads when it runs.
- When the tests were built with a GoogleTest that the build downloaded,
`cmake --install` installed GoogleTest's headers, libraries, and CMake
and pkg-config files in hipObject's prefix too. The packages weren't
affected.

### Known issues

3 changes: 2 additions & 1 deletion cmake/HIPOBJMinioCppDeps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

include(FetchContent)

find_package(OpenSSL REQUIRED)
# The packages' dependencies name OpenSSL 3's libraries
find_package(OpenSSL 3 REQUIRED)
if(NOT OpenSSL_FOUND)
message(FATAL_ERROR
"HIPOBJ_MINIO_CLIENT requires OpenSSL development headers. "
Expand Down
6 changes: 5 additions & 1 deletion cmake/HIPOBJUseGTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ if(hipobj_fetch_gtest)
CACHE BOOL "" FORCE)
set(BUILD_GMOCK OFF
CACHE BOOL "" FORCE)
# GoogleTest's install rules have no component, so without this,
# cmake --install would put GoogleTest in hipObject's prefix
set(INSTALL_GTEST OFF
CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
endif()

Expand All @@ -50,7 +54,7 @@ function(hipobj_add_test TEST_NAME TEST_SOURCE)
NAME ${TEST_NAME}
SRCS ${TEST_SOURCE})
# Link the unit-test object build, not the shipped library, so tests
# can call internal functions, such as the ones that swap seams.
# can call the library's internal functions and classes.
target_link_libraries(${TEST_NAME} PRIVATE
hipobj_test_objects
GTest::gtest
Expand Down
12 changes: 3 additions & 9 deletions integrations/minio-cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,9 @@ hipobj_add_runtime_library_dependency(
hipobj_add_runtime_library_dependency(
SONAMES libz.so.1
DEB zlib1g)
if(OPENSSL_VERSION VERSION_GREATER_EQUAL 3)
hipobj_add_runtime_library_dependency(
SONAMES libssl.so.3 libcrypto.so.3
DEB libssl3t64)
else()
hipobj_add_runtime_library_dependency(
SONAMES libssl.so.1.1 libcrypto.so.1.1
DEB libssl1.1)
endif()
hipobj_add_runtime_library_dependency(
SONAMES libssl.so.3 libcrypto.so.3
DEB libssl3t64)
# pugixml and curlpp are only shared libraries when they're the
# system's. Otherwise they're built here as static libraries.
if(pugixml_FOUND)
Expand Down
2 changes: 0 additions & 2 deletions integrations/minio-cpp/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#
# SPDX-License-Identifier: MIT

include(${PROJECT_SOURCE_DIR}/cmake/HIPOBJUseGTest.cmake)

# Don't link hipobj_minio here. hipobj_add_test() already links the
# hipobj_test_objects copy of the library sources, and hipobj_minio
# links hipobj, so a shared hipobj would put a second copy of every
Expand Down
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ hipobj_add_library(
NAME hipobj
SRCS ${HIPOBJ_SOURCES})

# The name the installed package gives the library, so a project that
# adds hipObject with add_subdirectory() or FetchContent can use it too
add_library(hipobj::hipobj ALIAS hipobj)

# Only the functions marked HIPOBJ_API in include/hipobj.h are exported
# from the shared library. VISIBILITY_INLINES_HIDDEN also hides inline
# member functions. Neither hides C++ standard library template
Expand Down
4 changes: 1 addition & 3 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ if(NOT CMAKE_SKIP_INSTALL_RULES)
add_subdirectory(install)
endif()

if(BUILD_TESTING)
add_subdirectory(integration)
endif()
add_subdirectory(integration)
16 changes: 0 additions & 16 deletions test/common/test-common.h

This file was deleted.

5 changes: 5 additions & 0 deletions test/subproject/parent/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_BINARY_DIR}/parent-prefix")

add_subdirectory(${HIPOBJ_SUBPROJECT_SOURCE_DIR} hipobject)

# A superproject links the library by the installed package's name
if(NOT TARGET hipobj::hipobj)
message(FATAL_ERROR "hipObject doesn't define the hipobj::hipobj target")
endif()

# hipObject's subproject test has to pass on CMAKE_PREFIX_PATH as
# hipObject received it: with the prefix above, and without the ROCm
# prefixes hipObject adds itself
Expand Down
Loading