Skip to content

cmake --install produces an unusable tree (no export set/config; dependency headers absent); install rules unconditional; LICENSE not installed #133

Description

@petlenz

From the 2026-08-02 full-repo review (finding F-05 + F-18f). Verified by installing to a scratch prefix.

Evidence: CMakeLists.txt:216-232 installs include/ + libnumsim_codegen.a only. No export set, no *Config.cmake, no version file, no pkg-config, no LICENSE. The installed headers #include <numsim_cas/...> and <tmech/...>, which are not installed — so the tree cannot be consumed even by hand. find_package(NumSim_CodeGen) is impossible. (Export set is documented as blocked on numsim-cas exporting targets.)

Also: the install() rules are unconditional, so a superproject consuming this repo via add_subdirectory gets numsim-codegen headers/lib in its make install with no opt-out.

Impact: shipping install rules that produce a broken tree is worse than shipping none; and subproject consumers get install pollution.

Proposal (interim, until the numsim-cas export-set lands):

  1. Gate install rules behind option(NUMSIM_CODEGEN_INSTALL "EXPERIMENTAL: no CMake package config yet" OFF) (or PROJECT_IS_TOP_LEVEL).
  2. install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/doc/numsim-codegen).
  3. README: state explicitly that add_subdirectory/FetchContent is the only supported consumption today.

Proposal (real fix, blocked upstream): install(TARGETS ... EXPORT NumSimCodegenTargets) + configure_package_config_file() with find_dependency(numsim_cas) + write_basic_package_version_file(... COMPATIBILITY SameMinorVersion); CI job that installs and configures a 3-line consumer.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions