From b3c9987ed7396d2adf65abdbdbfbf1f52ed22fef Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 13 Sep 2026 14:31:29 +0200 Subject: [PATCH] build: the vendored HLS headers no longer warn, and three stale CMake rules go Four unrelated but equally small build-tree fixes, none of which changes what any binary does: * fpga/hls: `fpga/include/` holds the vendored Xilinx `ap_int`/`ap_fixed` headers. Included with a plain `-I` they emit 790 default-visible `-Wdeprecated-enum-enum-conversion` warnings across the targets that consume them - every warning a developer sees in a build of the receiver, the broker, the tests or the HLS simulation comes from that one header. `SYSTEM` propagates as `-isystem`, silencing the vendored header while leaving warnings in our own HLS sources visible. Measured on one HLS source: 78 -> 0 at default flags, 289 -> 56 under -Wall. * compression: `zstd/lib` was the old in-tree vendored location, gone from the tree since zstd moved to FetchContent. It stays harmless only while nothing sits there; a checkout with a leftover `compression/zstd/` puts that copy's internal headers (`common/huf.h`, `common/mem.h`) ahead of the fetched zstd the library actually links. The fetched zstd already exports its `lib/` root, so dropping the entry is all that is needed. * xds-plugin: `target_link_options(... --exclude-libs,ALL)` was applied twice, once unconditionally and once guarded by `if(UNIX AND NOT APPLE)`. Keep the guarded one. * xds-plugin's install rule uses `CMAKE_INSTALL_LIBDIR`, which was only ever set as a side effect of a fetched dependency including GNUInstallDirs first. Include it at the top level, where it belongs. * broker: `redoc-static.html` was installed to `/jfjoch/frontend/`, a path nothing serves - the broker mounts its frontend from `share/jfjoch/frontend`, whose copy of the API reference is `dist/openapi.html` written by `npm run redocly`, while `redoc-static.html` itself reaches the bundle through Sphinx's `html_static_path`. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_011GxZqDiFP3KqriBhNdcR56 --- CMakeLists.txt | 1 + broker/CMakeLists.txt | 3 --- compression/CMakeLists.txt | 2 +- fpga/hls/CMakeLists.txt | 2 +- xds-plugin/CMakeLists.txt | 4 ---- 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e8991238..e205b422a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,7 @@ STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" JFJOCH_VERSION_NUMERIC "${JFJOCH_ PROJECT(jfjoch VERSION ${JFJOCH_VERSION_NUMERIC} LANGUAGES C CXX) SET(CMAKE_POLICY_DEFAULT_CMP0077 NEW) +INCLUDE(GNUInstallDirs) SET(CMAKE_CXX_STANDARD 20) SET(CMAKE_CXX_STANDARD_REQUIRED True) diff --git a/broker/CMakeLists.txt b/broker/CMakeLists.txt index afd91bd2b..ca4cdd7e1 100644 --- a/broker/CMakeLists.txt +++ b/broker/CMakeLists.txt @@ -1,6 +1,3 @@ -# OpenAPI definition -INSTALL(FILES redoc-static.html DESTINATION jfjoch/frontend COMPONENT jfjoch ) - # OpenAPI model AUX_SOURCE_DIRECTORY(gen/model MODEL_SOURCES) ADD_LIBRARY(JFJochAPI STATIC ${MODEL_SOURCES}) diff --git a/compression/CMakeLists.txt b/compression/CMakeLists.txt index 935ee6df9..07c04a32d 100644 --- a/compression/CMakeLists.txt +++ b/compression/CMakeLists.txt @@ -19,4 +19,4 @@ ADD_LIBRARY(Compression STATIC set_target_properties(Compression PROPERTIES POSITION_INDEPENDENT_CODE ON) TARGET_COMPILE_DEFINITIONS(Compression PUBLIC -DZSTD_SUPPORT -DUSE_ZSTD) TARGET_LINK_LIBRARIES(Compression libzstd_static) -TARGET_INCLUDE_DIRECTORIES(Compression PUBLIC . zstd/lib) +TARGET_INCLUDE_DIRECTORIES(Compression PUBLIC .) diff --git a/fpga/hls/CMakeLists.txt b/fpga/hls/CMakeLists.txt index d495cee01..94ab47bd0 100644 --- a/fpga/hls/CMakeLists.txt +++ b/fpga/hls/CMakeLists.txt @@ -39,7 +39,7 @@ ADD_LIBRARY( JFJochHLSCores STATIC ptp.cpp) TARGET_COMPILE_DEFINITIONS(JFJochHLSCores PUBLIC -DJFJOCH_HLS_NOSYNTH) -TARGET_INCLUDE_DIRECTORIES(JFJochHLSCores PUBLIC ../include) +TARGET_INCLUDE_DIRECTORIES(JFJochHLSCores SYSTEM PUBLIC ../include) IF(VIVADO_HLS) IF(NOT HLS_SOLUTION_NAME) diff --git a/xds-plugin/CMakeLists.txt b/xds-plugin/CMakeLists.txt index 8f2540433..7bad18ec2 100644 --- a/xds-plugin/CMakeLists.txt +++ b/xds-plugin/CMakeLists.txt @@ -3,10 +3,6 @@ ADD_LIBRARY(jfjoch_xds_plugin SHARED plugin.cpp plugin.h) TARGET_LINK_LIBRARIES(jfjoch_xds_plugin JFJochHDF5Wrappers JFJochVersion Compression hdf5-static) INSTALL(TARGETS jfjoch_xds_plugin DESTINATION ${CMAKE_INSTALL_LIBDIR}/jfjoch COMPONENT viewer) -target_link_options(jfjoch_xds_plugin PRIVATE - "LINKER:--exclude-libs,ALL" -) - set_target_properties(jfjoch_xds_plugin PROPERTIES CXX_VISIBILITY_PRESET hidden C_VISIBILITY_PRESET hidden