Incorrect Install Target on GHS Generator Wrapped in ExternalProject
Using CMake 3.27.4 on Linux.
When I wrap a in ExternalProject using the GreenHills generator,
And I look in the binary_dir/<project>.dir/<project>-install.rule.sh
I see /path/to/bin/cmake --build . --target install
However, the install target for GHS is INSTALL
not install
. I suspect the line: ExternalProject.cmake:1980.
A possible quick solution is:
if(step STREQUAL "INSTALL")
if("${CMAKE_GENERATOR}" MATCHES "Green Hills MULTI")
set(args INSTALL)
else()
set(args install)
endif()
endif()
However, a better solution would be to use cmake --install .
for all generators rather than cmake --build . --target <install/INSTALL>
.
Edited by William Sciaroni