Skip to content

Commit

Permalink
New interface: specify build profiles as a list
Browse files Browse the repository at this point in the history
working towards 2.0, more generalized cli interface.
  • Loading branch information
asherikov committed Dec 25, 2024
1 parent 617f4cc commit 3e936ef
Show file tree
Hide file tree
Showing 35 changed files with 323 additions and 190 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ jobs:
- uses: actions/checkout@v4
- run: make -f ccws/tests/test_main_ros2.mk ROS_DISTRO=humble

jammy_ros2_ccws2:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- run: make -f ccws/tests/test_main_ros2_ccws2.mk ROS_DISTRO=humble

noble_ros2:
runs-on: ubuntu-24.04

Expand Down
26 changes: 18 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,18 @@ export AUTHOR?=$(shell git config --get user.name)
export ROS_DISTRO

# default profile
export BUILD_PROFILE?=reldebug
BUILD_PROFILE?=reldebug
# used in build profile mixins and profile creation targets
export BASE_BUILD_PROFILE?=reldebug
BASE_BUILD_PROFILE?=

export CCWS_BUILD_PROFILES?=$(shell echo "${BUILD_PROFILE},${BASE_BUILD_PROFILE}" | sed -e 's/,,//g' -e 's/,$$//g')
CCWS_BUILD_PROFILES_ID=$(shell echo "${CCWS_BUILD_PROFILES}" | sed -e 's/,/_/g')
CCWS_PRIMARY_BUILD_PROFILE=$(shell echo ${CCWS_BUILD_PROFILES} | cut -f 1 -d ',')
CCWS_SECONDARY_BUILD_PROFILE=$(shell echo ${CCWS_BUILD_PROFILES} | cut -f 2 -d ',')
CCWS_SECONDARY_BUILD_PROFILES=$(shell echo ${CCWS_BUILD_PROFILES} | cut -f 2- -d ',')
export CCWS_BUILD_SPACE_DIR=${WORKSPACE_DIR}/build/${CCWS_BUILD_PROFILES_ID}


# default package type
export PKG_TYPE?=catkin
# global version, string, added to deb package names to enable multiple installations
Expand All @@ -33,7 +42,7 @@ export VENDOR?=ccws
export LICENSE?=Apache 2.0
export REPO_LIST_FORMAT?=repos

export WORKSPACE_INSTALL?=${WORKSPACE_DIR}/install/${BUILD_PROFILE}
export WORKSPACE_INSTALL?=${WORKSPACE_DIR}/install/${CCWS_BUILD_PROFILES}
export ARTIFACTS_DIR=${WORKSPACE_DIR}/artifacts

# maximum amout of memory required for a single compilation job -- used to compute job limit
Expand All @@ -59,7 +68,7 @@ export PKG_ID=$(shell echo "${PKG}" | md5sum | cut -f 1 -d ' ')
export BUILD_PROFILES_DIR=${CCWS_DIR}/profiles/build/
export EXEC_PROFILES_DIR=${CCWS_DIR}/profiles/exec/
MAKE_QUIET=${MAKE} --quiet --no-print-directory
SETUP_SCRIPT?=source ${BUILD_PROFILES_DIR}/${BUILD_PROFILE}/setup.bash
SETUP_SCRIPT?=source ${BUILD_PROFILES_DIR}/${CCWS_PRIMARY_BUILD_PROFILE}/setup.bash ${CCWS_SECONDARY_BUILD_PROFILES}
CMD_PKG_NAME_LIST=colcon --log-base /dev/null list --topological-order --names-only --base-paths ${WORKSPACE_SRC}
CMD_PKG_LIST=colcon --log-base /dev/null list --topological-order --base-paths ${WORKSPACE_SRC}
CMD_PKG_INFO=colcon --log-base /dev/null info --base-paths ${WORKSPACE_SRC}
Expand Down Expand Up @@ -175,24 +184,25 @@ build_glob:
build_all:
bash -c "${MAKE} PKG=\"\$$(${CMD_PKG_NAME_LIST} | paste -d ' ' -s)\""

build: assert_BUILD_PROFILE_must_exist
${MAKE} wswraptarget TARGET=bp_${BUILD_PROFILE}_build
build: assert_BUILD_PROFILES_must_exist
${MAKE} wswraptarget TARGET=bp_${CCWS_PRIMARY_BUILD_PROFILE}_build

