Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ BUILD_TESTING =
VERBOSE = 0
USE_PROJ =
USE_FFMPEG =
C_COMPILER =
CXX_COMPILER =

# User vars
-include config.mk
Expand All @@ -28,7 +30,7 @@ else ifeq ($(ROS_VERSION),2)
endif

# A unique ID for this exact config we're using
configuid=$(shell echo "$(BUILD_TYPE) $(INSTALL_PREFIX) $(BUILD_TESTING) $(USE_PROJ) $(USE_FFMPEG) $(FPSDK_VERSION_STRING) $(CC) $(CXX) $$(uname -a)" | md5sum | cut -d " " -f1)
configuid=$(shell echo "$(BUILD_TYPE) $(INSTALL_PREFIX) $(BUILD_TESTING) $(USE_PROJ) $(USE_FFMPEG) $(FPSDK_VERSION_STRING) $(C_COMPILER) $(CXX_COMPILER) $$(uname -a)" | md5sum | cut -d " " -f1)

.PHONY: help
help:
Expand Down Expand Up @@ -139,6 +141,12 @@ endif
ifneq ($(FPSDK_VERSION_STRING),)
CMAKE_ARGS += -DVERSION_STRING=$(FPSDK_VERSION_STRING)
endif
ifneq ($(C_COMPILER),)
CMAKE_ARGS += -DCMAKE_C_COMPILER=$(C_COMPILER)
endif
ifneq ($(CXX_COMPILER),)
CMAKE_ARGS += -DCMAKE_CXX_COMPILER=$(CXX_COMPILER)
endif

ifeq ($(BUILD_TYPE),Release)
CMAKE_ARGS_INSTALL += --strip
Expand Down Expand Up @@ -188,7 +196,7 @@ cmake: $(BUILD_DIR)/.make-cmake
deps_cmake := Makefile $(wildcard config.mk) $(wildcard $(sort $(wildcard CMakeLists.txt */CMakeLists.txt */cmake/*)))

$(BUILD_DIR)/.make-cmake: $(deps_cmake) $(BUILD_DIR)/.make-configuid-$(configuid)
@echo "$(HLW)***** Configure ($(BUILD_TYPE)) *****$(HLO)"
@echo "$(HLW)***** Configure ($(CMAKE_ARGS)) *****$(HLO)"
$(V)$(CMAKE) -B $(BUILD_DIR) $(CMAKE_ARGS)
$(V)$(TOUCH) $@

Expand Down
8 changes: 4 additions & 4 deletions docker/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ function build_toplevel_release_clang
cd ${FPSDK_SRC_DIR}
rm -rf build/${buildname}
make install \
CC=clang CXX=clang++ \
C_COMPILER=clang CXX_COMPILER=clang++ \
INSTALL_PREFIX=install/${buildname} \
BUILD_TYPE=Release \
BUILD_DIR=build/${buildname} || return 1
Expand All @@ -222,7 +222,7 @@ function build_toplevel_debug_clang
cd ${FPSDK_SRC_DIR}
rm -rf build/${buildname}
make install \
CC=clang CXX=clang++ \
C_COMPILER=clang CXX_COMPILER=clang++ \
INSTALL_PREFIX=install/${buildname} \
BUILD_TYPE=Debug \
BUILD_DIR=build/${buildname} || return 1
Expand Down Expand Up @@ -555,9 +555,9 @@ do_step build_projs_release_noros_mindeps || true # continue

do_step build_examples || true # continue

# Some minimal checks with clang
# Some minimal checks with clang on the reference system (Trixie) and a more recent Ubuntu 26 (= ROS2 Lyrical)
echo "===== clang ====="
if [ "${FPSDK_IMAGE%-*}" = "trixie" ]; then
if [ "${FPSDK_IMAGE%-*}" = "trixie" -o "${FPSDK_IMAGE%-*}" = "lyrical" ]; then
do_step build_toplevel_release_clang || true # continue
do_step build_toplevel_debug_clang || true # continue
fi
Expand Down
1 change: 1 addition & 0 deletions docker/scripts/install_apt_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ packages=$(awk -v filt=${FPSDK_IMAGE%-*} '$1 ~ filt { print $2 }' <<EOF
..............jazzy.lyrical.trixie libproj25
..............jazzy.lyrical.trixie libproj-dev
noetic.humble.jazzy.lyrical.trixie libssl-dev
....................lyrical....... libstdc++-16-dev # For clang
noetic.humble.jazzy.lyrical.trixie libsqlite3-dev
noetic.humble.jazzy.lyrical.trixie libtiff-dev
noetic.humble.jazzy.lyrical.trixie libva-dev # automatically installs va-driver-all?
Expand Down