Skip to content

Commit

Permalink
Merge pull request #90 from ManuelLerchner/add-library-headers
Browse files Browse the repository at this point in the history
Fix compilation on CoolMuc
  • Loading branch information
TobiasEppacher authored Dec 18, 2023
2 parents 2ff4e98 + 6b81658 commit 554b2e8
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ runs:
- name: Install c++ libs
run: |
sudo apt install libxerces-c-dev -y
sudo apt install libboost-program-options-dev -y
sudo apt install build-essential libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-test-dev -y
shell: bash
1 change: 1 addition & 0 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: ./.github/actions/install-dependencies

- name: Install clang-format
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-dependencies

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y doxygen
sudo apt-get install -y graphviz
sudo apt-get install -y cmake
sudo apt-get install -y cmake
- name: Build docs
run: |
Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ endif()
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/)

# project dependencies
include(spdlog)
include(boost_program_options)
include(libxsd)
include(spdlog)
include(xercesc)

# tests and documentation
include(gtest) #provides a BUILD_TESTS option
Expand Down
3 changes: 3 additions & 0 deletions cmake/modules/boost_program_options.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Load the Boost libraries

find_package(Boost COMPONENTS program_options REQUIRED)
3 changes: 3 additions & 0 deletions cmake/modules/xercesc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Load the XercesC package

find_package(XercesC 3.2.0 REQUIRED)
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ list(REMOVE_ITEM PROJECT_SRC "${CMAKE_CURRENT_SOURCE_DIR}/MolSim.cpp")
add_library(project_lib ${PROJECT_SRC}
simulation/SimulationParams.cpp)

target_include_directories(project_lib PUBLIC
target_include_directories(project_lib PUBLIC
${libxsd_SOURCE_DIR}
${spdlog_SOURCE_DIR}/include)

target_link_libraries(project_lib PUBLIC xerces-c boost_program_options spdlog::spdlog)
target_link_libraries(project_lib PUBLIC XercesC::XercesC spdlog::spdlog Boost::program_options)

add_executable(MolSim MolSim.cpp)
target_link_libraries(MolSim PUBLIC project_lib)
Expand Down

0 comments on commit 554b2e8

Please sign in to comment.