When use CMake
to build ExternalProject
:
ExternalProject_Add(
......
)
It seems you can’t add multiple same command, for example, PATCH_COMMAND
:
ExternalProject_Add(
......
PATCH_COMMAND ......
PATCH_COMMAND ......
......
)
You may get errors like following:
......
File /usr/bin/patch is read-only; trying to patch anyway
/usr/bin/patch: **** Can't create temporary file /usr/bin/patch.oLnbOsk : Permission denied
......
Instead you can COMMAND
to add more instructions:
ExternalProject_Add(
......
PATCH_COMMAND ......
COMMAND ......
......
)
References:
CMake ExternalProject_Add: How to build multiple msbuild targets?;
ExternalProject.