chipsalliance / Surelog

SystemVerilog 2017 Pre-processor, Parser, Elaborator, UHDM Compiler. Provides IEEE Design/TB C/C++ VPI and Python AST & UHDM APIs. Compiles on Linux gcc, Windows msys2-gcc & msvc, OsX
Apache License 2.0
340 stars 67 forks source link

Incorrect cmake installation instructions fail to install files into the stage directory #3963

Open yurivict opened 2 months ago

yurivict commented 2 months ago

In case when installation is done into a stage directory instructions like this fail to install files.

Custom commands can't properly install files.

The reason is that the stage directory is only given to the cmake backend (either GNU make or Ninja) as the DESTDIR environment variable. This value isn't known at the cmake time, so such instructions can't possibly install files into proper destinations under the stage directory.

Proposed solution: Custom commands should build files in the build directory. Then cmake's install commands should be used to install such files into proper destinations under the stage directory.