tech-pkg archive

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

Re: math/lapack and MAKE_JOBS



On Sat, 12 Mar 2022 17:33:39 +0100
"Dr. Thomas Orgis" <thomas.orgis%uni-hamburg.de@localhost> wrote:
> Yes, that's it.
>
> gfortran -fPIC -c -o SRC/CMakeFiles/lapack.dir/la_constants.f90.o
> ../SRC/la_constants.f90 gfortran -c -o
> SRC/CMakeFiles/lapack_static.dir/la_constants.f90.o
> ../SRC/la_constants.f90
> 
> will both create la_constats.mod in the current directory. The build
> system is not aware of how Fortran 90 works.
> 
> I might have to drop my approach to be able to build shared and static
> libs at the same time, better make two passes. Or does someone know
> off-hand how to serialize the build in CMake so that it doesn't try to
> build objects for the shared and static libs at the same time?
> 
> Maybe it would do the trick to explicitly call the shared/static
> targets in series in our Makefile. What's the easiest way to tweak the
> build that way or make it two-stage, even, with pkgsrc's CMake
> support?

One way to fix this might be to set the cmake property
Fortan_MODULE_DIRECTORY to something on the static library. Then the two
writes won't conflict. See the Fortran_MODULE_DIRECTORY cmake
property docs for more info. I am just trying it with
${CMAKE_CURRENT_BINARY_DIR}/${LAPACKLIB}_static_modules and two files
get created in different dirs. Ok to commit this?

 Niclas



Home | Main Index | Thread Index | Old Index