Page MenuHomePhabricator

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

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

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.