Sam Moors <[email protected]> writes:
> Glad it workes for you!
>
> As far as I understand, the postinstallcmds are executed only once,
> after the 2 passes.
Yes, you're right. I was getting confused with
(pre){config|build|install}opts
for which each element of the list indeed applies to a cycle, whereas
postinstallcmds
is a list of commands be run after all cycles have been completed.
Thanks for clarifying that!
> Patching the sources is always a possibility of course, but since the
> fix is quite trivial I don't think that's needed.
>
> Cheers,
> Sam
>
> On Tue, May 19, 2020 at 10:44 AM Loris Bennett <[email protected]>
> wrote:
>
> Hi Sam,
>
> Thanks, that did work (once I fixed the typo - the ']' after
> 'SHLIB_EXT').
>
> So on the first pass, when the executable is made, the 'lib' directory
> is created and on the second, the library is moved from 'bin' to 'lib'?
> Not that I am complaining, but it seems slightly odd that the two build
> runs should be coupled like that. I would have expected something more
> along the lines of for the first build, do the right thing for that, and
> then for second build, do the right thing for that.
>
> I see that the CMakeList.txt contains
>
> set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
> set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
>
> so maybe someone can tweak something there.
>
> However, since I now have a solution, that someone is currently not
> going to be me :-)
>
> Thanks again,
>
> Loris
>
> Sam Moors <[email protected]> writes:
>
> > Hi Loris,
> >
> > not sure what is the 'correct' way of doing this, one way could be to
> remove the installopts and add:
> >
> > postinstallcmds = [
> > 'mkdir %(installdir)s/lib',
> > 'mv %%(installdir)s/{bin,lib}/raxml-ng-mpi.%s' % SHLIB_EXT],
> > ]
> >
> > does this work?
> >
> > Cheers,
> > Sam
> >
> > On Mon, May 18, 2020 at 2:56 PM Loris Bennett <[email protected]>
> wrote:
> >
> > Hi,
> >
> > Via the configuration parameter
> >
> > BUILD_AS_LIBRARY
> >
> > I can build RAxML-NG either as a stand-alone executable or as a shared
> > library. Depending on the value of the variable above I either getting
> >
> > raxml-ng-mpi
> >
> > or
> >
> > raxml-ng-mpi.so
> >
> > created in the subdirectory
> >
> > bin
> >
> > What I would like to have is
> >
> > bin/raxml-ng-mpi
> > lib/raxml-ng-mpi.so
> >
> > in the install directory.
> >
> > To do this I currently have
> >
> > configopts = [
> > "-DUSE_MPI=ON -DUSE_TERRAPHAST=OFF -DBUILD_AS_LIBRARY=OFF",
> > "-DUSE_MPI=ON -DUSE_TERRAPHAST=OFF -DBUILD_AS_LIBRARY=ON",
> > ]
> >
> > and have tried
> >
> > installopts = [
> > 'prefix=%(installdir)s/bin',
> > 'prefix=%(installdir)s/lib',
> > ]
> >
> > sanity_check_paths = {
> > 'files': ['bin/raxml-ng-mpi', 'lib/raxml-ng-mpi.so'],
> > 'dirs': [''],
> > }
> >
> > but I am getting
> >
> > Sanity check failed: no file found at 'lib/raxml-ng-mpi.so'
> >
> > and in the build directory I just have
> >
> > bin/raxml-ng-mpi.so
> >
> > What is the corrected way of doing this?
> >
> > Cheers,
> >
> > Loris
> >
> > --
> > Dr. Loris Bennett (Mr.)
> > ZEDAT, Freie Universität Berlin Email [email protected]
> >
> --
> Dr. Loris Bennett (Mr.)
> ZEDAT, Freie Universität Berlin Email [email protected]
>
--
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email [email protected]