Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize hemeXtract #1

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: build
on: [push, pull_request]

jobs:
build_debug:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest,macos-latest]
toolchain:
- {compiler: gcc, cxx: g++-12}
- {compiler: clang, cxx: clang++}
env:
CXX: ${{ matrix.toolchain.cxx }}

steps:
- name: Checkout source code
uses: actions/checkout@v3

- name: Install argp-standalone (MacOS)
if: contains(matrix.os, 'macos')
run: |
brew install argp-standalone

- name: Install libtirpc (Ubuntu)
if: contains(matrix.os,'ubuntu')
run: |
sudo apt-get install libtirpc-dev
export TIRPC_DIR=/usr

- name: Build hemeXtract
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
make hemeXtract
31 changes: 31 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)

project(hemeXtract
VERSION 0.1.0
LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 14)

set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

find_package(argp REQUIRED)

if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
find_package(TIRPC REQUIRED)
endif()

add_executable(hemeXtract
src/hemeXtract.cc
src/Mapping.cc
src/Snapshot.cc
src/Compare.cc
src/HemeLBExtractionFile.cc)
target_include_directories(hemeXtract PRIVATE include/)

target_include_directories(hemeXtract PRIVATE ${argp_INCLUDE_DIRS})
target_link_libraries(hemeXtract PRIVATE ${argp_LIBRARIES})

if(TIRPC_FOUND)
target_include_directories(hemeXtract PRIVATE ${TIRPC_INCLUDE_DIRS})
target_link_libraries(hemeXtract PRIVATE ${TIRPC_LIBRARY})
endif()
Loading