HomePhabricator

[cmake] Refactor native build cmake generation

Description

[cmake] Refactor native build cmake generation

Summary: This adds a native_add_cmake_flags function for tools to add flags they want to pass to the native build. The flags are collected during the cmake execution process and _gen_native_cmake_target is run at the very end so that all the flags are used by watching when CMAKE_CURRENT_LIST_DIR is set to empty.

Test Plan:
Run cmake build from scratch.
Delete the native folder. Check that it is regenrated when rebuilding.
Run the build a second time to ensure that dependecies for native target are tracked properly.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
deadalnixAuthored on Jan 18 2020, 18:05
deadalnixPushed on Jan 20 2020, 15:09
Reviewer
Restricted Project
Differential Revision
D5026: [cmake] Refactor native build cmake generation
Parents
rABC3ed9038f912b: [cmake] Do not generate git_ignored_files.txt
Branches
Unknown
Tags
Unknown