Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,923
    • Issues 3,923
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #23365
Closed
Open
Created Mar 30, 2022 by Robert Maynard@robertmaynardDeveloper

GNUInstallDirs: Regression in multiarch LIBDIR application

Consider the following example:

cmake_minimum_required(VERSION 3.22)
project(test)

include(GNUInstallDirs)
add_library(example SHARED ex.cpp)
install(TARGETS example)

When configured, built and installed like this:

cmake -S <src> -B <build> -DCMAKE_INSTALL_PREFIX=/home/<user>/install && cmake --build build && cmake --install build 

We get the following install location for example: /home/rmaynard/install/lib/libexample.so

But when we configure like so, we incorrectly cache the multi-arch value from the initial pass:

cmake -S <src> -B <build> && cmake -S <src> -B <build> -DCMAKE_INSTALL_PREFIX=/home/<user>/install && cmake --build build && cmake --install build 

And get the wrong install location for example: /home/rmaynard/install/lib/x86_64-linux-gnu/libexample.so

Edited Mar 30, 2022 by Brad King
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking