Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
CMake
CMake
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,296
    • Issues 3,296
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 9
    • Merge Requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #21520

Closed
Open
Created Nov 29, 2020 by Phil Williams@philw

CPACK_PRE_BUILD_SCRIPTS and CPACK_POST_BUILD_SCRIPTS have no obvious way to access the source, binary or staging directories

The CPACK_INSTALL_SCRIPTS run with the following variables set:

  • CMAKE_CURRENT_SOURCE_DIR
  • CMAKE_CURRENT_BINARY_DIR
  • CMAKE_INSTALL_PREFIX - set to staging directory

These variables don't get set for the CPACK_PRE_BUILD_SCRIPTS and the CPACK_POST_BUILD_SCRIPTS unless you have a CPACK_INSTALL_SCRIPTS running first.

You can get some of the information you need from CPACK variables:

  • CPACK_TEMPORARY_INSTALL_DIRECTORY - is set to the staging directory in _PRE_
  • CPACK_OUTPUT_FILE_PATH - points to the output file in _POST_

I think it would be useful for CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR to be set for both PRE and POST. CMAKE_INSTALL_PREFIX set for PRE and something else set pointing to the output file in POST.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None