# Overriding CPack version from command line not working

**URL:** https://discourse.cmake.org/t/overriding-cpack-version-from-command-line-not-working/7008
**Category:** Usage
**Tags:** tool:cpack
**Created:** [December 2, 2022, 1:12pm UTC](https://discourse.cmake.org/t/overriding-cpack-version-from-command-line-not-working/7008 "2022-12-02T13:12:44Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![MathiasMagnus](https://discourse.cmake.org/user_avatar/discourse.cmake.org/mathiasmagnus/32/431_2.png) [@MathiasMagnus](https://discourse.cmake.org/u/MathiasMagnus)
#### Post date: [April 16, 2023, 3:04pm UTC](https://discourse.cmake.org/t/overriding-cpack-version-from-command-line-not-working/7008/2 "2023-04-16T15:04:40Z")

</div>

I have the same issue and I think something broke in CPack. The [OpenCL-SDK](https://github.com/KhronosGroup/OpenCL-SDK) does something very similar, it [overrides](https://github.com/KhronosGroup/OpenCL-SDK/blob/3c1010133ceb0e8ef4e4774b870f5ae17ef04a75/.github/workflows/release.yml) `CPACK_SOURCE_IGNORE_FILES` on the CLI, and this used to work for the [v2022.05.18](https://github.com/KhronosGroup/OpenCL-SDK/releases/tag/v2022.05.18) release, but in the [v2023.02.06](https://github.com/KhronosGroup/OpenCL-SDK/releases/tag/v2023.02.06) release the ignored files started showing up again in the source ZIP files. I tried reverting to older versions on my local box, but that’s not the issue. I don’t know what is, but the override effect clearly doesn’t work.

_(This is one of the very annoying aspects of the Windows runners in GitHub Actions, is that there’s no way to containerize the builds and we’re constantly subject to tool versions changing under us breaking builds/releases.)_

FWIW, I also tried whether:

- CMake/CPack being on the PATH makes a difference
- using `CPACK_PROPERTIES_FILE`

The only thing that seems to work is to hang CPack-related commands onto CMake configuration, before including CPack.cmake. Nothing overrides the contents of the generated files.

---

_[View the full topic](https://discourse.cmake.org/t/overriding-cpack-version-from-command-line-not-working/7008)._
