Skip to content

build, fix install target glob expansion for public headers #37

Description

@steven-varga

The install(FILES ${CMAKE_SOURCE_DIR}/include/decimal/* ...) line in CMakeLists.txt passes the literal * wildcard to CMake's install(FILES ...) command, which does not expand globs. This causes make install to fail with:

file INSTALL cannot find
"/home/steven/projects/libdecimal/include/decimal/*": No such file or directory.

Expected behavior: make install should copy all public headers into ${CMAKE_INSTALL_INCLUDEDIR}/decimal/.

Proposed fix: Replace the broken install(FILES ...) with install(DIRECTORY ...) so CMake installs the entire include/decimal directory tree.

Acceptance criteria:

  • Configure and build in a fresh build directory.
  • cmake --install build --prefix /tmp/libdecimal-install succeeds.
  • /tmp/libdecimal-install/include/decimal/ contains bid.hpp, bcd.hpp, fixed.hpp, scaled.hpp, and utils.hpp.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions