Skip to content

Conversation

@adelton
Copy link
Contributor

@adelton adelton commented Jan 27, 2026

Looking at

QUIET_FLAGS=""
if [[ "$CMAKE_GENERATOR" == "Ninja" ]]; then
QUIET_FLAGS="-- --quiet"
else
# Assume Makefile generator for non-Ninja builds
COMMON_OPTIONS="-DCMAKE_RULE_MESSAGES=OFF"
fi
COMMON_OPTIONS="${COMMON_OPTIONS} -DCMAKE_BUILD_TYPE=Release -DCMAKE_MESSAGE_LOG_LEVEL=WARNING -Wno-dev -DGVARS=YES -DHELI=YES -DLUA=YES"
, it is possible to specify COMMON_OPTIONS environment variable when invoking tools/build-companion.sh with Ninja generator but not with non-Ninja builds. Being able to specify additional cmake parameters would be helpful for alternative build setups.

For example, rpm builds prefer to have all sources packaged in the source rpm rather than fetching them during build time. With this change we could then do things like

COMMON_OPTIONS="-DFETCHCONTENT_SOURCE_DIR_GOOGLETEST=/external/path/to/googletest" tools/build-companion.sh "$(pwd)" "$(pwd)/output/"

rather than a more tedious patching of the CMakeFiles.txt and *.cmake files.

Summary of changes:

  • external environment variable COMMON_OPTIONS consumed by tools/build-companion.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant