Skip to content

Commit

Permalink
Merge pull request #526 from nicolasbock/fix_build
Browse files Browse the repository at this point in the history
Fix missing build targets
  • Loading branch information
nicolasbock authored Jul 12, 2021
2 parents 782f514 + 012fa6a commit 7c4e692
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 20 deletions.
12 changes: 5 additions & 7 deletions .dir-locals.el
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")

((c-mode
((c-basic-offset . 4)
(c-offsets-alist . ((arglist-intro . 4)))))
(f90-mode
((f90-if-indent . 2)
(f90-do-indent . 2)
(f90-type-indent . 2))))
((c-mode . (((c-basic-offset . 4) . ((c-offsets-alist
(arglist-intro . 4))))))
(f90-mode . (((f90-if-indent . 2) . ((f90-do-indent . 2)
(f90-type-indent . 2)))))
(sh-mode . ((sh-basic-offset . 4))))
27 changes: 14 additions & 13 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ if (( $? != 0 )); then
TOP_DIR=$(pwd -P $TOP_DIR)
fi

: ${CMAKE:=cmake}
: ${BUILD_DIR:=${TOP_DIR}/build}
: ${INSTALL_DIR:=${TOP_DIR}/install}
: ${PARALLEL_TEST_JOBS:=1}
Expand Down Expand Up @@ -172,7 +173,7 @@ configure() {
if [[ -f "${BUILD_DIR}/CMakeCache.txt" ]]; then
rm -v "${BUILD_DIR}/CMakeCache.txt" || die
fi
${CMAKE:=cmake} .. \
${CMAKE} .. \
-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
-DCMAKE_C_COMPILER="${CC}" \
-DCMAKE_CXX_COMPILER="${CXX}" \
Expand Down Expand Up @@ -220,12 +221,12 @@ configure() {
}

compile() {
cmake --build "${BUILD_DIR}" | tee --append "${LOG_FILE}"
${CMAKE} --build "${BUILD_DIR}" | tee --append "${LOG_FILE}"
check_pipe_error
}

docs() {
cmake --build "${BUILD_DIR}" --target docs 2>&1 | tee --append "${LOG_FILE}"
${CMAKE} --build "${BUILD_DIR}" --target docs 2>&1 | tee --append "${LOG_FILE}"
check_pipe_error
#make -C "${BUILD_DIR}/doc/latex" 2>&1 | tee -a "${LOG_FILE}"
#check_pipe_error
Expand All @@ -235,16 +236,16 @@ docs() {
}

install() {
cmake --install "${BUILD_DIR}" 2>&1 | tee --append "${LOG_FILE}"
${CMAKE} --build "${BUILD_DIR}" --target install 2>&1 | tee --append "${LOG_FILE}"
check_pipe_error
}

testing() {
cd "${BUILD_DIR}"
ctest --output-on-failure \
--parallel ${PARALLEL_TEST_JOBS} \
${TESTING_EXTRA_ARGS} \
2>&1 | tee --append "${LOG_FILE}"
--parallel ${PARALLEL_TEST_JOBS} \
${TESTING_EXTRA_ARGS} \
2>&1 | tee --append "${LOG_FILE}"
check_pipe_error

# Get skipped tests and re-run them with verbose output.
Expand All @@ -254,11 +255,11 @@ testing() {
echo "Found skipped tests: ${SKIPPED_TESTS[*]}"
local skipped
for skipped in "${SKIPPED_TESTS[@]}"; do
echo "Re-running skipped test ${skipped}"
ctest --verbose \
${TESTING_EXTRA_ARGS} \
--tests-regex "${skipped}" \
2>&1 | tee --append "${LOG_FILE}"
echo "Re-running skipped test ${skipped}"
ctest --verbose \
${TESTING_EXTRA_ARGS} \
--tests-regex "${skipped}" \
2>&1 | tee --append "${LOG_FILE}"
done
fi
cd "${TOP_DIR}"
Expand Down Expand Up @@ -289,7 +290,7 @@ tags() {
}

dist() {
cmake --build "${BUILD_DIR}" --target dist 2>&1 | tee --append "${LOG_FILE}"
${CMAKE} --build "${BUILD_DIR}" --target dist 2>&1 | tee --append "${LOG_FILE}"
check_pipe_error
}

Expand Down

0 comments on commit 7c4e692

Please sign in to comment.