Skip to content
Snippets Groups Projects
Commit 5e53955f authored by Adrien Crovato's avatar Adrien Crovato
Browse files

Add automatic handling of CMAKE_PREFIX_PATH of not defined by the user

parent 55b433d7
No related branches found
No related tags found
1 merge request!1Version 0.1.0 (setup)
......@@ -38,7 +38,7 @@ build_test:
- cd ../../fpm
- mkdir build
- cd build
- cmake -DCMAKE_PREFIX_PATH=${CI_PROJECT_DIR}/../waves -Wno-dev ..
- cmake -Wno-dev .. # -DCMAKE_PREFIX_PATH=${CI_PROJECT_DIR}/../waves (handled by default)
- make -j $(nproc)
- ctest -j $(nproc) --output-on-failure #--verbose
- mv ${CI_PROJECT_DIR}/../waves/scripts/format_code.py . # ulgy way to keep a script we need later...
......@@ -53,7 +53,6 @@ format:
stage: fmt_dox
script:
- clang-format --version # we use clang-format-10 exclusively
- ls build
- ./build/format_code.py
- mkdir -p patches
- if git diff --patch --exit-code > patches/clang-format.patch; then echo "Clang format changed nothing"; else echo "Clang format found changes to make!"; false; fi
......
......@@ -26,7 +26,10 @@ FIND_PACKAGE(EIGEN 3.3.4 REQUIRED)
TARGET_INCLUDE_DIRECTORIES(fpm PUBLIC ${EIGEN_INCLUDE_DIRS})
TARGET_COMPILE_DEFINITIONS(fpm PUBLIC EIGEN_DONT_PARALLELIZE)
# -- WAVES
# -- WAVES (if no path is provided, assume that it is located next to fpm)
IF(NOT DEFINED CMAKE_PREFIX_PATH)
SET(CMAKE_PREFIX_PATH "${PROJECT_SOURCE_DIR}/../waves/build")
ENDIF()
FIND_PACKAGE(WAVES REQUIRED)
TARGET_INCLUDE_DIRECTORIES(fpm PUBLIC ${WAVES_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(fpm ${WAVES_LIBRARIES})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment