HomePhabricator

[CMAKE] Fix build with make as a generator

Description

[CMAKE] Fix build with make as a generator

Summary:
There are a few issues preventing this build to succeed:

  • There is a dependency issue in the NativeExecutable.cmake module: a

custom_command() cannot have a file dependency which is the output of
another custom_command() if this command is from another list file.
The solution here is to use a target dependency instead.

  • Target naming with relative path is unsupported.
  • The make generator differs in the way the build directories are

created, and require some manual creation.

  • Since the generator name is Unix Makefiles, it should be quoted to

retain the space.

Test Plan:

# No regression
cmake -GNinja ..
ninja all check-all
cmake ..
make all check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5333

Details

Provenance
FabienAuthored on Feb 26 2020, 11:39
FabienPushed on Feb 28 2020, 13:47
Reviewer
Restricted Project
Differential Revision
D5333: [CMAKE] Fix build with make as a generator
Parents
rABC22dbd5436dac: Fix the benchmark build when wallet is disabled
Branches
Unknown
Tags
Unknown