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:
The
install(FILES ${CMAKE_SOURCE_DIR}/include/decimal/* ...)line inCMakeLists.txtpasses the literal*wildcard to CMake'sinstall(FILES ...)command, which does not expand globs. This causesmake installto fail with:Expected behavior:
make installshould copy all public headers into${CMAKE_INSTALL_INCLUDEDIR}/decimal/.Proposed fix: Replace the broken
install(FILES ...)withinstall(DIRECTORY ...)so CMake installs the entireinclude/decimaldirectory tree.Acceptance criteria:
cmake --install build --prefix /tmp/libdecimal-installsucceeds./tmp/libdecimal-install/include/decimal/containsbid.hpp,bcd.hpp,fixed.hpp,scaled.hpp, andutils.hpp.