Files
ViewDesignEngine/docs/feedback/VDE-017.md
T
茂之钳 b48ffec290
CI / Build & Test (push) Failing after 32s
CI / Release Build (push) Failing after 31s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
fix(v1.0.1): VDE-016 root cause + VDE-017 submodule path
VDE-016 (High): GCC two-phase lookup — root cause is anonymous namespace
- Move SSICurveData OUT of anonymous namespace into vde::brep
- Add #include <iterator> for std::begin/end
- Add using vde::brep::ClassResult

VDE-017 (Medium): Root CMakeLists configure_file CMAKE_SOURCE_DIR
- Change to CMAKE_CURRENT_SOURCE_DIR for submodule compatibility
2026-07-27 23:34:18 +08:00

1.1 KiB
Raw Blame History

id, status, severity, category, date, reporter, related
id status severity category date reporter related
VDE-017 fixed medium bug 2026-07-27 ViewDesign VDE-002

VDE-017: 根 CMakeLists.txt 的 configure_file 仍使用 CMAKE_SOURCE_DIR

问题描述

v1.0.2 在 src/CMakeLists.txt 中修复了子模块 include 路径问题(VDE-002),但根 CMakeLists.txt 中第 10 行的 configure_file 仍使用 ${CMAKE_SOURCE_DIR}

# CMakeLists.txt:10 — 问题
configure_file(
    ${CMAKE_SOURCE_DIR}/cmake/vde_build_config.h.in
    ${CMAKE_BINARY_DIR}/generated/vde_build_config.h
    @ONLY
)

当 VDE 作为子模块构建时,CMAKE_SOURCE_DIR 是 ViewDesign 的根目录,而非 VDE 自己的目录。

编译错误

CMake Error: File cmake/vde_build_config.h.in does not exist.

当前 Workaround

ViewDesign 在本地 cmake/ 下复制了 vde_build_config.h.in

建议修复

改为 ${CMAKE_CURRENT_SOURCE_DIR}

configure_file(
    ${CMAKE_CURRENT_SOURCE_DIR}/cmake/vde_build_config.h.in
    ${CMAKE_BINARY_DIR}/generated/vde_build_config.h
    @ONLY
)