-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Cmake commands to install byteme for find_package. (#1)
Also added an action to check for correct installation.
- Loading branch information
Showing
5 changed files
with
92 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
name: Check CMake install | ||
|
||
jobs: | ||
install: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get latest CMake | ||
uses: lukka/get-cmake@latest | ||
|
||
- name: Install byteme | ||
run: | | ||
git clone https://github.com/LTLA/byteme dep-byteme --depth=1 | ||
cd dep-byteme | ||
cmake -S . -B build | ||
sudo cmake --install build | ||
- name: Configure the build | ||
run: cmake -S . -B build | ||
|
||
- name: Install the library | ||
run: sudo cmake --install build | ||
|
||
- name: Test downstream usage | ||
run: | | ||
mkdir _downstream | ||
touch _downstream/source.cpp | ||
cat << EOF > _downstream/CMakeLists.txt | ||
cmake_minimum_required(VERSION 3.24) | ||
project(test_install) | ||
add_executable(whee source.cpp) | ||
find_package(tatami_eminem) | ||
target_link_libraries(whee tatami::eminem) | ||
EOF | ||
cd _downstream && cmake -S . -B build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@PACKAGE_INIT@ | ||
|
||
include(CMakeFindDependencyMacro) | ||
find_dependency(ltla_byteme CONFIG REQUIRED) | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/tatami_eminemTargets.cmake") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters