pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: devel/hdf5-c++ and ninja



Thomas Klausner <wiz%gatalith.at@localhost> writes:

> On Wed, Mar 05, 2025 at 10:22:06AM -0500, Greg Troxel wrote:
>> Building devel/hdf5-c++, it fails to find build.ninja, and it looks like
>> confusion about
>> 
>>   BUILD_DIRS+=    c++
>> 
>> which is honored in part but apparently cmake/ninja doesn't know about
>> that.
>
> Yes, that can't work because it assumes that the necessary information
> for a build is in c++.  That's only true for the recursive Makefile
> structure cmake's Makefile generator produces.

I realize we only have two, but it seems then that using BUILD_DIRS only
works in the special case of a generator with recursive control files.
More precisely, only if you can run the build program in the named
subdir, but it likely amounts to the same thing.

> So either find a build target for ninja that only builds the c++
> subset of the package, and add logic to use one or the other in the
> package Makefile, or override CMAKE_GENERATOR for that pkgsrc
> Makefile.
>
> I.e.
>
> .include "../../mk/bsd.prefs.mk"
> # building only a subdirectory using BUILD_DIRS is not supported with
> # the ninja generator
> CMAKE_GENERATOR=        make

That works.

I wonder if we should force CMAKE_GENERATOR to make in cmake/build.mk,
whenever BUILD_DIRS is set.


Home | Main Index | Thread Index | Old Index