Skip to content

Commit

Permalink
Try to fix gcov for macos on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ClausKlein committed Nov 23, 2024
1 parent 0ee9ae7 commit df55f5e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: macos clang++-19 ${{ matrix.preset }}
if: startsWith(matrix.compiler, 'clang')
run: CXX=$(brew --prefix llvm@19)/bin/clang++ cmake --workflow --preset ${{ matrix.preset }}
run: GCOV=$(brew --prefix llvm@19)/bin/llvm-cov CXX=$(brew --prefix llvm@19)/bin/clang++ cmake --workflow --preset ${{ matrix.preset }}

- name: macos g++ ${{ matrix.preset }}
if: startsWith(matrix.compiler, 'g++')
Expand Down
64 changes: 32 additions & 32 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,14 @@ target_compile_features(

# export cmake config package
block()
# copied from execution26:
set(TARGET_NAME beman_inplace_vector)
set(TARGET_NAMESPACE beman)
# set(TARGET_PREFIX ${TARGET_NAMESPACE}.${TARGET_NAME}) # FIXME: not used yet? CK
# NOTE: copied from execution26:
# FIXME: but not yet used? CK
# set(TARGET_NAME inplace_vector)
# set(TARGET_NAMESPACE beman)
# set(TARGET_PREFIX ${TARGET_NAMESPACE}.${TARGET_NAME})
# set(TARGET_LIBRARY ${PROJECT_NAME})
# set(TARGET_ALIAS ${TARGET_NAMESPACE}::${TARGET_LIBRARY})

set(TARGET_PACKAGE_NAME ${PROJECT_NAME}-config)
set(TARGETS_EXPORT_NAME ${PROJECT_NAME}-targets)
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
Expand All @@ -80,36 +82,34 @@ block()
FILE_SET inplace_vector_public_headers
)

if(EXISTS cmake/Config.cmake.in)
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/${TARGET_PACKAGE_NAME}-version.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion
)
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/${TARGET_PACKAGE_NAME}-version.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion
)

configure_package_config_file(
cmake/Config.cmake.in
configure_package_config_file(
cmake/Config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${TARGET_PACKAGE_NAME}.cmake
INSTALL_DESTINATION ${INSTALL_CONFIGDIR}
)

install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/${TARGET_PACKAGE_NAME}.cmake
INSTALL_DESTINATION ${INSTALL_CONFIGDIR}
)

install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/${TARGET_PACKAGE_NAME}.cmake
${CMAKE_CURRENT_BINARY_DIR}/${TARGET_PACKAGE_NAME}-version.cmake
DESTINATION ${INSTALL_CONFIGDIR}
)

install(
EXPORT ${TARGETS_EXPORT_NAME}
FILE ${TARGETS_EXPORT_NAME}.cmake
DESTINATION "${INSTALL_CONFIGDIR}"
NAMESPACE beman::
)

set(CPACK_GENERATOR TGZ)
include(CPack)
endif()
${CMAKE_CURRENT_BINARY_DIR}/${TARGET_PACKAGE_NAME}-version.cmake
DESTINATION ${INSTALL_CONFIGDIR}
)

install(
EXPORT ${TARGETS_EXPORT_NAME}
FILE ${TARGETS_EXPORT_NAME}.cmake
DESTINATION "${INSTALL_CONFIGDIR}"
NAMESPACE beman::
)

set(CPACK_GENERATOR TGZ)
include(CPack)
endblock()

if(BEMAN_INPLACE_VECTOR_BUILD_TESTS)
Expand Down
2 changes: 1 addition & 1 deletion cmake/CMakeDarwinPresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"CMAKE_CONFIGURATION_TYPES": "Debug;RelWithDebInfo;Coverage;Asan;Lsan;Usan",
"CMAKE_CXX_FLAGS": "-Wall -Wextra -Wpedantic",
"CMAKE_C_FLAGS": "-Wall -Wextra -Wpedantic",
"GCOV_EXECUTABLE": "llvm-cov gcov"
"GCOV_EXECUTABLE": "$env{GCOV} gcov"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion cmake/CMakeLinuxPresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"CMAKE_CONFIGURATION_TYPES": "Debug;RelWithDebInfo;Coverage;Asan;Lsan;Usan",
"CMAKE_CXX_FLAGS": "-Wall -Wextra -Wpedantic",
"CMAKE_C_FLAGS": "-Wall -Wextra -Wpedantic",
"GCOV_EXECUTABLE": "llvm-cov gcov"
"GCOV_EXECUTABLE": "$env{GCOV} gcov"
}
},
{
Expand Down

0 comments on commit df55f5e

Please sign in to comment.