Closed jschueller closed 2 months ago
Hello.
I liked the idea that you used to solve the library suffix. However, there is something not working correctly.
For instance, run this shell script on your branch on a Debian-derived distro (I used Ubuntu 24.04):
cd /tmp
rm -rf cminpack
git clone --branch=pkgconfig https://github.com/jschueller/cminpack
cmake -DUSE_BLAS=OFF -DBUILD_SHARED_LIBS=ON --install-prefix $PWD/install -S cminpack/ -B _build
cmake --build _build/
ctest --test-dir _build/
cmake --install _build/
cat /tmp/install/lib/pkgconfig/cminpack.pc
You get the following screen:
In the end of the image, you can see the -D__cminpack_float__
for the double-precision version cminpack.pc
.
indeed, PC_CMINPACK_CFLAGS must be reset, fixed now
On the tests I ran after your fixed PC_CMINPACK_CFLAGS
, I didn't find any issues related to the generated pkgconfig files, nor the CMinpackConfig scripts.
I think your PR has a cleaner solution to fix pkgconfig files while keeping compatibility to previous versions. If the main intent is to fix pkgconfig related things, I think your PR is ready to be merged.
In my PR, I also added a guard to only test the library if the double-precision version was built. Because you can see here https://github.com/jschueller/cminpack/blob/pkgconfig/examples/CMakeLists.txt#L33 and here https://github.com/jschueller/cminpack/blob/pkgconfig/examples/CMakeLists.txt#L65, it is testing only for the double precision version.
done too
I didn't test, but I guess the same target guard is needed here https://github.com/jschueller/cminpack/blob/pkgconfig/examples/CMakeLists.txt#L47
indeed
In my view, I think your PR is now ready to be merged.
Why don't we get full CI build on this PR? The whole ubuntu matrix is missing
github is having troubles: https://www.githubstatus.com/
I propose this simpler fixes instead of #64:
/cc @luau-project