HomePhabricator

[CMAKE] Fix check-security to allow running on windows executables

Authored by Fabien on Thu, Sep 26, 14:03.

Description

[CMAKE] Fix check-security to allow running on windows executables

Summary:
From the CMake documentation:

If COMMAND specifies an executable target name (created by the
add_executable() command) it will automatically be replaced by the
location of the executable created at build time

However I was unable to make it account for the .exe extension.

This diff uses a generator expression to specify the binary by using the
full path to the executable, determined at build time.

Test Plan:

mkdir buildcmake && cd buildcmake
cmake -GNinja .. -DBUILD_BITCOIN_SEEDER=OFF \
  -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Win64.cmake
ninja check-security

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Committed
FabienMon, Sep 30, 10:55
Pushed
fpelliccioniMon, Sep 30, 15:08
Reviewer
Restricted Project
Differential Revision
D4155: [CMAKE] Fix check-security to allow running on windows executables
Parents
rSTAGING8f09215cbe73: Use only 3 levels for defining the version
Branches
Unknown
Tags
Unknown