Errors when changing cmake build directory

Ao Liu ao at aoliu.tech
Thu May 2 19:20:15 UTC 2019


Ummmmm. Good to know that.

I think what I would like to do can be achieved by smartly using
${destroot} to deploy a new build dir and move the files to where I would
like. In this case the build happens in the work dir and will eventually
end up in where I want it to be.

As I suggested in a recent ticket - it would be nice for the website to
explain the ${destroot} variable in more details. Helps the developer to
build powerful stuff.

Thanks for the replies folks!
Ao

On Thu, May 2, 2019 at 11:49 AM Michael Dickens <michaelld at macports.org>
wrote:

> Why not leave the build directory alone & let the cmake 1.1 PG handle it?
> Most CMake-based ports can handle out-of-source building these days, and
> that's the default for the cmake 1.1 PG, and the default setting here
> should work for the vast majority of cmake-based ports.
>
> To your query: You shouldn't try to write to or generate files outside the
> ${worksrcdir} (or ${worksrcpath}); all configuring, building, installing,
> patching, etc must be done within the port's build path.
>
> Hope this is useful! - MLD
>
> On Thu, May 2, 2019, at 12:40 PM, Ao Liu wrote:
>
> Hi all macports fans,
>
> I'm recently learning to do some small modifications and enhancements on
> an existing portfile. One way I found that would solve my problem was to
> modify the build dir of cmake. (The PortGroup == cmake 1.1).
>
> I tried to set cmake.build_dir to ${prefix}/share/abc/abc${abc.version}/
>
> But it always throws an error and I believe it was because cmake can not
> write to the above directory. I tried to chown the directory to macports,
> still doesn't work.
>
> Any guidance on how to customize the CMake build directory? Thanks folks!
>
> :info:configure CMake Error at
> /opt/local/share/cmake-3.14/Modules/CMakeDetermineSystem.cmake:173 (file):
>
> :info:configure   file failed to open for writing (No such file or
> directory):
>
> :info:configure
> /opt/local/share/abc/abc4.10.5/CMakeFiles/CMakeOutput.log
>
> ...
>
> ...
>
> ...(similar CMake errors)
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20190502/8ebcde58/attachment.html>


More information about the macports-dev mailing list