Page MenuHomePhabricator

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

Authored by Fabien on Sep 26 2019, 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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Sep 27 2019, 12:53