Skip to content

Commit

Permalink
Validate CMake integration
Browse files Browse the repository at this point in the history
Closes #538
  • Loading branch information
serge-sans-paille committed Oct 14, 2024
1 parent 49be336 commit c7caa48
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/cmake-test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 3.19)
project(test VERSION 0.0.1)

find_package(xsimd REQUIRED)

add_executable(test main.cpp)
target_link_libraries(test PUBLIC xsimd)
6 changes: 6 additions & 0 deletions .github/cmake-test/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "xsimd/xsimd.hpp"

int main()
{
return 0;
}
29 changes: 29 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CMake integration
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout xsimd
uses: actions/checkout@v3
- name: Configure build
run: |
mkdir _build && cd _build
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=_install
- name: Build
run: cmake --build _build --target install
- name: Check install
run: |
mkdir _install_build && cd _install_build
cp ${{ github.workspace }}/.github/cmake-test/* .
ls $PWD/../_build/_install/share/cmake/xsimd
cmake . -DCMAKE_PREFIX_PATH=$PWD/../_build/_install/share/cmake/xsimd
cmake --build .

0 comments on commit c7caa48

Please sign in to comment.