Skip to content

cmake module ExternalProject running with extra make install command #476

Open
@arubertoson

Description

@arubertoson

From what I gather when using the cmake module ExternalProject the building and installation is taken care of without any outside input. When using rez-build --install we can utilize the REZ_BUILD_INSTALL variable to query for in the CMakeLists file to help create commands.

When executing rez-build --install it seems that rez wants to perform a make install as well causing a error output:

make[3]: *** No rule to make target `install'.  Stop.
make[2]: *** [boost/src/boost-stamp/boost-install] Error 2
make[1]: *** [CMakeFiles/boost.dir/all] Error 2
make: *** [all] Error 2
10:15:06 ERROR    BuildError: The cmake build system failed.

I guess it makes sense that we would want to have make install if we were performing something else outside of the ExteralProject but when we are just using that operation everything is already taken care of as I can comment out the code block performing the make install command from the CMakeBuildSystem.build function in cmake.py without causing any issues.

        if not retcode and install and "install" not in cmd:
            cmd.append("install")

            # execute make install within the build env
            _pr("\nExecuting: %s" % ' '.join(cmd))
            retcode, _, _ = context.execute_shell(command=cmd,
                                                  block=True,
                                                  cwd=build_path,
                                                  actions_callback=callback)

Should there be some way to specify that ExternalProject should handle the execution or have I missed something that already specifies that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions