#931 closed defect (fixed)
Add "dist" and "distcheck" targets to CMake
Reported by: | dbaston | Owned by: | dbaston |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Default | Version: | 3.6.2 |
Severity: | Unassigned | Keywords: | |
Cc: |
Description
From Bas Couwenberg:
autotools and cmake take the opposite approach to creating distribution archives.
autotools only includes the files it is configured to.
cmake includes everything in the source tree not explicitly excluded.
To support
make dist
with CMake you need to add a custom target:
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
And configure CPACK_SOURCE_IGNORE_FILES to exclude everything that should not end up in the archives.
For
make distcheck
you'll need to implement more custom targets.
NetCDF may be a source of inspiration:
https://github.com/Unidata/netcdf-c/blob/master/cmake/modules/FindMakeDist.cmake
Change History (9)
comment:1 by , 6 years ago
Owner: | changed from | to
---|
comment:2 by , 6 years ago
comment:3 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Resolved by pramsey in git:44acf18e52a6ed
I think "include all by default" is a dangerous approach, and hard to check, and hard to produce an "uninstall" rule for either (we do want "uninstall" too!)