bp_%_build: private_build
# skip to default

# --log-level DEBUG
private_build: assert_PKG_arg_must_be_specified
mkdir -p "${CCWS_BUILD_DIR}"
mkdir -p "${CCWS_BUILD_SPACE_DIR}"
# override make flags to enable multithreaded builds
env | sort
env MAKEFLAGS="-j${JOBS}" ${CCWS_BUILD_WRAPPER} colcon \
--log-base ${CCWS_LOG_DIR} \
build \
--event-handlers console_direct+ \
--merge-install \
--executor sequential \
--base-paths ${WORKSPACE_SRC} \
--build-base "${CCWS_BUILD_DIR}" \
--build-base "${CCWS_BUILD_SPACE_DIR}" \
--install-base "${CCWS_INSTALL_DIR_BUILD}" \
--cmake-args -DCMAKE_TOOLCHAIN_FILE="${CMAKE_TOOLCHAIN_FILE}" \
--packages-up-to ${PKG}
Expand Down
1 change: 0 additions & 1 deletion ccws/examples/pkg_catkin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ catkin_package(
# set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CCWS_LINKER_FLAGS}")
#endif()
#add_definitions(-DCCWS_DEBUG=${CCWS_DEBUG})
#add_definitions(-DCCWS_BUILD_PROFILE="${CCWS_BUILD_PROFILE}")
## --------------

## Specify additional locations of header files
Expand Down
14 changes: 7 additions & 7 deletions ccws/make/clean.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ cmake_cfg_clean:
${MAKE} wswraptarget TARGET=cmake_cfg_clean

private_cmake_cfg_clean:
rm -f ${CCWS_BUILD_DIR}/*/CMakeCache.txt
rm -f ${CCWS_BUILD_SPACE_DIR}/*/CMakeCache.txt

bp_purge:
${MAKE} wswraptarget TARGET=bp_${BUILD_PROFILE}_purge
${MAKE} wswraptarget TARGET=bp_${CCWS_PRIMARY_BUILD_PROFILE}_purge

bp_%_purge: assert_BUILD_PROFILE_must_exist
bp_%_purge: assert_BUILD_PROFILES_must_exist
# placeholder target

bp_clean:
${MAKE} wswraptarget TARGET=bp_${BUILD_PROFILE}_clean
${MAKE} wswraptarget TARGET=bp_${CCWS_PRIMARY_BUILD_PROFILE}_clean

bp_%_clean: assert_BUILD_PROFILE_must_exist
rm -rf "${WORKSPACE_DIR}/build/${BUILD_PROFILE}"
rm -rf "${WORKSPACE_DIR}/install/${BUILD_PROFILE}"
bp_%_clean: assert_BUILD_PROFILES_must_exist
rm -rf "${CCWS_BUILD_SPACE_DIR}"
rm -rf "${WORKSPACE_DIR}/install/${CCWS_BUILD_PROFILES_ID}"
2 changes: 1 addition & 1 deletion ccws/make/conan.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# conflict resolution is fragile and inconvenient https://docs.conan.io/2/tutorial/versioning/conflicts.html

# https://docs.conan.io/2/reference/environment.html#conan-home
export CCWS_CONAN_HOME?="${CCWS_CACHE}/conan/${BUILD_PROFILE}"
export CCWS_CONAN_HOME?="${CCWS_CACHE}/conan/${CCWS_PRIMARY_BUILD_PROFILE}"

install_conan: install_python3
${PIP3_INSTALL} conan
Expand Down
14 changes: 7 additions & 7 deletions ccws/make/cross.mk
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private_cross_build: assert_CCWS_SYSROOT_must_be_mounted

cross_mount:
# implementation is profile specific
${MAKE} bp_${BUILD_PROFILE}_mount
${MAKE} bp_${CCWS_PRIMARY_BUILD_PROFILE}_mount

cross_umount:
bash -c "${SETUP_SCRIPT}; \
Expand All @@ -76,18 +76,18 @@ cross_common_install_build:
bash -c "${SETUP_SCRIPT}; mkdir -p \"\$${CCWS_SYSROOT_DATA}\""

cross_flash:
${MAKE} bp_${BUILD_PROFILE}_flash
${MAKE} bp_${CCWS_PRIMARY_BUILD_PROFILE}_flash

bp_%_flash:
test "${DEVICE}" != ""
${MAKE} cross_umount
bash -c "${SETUP_SCRIPT}; sudo dd if=\"\$${CCWS_SYSROOT_DATA}/system.img\" of=${DEVICE} status=progress bs=16M"

cross_get:
${MAKE} bp_${BUILD_PROFILE}_get
${MAKE} bp_${CCWS_PRIMARY_BUILD_PROFILE}_get

cross_initialize:
${MAKE} bp_${BUILD_PROFILE}_initialize
${MAKE} bp_${CCWS_PRIMARY_BUILD_PROFILE}_initialize

cross_install: cross_get
${MAKE} cross_mount
Expand All @@ -97,15 +97,15 @@ cross_install: cross_get

cross_pack:
${MAKE} cross_umount
${MAKE} wswraptarget TARGET=private_bp_${BUILD_PROFILE}_pack
${MAKE} wswraptarget TARGET=private_bp_${CCWS_PRIMARY_BUILD_PROFILE}_pack

cross_unpack:
${MAKE} cross_umount
${MAKE} wswraptarget TARGET=private_bp_${BUILD_PROFILE}_unpack
${MAKE} wswraptarget TARGET=private_bp_${CCWS_PRIMARY_BUILD_PROFILE}_unpack

cross_purge:
${MAKE} cross_umount
${MAKE} wswraptarget TARGET=private_bp_${BUILD_PROFILE}_purge
${MAKE} wswraptarget TARGET=private_bp_${CCWS_PRIMARY_BUILD_PROFILE}_purge

cross_python_soabi: assert_CCWS_SYSROOT_must_be_mounted
printf "from sysconfig import get_config_var\nprint(get_config_var('SOABI'))\n" \
Expand Down
4 changes: 2 additions & 2 deletions ccws/make/dependency.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DEPLIST_DIR=${WORKSPACE_DIR}/build/${BUILD_PROFILE}_dep/
DEPLIST_DIR=${WORKSPACE_DIR}/build/${CCWS_BUILD_PROFILES_ID}_dep/
DEPLIST_FILE=${DEPLIST_DIR}/deps_${PKG_ID}
CCWS_ROSDEP_CACHE=${CCWS_CACHE}/profiles/${BUILD_PROFILE}
CCWS_ROSDEP_CACHE=${CCWS_CACHE}/profiles/${CCWS_PRIMARY_BUILD_PROFILE}


dep_%:
Expand Down
6 changes: 3 additions & 3 deletions ccws/make/install.mk
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ install_ccws_deps_noble: install_ccws_deps_jammy


bp_install_build:
echo "CCWS/bp_install_build: ${BUILD_PROFILE}"
${MAKE} bp_${BUILD_PROFILE}_install_build
echo "CCWS/bp_install_build: ${CCWS_PRIMARY_BUILD_PROFILE}"
${MAKE} bp_${CCWS_PRIMARY_BUILD_PROFILE}_install_build

bp_%_install_build: assert_BUILD_PROFILE_must_exist bp_common_install_build
bp_%_install_build: assert_BUILD_PROFILES_must_exist bp_common_install_build
# placeholder target

ep_install:
Expand Down
26 changes: 11 additions & 15 deletions ccws/make/profile.mk
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
assert_BUILD_PROFILE_must_exist:
test -f "${BUILD_PROFILES_DIR}/${BUILD_PROFILE}/setup.bash"
assert_BUILD_PROFILES_must_exist:
echo "${CCWS_BUILD_PROFILES}" | sed -e 's/,/\n/g' | xargs -I {} test -f "${BUILD_PROFILES_DIR}/{}/setup.bash"

assert_BASE_BUILD_PROFILE_must_exist:
test -f "${BUILD_PROFILES_DIR}/${BASE_BUILD_PROFILE}/setup.bash"
assert_SECONDARY_BUILD_PROFILE_must_exist:
test -f "${BUILD_PROFILES_DIR}/${CCWS_SECONDARY_BUILD_PROFILE}/setup.bash"

assert_BUILD_PROFILE_must_not_exist:
test ! -d "${BUILD_PROFILES_DIR}/${BUILD_PROFILE}"
bp_new:
test ! -d "${BUILD_PROFILES_DIR}/${CCWS_PRIMARY_BUILD_PROFILE}"
${MAKE} assert_BUILD_PROFILES_must_exist CCWS_BUILD_PROFILES=${CCWS_SECONDARY_BUILD_PROFILES}
cp -R "${CCWS_DIR}/profiles/template_build" "${BUILD_PROFILES_DIR}/${CCWS_PRIMARY_BUILD_PROFILE}"
find "${BUILD_PROFILES_DIR}/${CCWS_PRIMARY_BUILD_PROFILE}" -type f \
| xargs sed -i -e "s/@@BUILD_PROFILE@@/${CCWS_PRIMARY_BUILD_PROFILE}/g" -e "s/@@BASE_BUILD_PROFILE@@/${CCWS_SECONDARY_BUILD_PROFILE}/g"

assert_EXEC_PROFILE_must_not_exist:
ep_new:
test ! -d "${EXEC_PROFILES_DIR}/${EXEC_PROFILE}"

bp_new: assert_BUILD_PROFILE_must_not_exist
${MAKE} assert_BUILD_PROFILE_must_exist BUILD_PROFILE=${BASE_BUILD_PROFILE}
cp -R "${CCWS_DIR}/profiles/template_build" "${BUILD_PROFILES_DIR}/${BUILD_PROFILE}"
find "${BUILD_PROFILES_DIR}/${BUILD_PROFILE}" -type f | xargs sed -i "s/@@BUILD_PROFILE@@/${BUILD_PROFILE}/g"
find "${BUILD_PROFILES_DIR}/${BUILD_PROFILE}" -type f | xargs sed -i "s/@@BASE_BUILD_PROFILE@@/${BASE_BUILD_PROFILE}/g"

ep_new: assert_EXEC_PROFILE_must_not_exist
cp -R "${CCWS_DIR}/profies/template_exec" "${EXEC_PROFILES_DIR}/${EXEC_PROFILE}"
find "${EXEC_PROFILES_DIR}/${EXEC_PROFILE}" -type f | xargs sed -i "s/@@EXEC_PROFILE@@/${EXEC_PROFILE}/g"
24 changes: 12 additions & 12 deletions ccws/make/test.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TEST_REGEX?=.*
TEST_PKG_LIST=${WORKSPACE_DIR}/build/${BUILD_PROFILE}/ccws.tests.packages
TEST_PKG_LIST_EXCEPT=${WORKSPACE_DIR}/build/${BUILD_PROFILE}/ccws.tests.exceptions.packages
TEST_PKG_LIST=${CCWS_BUILD_SPACE_DIR}/ccws.tests.packages
TEST_PKG_LIST_EXCEPT=${CCWS_BUILD_SPACE_DIR}/ccws.tests.exceptions.packages

wslist_test:
@${MAKE_QUIET} wslist | sort > "${TEST_PKG_LIST}"
Expand Down Expand Up @@ -28,15 +28,15 @@ wsctest:

# this target uses colcon and unlike `ctest` target does not respect `--output-on-failure`
test: assert_PKG_arg_must_be_specified
bash -c "time ( source ${CCWS_ROOT}/setup.bash ${BUILD_PROFILE} test ${EXEC_PROFILE}; \
bash -c "time ( source ${CCWS_ROOT}/setup.bash ${CCWS_BUILD_PROFILES} test ${EXEC_PROFILE}; \
colcon \
--log-base \$${CCWS_LOG_DIR} \
test \
--event-handlers console_direct+ \
--merge-install \
--executor sequential \
--ctest-args --output-on-failure -j ${JOBS} \
--build-base \"\$${CCWS_BUILD_DIR}\" \
--build-base \"\$${CCWS_BUILD_SPACE_DIR}\" \
--install-base \"\$${CCWS_INSTALL_DIR_BUILD}\" \
--base-paths "${WORKSPACE_SRC}" \
--test-result-base \$${CCWS_LOG_DIR}/testing \
Expand All @@ -45,9 +45,9 @@ test: assert_PKG_arg_must_be_specified

ctest: assert_PKG_arg_must_be_specified
echo '${PKG}' | sed 's/ /\n/g' | xargs --no-run-if-empty -I {} bash -c \
"time ( source ${CCWS_ROOT}/setup.bash ${BUILD_PROFILE} test ${EXEC_PROFILE}; \
"time ( source ${CCWS_ROOT}/setup.bash ${CCWS_BUILD_PROFILES} test ${EXEC_PROFILE}; \
mkdir -p \"\$${CCWS_ARTIFACTS_DIR}\"; \
cd \"\$${CCWS_BUILD_DIR}/{}\"; \
cd \"\$${CCWS_BUILD_SPACE_DIR}/{}\"; \
time ctest --schedule-random --output-on-failure --output-log \"\$${CCWS_ARTIFACTS_DIR}/ctest_{}.log\" -j ${JOBS} --tests-regex '${TEST_REGEX}')" \
&& ${MAKE} showtestresults || ${MAKE} showtestresults

Expand All @@ -64,15 +64,15 @@ showtestresults: test_results
test_results: assert_PKG_arg_must_be_specified
# shows fewer tests
echo '${PKG}' | sed 's/ /\n/g' | xargs --no-run-if-empty -I {} bash -c "${SETUP_SCRIPT}; ${MAKE} private_test_results_pkg PKG={}"
#bash -c "${SETUP_SCRIPT}; catkin_test_results \$${CCWS_BUILD_DIR}/${PKG}"
#bash -c "${SETUP_SCRIPT}; catkin_test_results \$${CCWS_BUILD_SPACE_DIR}/${PKG}"

private_test_results_pkg: assert_PKG_arg_must_be_specified
@mkdir -p ${CCWS_ARTIFACTS_DIR}/${PKG}/
@cp -R ${CCWS_BUILD_DIR}/${PKG}/Testing ${CCWS_ARTIFACTS_DIR}/${PKG}/ 2> /dev/null || true
@cp -R ${CCWS_BUILD_DIR}/${PKG}/test_results ${CCWS_ARTIFACTS_DIR}/${PKG}/ 2> /dev/null || true
@colcon --log-base /dev/null test-result --all --test-result-base ${CCWS_BUILD_DIR}/${PKG}
@cp -R ${CCWS_BUILD_SPACE_DIR}/${PKG}/Testing ${CCWS_ARTIFACTS_DIR}/${PKG}/ 2> /dev/null || true
@cp -R ${CCWS_BUILD_SPACE_DIR}/${PKG}/test_results ${CCWS_ARTIFACTS_DIR}/${PKG}/ 2> /dev/null || true
@colcon --log-base /dev/null test-result --all --test-result-base ${CCWS_BUILD_SPACE_DIR}/${PKG}

test_list: assert_PKG_arg_must_be_specified
bash -c "time ( source ${CCWS_ROOT}/setup.bash ${BUILD_PROFILE} test ${EXEC_PROFILE} \
&& echo '${PKG}' | sed 's/ /\n/g' | xargs --no-run-if-empty -I {} ctest --show-only --test-dir \"\$${CCWS_BUILD_DIR}/{}\")"
bash -c "time ( source ${CCWS_ROOT}/setup.bash ${CCWS_BUILD_PROFILES} test ${EXEC_PROFILE} \
&& echo '${PKG}' | sed 's/ /\n/g' | xargs --no-run-if-empty -I {} ctest --show-only --test-dir \"\$${CCWS_BUILD_SPACE_DIR}/{}\")"

8 changes: 4 additions & 4 deletions ccws/profiles/build/addr_undef_sanitizers/setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
set -o pipefail

##########################################################################################
BUILD_PROFILE=${BUILD_PROFILE:-"$(basename "$(dirname "${BASH_SOURCE[0]}")")"}
CCWS_PRIMARY_BUILD_PROFILE=${CCWS_PRIMARY_BUILD_PROFILE:-"$(basename "$(dirname "${BASH_SOURCE[0]}")")"}
source "$(dirname "${BASH_SOURCE[0]}")/../${1:-"common"}/setup.bash" "${@:2}" ""


Expand All @@ -14,15 +14,15 @@ source "$(dirname "${BASH_SOURCE[0]}")/../${1:-"common"}/setup.bash" "${@:2}" ""
# https://stackoverflow.com/questions/48267394/what-are-the-valid-sanitizer-suppression-strings-for-gcc

# undefined
UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1:suppressions=${CCWS_BUILD_PROFILE_DIR}/undefined.supp
UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1:suppressions=${BUILD_PROFILES_DIR}/addr_undef_sanitizers/undefined.supp
export UBSAN_OPTIONS

# leaks
LSAN_OPTIONS=suppressions=${CCWS_BUILD_PROFILE_DIR}/leak.supp
LSAN_OPTIONS=suppressions=${BUILD_PROFILES_DIR}/addr_undef_sanitizers/leak.supp
export LSAN_OPTIONS

# Suppressions dont work on alloc-dealloc-mismatch for some reason
ASAN_OPTIONS=alloc_dealloc_mismatch=0:new_delete_type_mismatch=0:suppressions=${CCWS_BUILD_PROFILE_DIR}/address.supp
ASAN_OPTIONS=alloc_dealloc_mismatch=0:new_delete_type_mismatch=0:suppressions=${BUILD_PROFILES_DIR}/addr_undef_sanitizers/address.supp
export ASAN_OPTIONS

# address sanitizer
Expand Down
2 changes: 1 addition & 1 deletion ccws/profiles/build/clangd/setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
set -o pipefail

##########################################################################################
BUILD_PROFILE=${BUILD_PROFILE:-"$(basename "$(dirname "${BASH_SOURCE[0]}")")"}
CCWS_PRIMARY_BUILD_PROFILE=${CCWS_PRIMARY_BUILD_PROFILE:-"$(basename "$(dirname "${BASH_SOURCE[0]}")")"}
source "$(dirname "${BASH_SOURCE[0]}")/../${1:-"common"}/setup.bash" "${@:2}" ""

##########################################################################################
Expand Down
12 changes: 6 additions & 6 deletions ccws/profiles/build/clangd/targets.mk
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
bp_clangd_build: assert_BASE_BUILD_PROFILE_must_exist
mkdir -p "${CCWS_CACHE}/clangd/${BASE_BUILD_PROFILE}/"
bp_clangd_build: assert_BUILD_PROFILES_must_exist
mkdir -p "${CCWS_CACHE}/clangd/${CCWS_BUILD_PROFILES_ID}/"
# generated by colcon cmake (https://colcon.readthedocs.io/en/released/user/how-to.html#cmake-packages-generating-compile-commands-json)
cp "build/${BASE_BUILD_PROFILE}/compile_commands.json" "${CCWS_CACHE}/clangd/${BASE_BUILD_PROFILE}/compile_commands.json"
#find "build/${BASE_BUILD_PROFILE}/" -name "compile_commands.json" | xargs jq -s add > "${CCWS_CACHE}/clangd/${BASE_BUILD_PROFILE}/compile_commands.json"
cp "build/${CCWS_SECONDARY_BUILD_PROFILE}/compile_commands.json" "${CCWS_CACHE}/clangd/${CCWS_BUILD_PROFILES_ID}/compile_commands.json"
#find "build/${CCWS_SECONDARY_BUILD_PROFILE}/" -name "compile_commands.json" | xargs jq -s add > "${CCWS_CACHE}/clangd/${CCWS_SECONDARY_BUILD_PROFILE}/compile_commands.json"
# https://clangd.llvm.org/config.html
echo "CompileFlags:" > "${WORKSPACE_DIR}/.clangd"
echo " CompilationDatabase: ${CCWS_CACHE}/clangd/${BASE_BUILD_PROFILE}/" >> "${WORKSPACE_DIR}/.clangd"
echo "CompileFlags:" > "${WORKSPACE_DIR}/.clangd"
echo " CompilationDatabase: ${CCWS_CACHE}/clangd/${CCWS_BUILD_PROFILES_ID}/" >> "${WORKSPACE_DIR}/.clangd"
# note: cache is created next to compile commands -> https://github.com/clangd/clangd/issues/184
# a few notes regarding clangd-indexer
# https://github.com/clangd/clangd/issues/587
Expand Down
Loading

0 comments on commit 3e936ef

Please sign in to comment.