Skip to content

NEURON fails to install symlinks if using the --install CMake option with a custom --prefix #3582

@JCGoran

Description

@JCGoran

Context

We usually configure, build, and install a CMake project as:

cmake -DCMAKE_PREFIX_PATH=/some/path -B build
cmake --build build
cmake --install build # will install in /some/path

Instead of the last step, we can also do:

cmake --install build --prefix /some/other/path

which should instead use /some/other/path as the installation prefix.

Overview of the issue

If using a prefix which is not an absolute path, the installation of NEURON fails with:

$ cmake --install build --prefix somepath
'/usr/bin/cmake' '-E' 'make_directory' 'somepath/x86_64'
CMake Error at build/cmake_install.cmake:192 (file):
  file RELATIVE_PATH must be passed a full path to the directory:
  somepath/x86_64

On MacOS there's a bunch more errors about missing files.

Expected result/behavior

The installation should work regardless of the method and the installation prefix.

NEURON setup

  • Version: master
  • Installation method: CMake

Additional notes

Have a look at the discussion in this CMake issue, as well as the docs for the INSTALL_PREFIX generator expression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions