Page MenuHomePhabricator

[CMAKE] Fix the native build when the target is in the current build dir
ClosedPublic

Authored by Fabien on Jan 21 2020, 09:36.

Details

Summary

When the CMAKE_CURRENT_BINARY_DIR is the same than CMAKE_BINARY_DIR,
the computed relative path is empty and the target name starts with a
/, inserting a double slash // in the path at the same time.

This diff fixes the issue by not prepending the relative path to the
target name if it is empty.

Test Plan

Build bitcoin-abc and secp256k1 standalone.
See Travis result from my secp256k1 repo fork:
https://travis-ci.org/Fabcien/secp256k1/builds/639912900
Depends on D5033 to make Travis happy.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
secp256k1_fix_native_build
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 9088
Build 16138: Default Diff Build & Tests
Build 16137: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Jan 21 2020, 13:59