json-fortran icon indicating copy to clipboard operation
json-fortran copied to clipboard

Fixes compilation with Ninja and IntelLLVM when using OneAPI

Open lmdiazangulo opened this issue 2 years ago • 2 comments

I have found some issues trying to compile with the recent Intel One API + Visual Studio 2022. Basically I got this error.

1> [CMake]   failed with:
1> [CMake] 
1> [CMake]    ninja: error: build.ninja:280: multiple rules generate jsonfortran.lib

I have implemented some changes in CMakeLists.txt to fix it by considering the case of IntelLLVM which is the compiler Id of the new compiler.

Best regards, Luis

lmdiazangulo avatar Oct 26 '23 15:10 lmdiazangulo

Codecov Report

Merging #544 (9eaa63f) into master (7819919) will not change coverage. The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #544   +/-   ##
=======================================
  Coverage   89.48%   89.48%           
=======================================
  Files           7        7           
  Lines        5356     5356           
=======================================
  Hits         4793     4793           
  Misses        563      563           

codecov[bot] avatar Dec 20 '23 12:12 codecov[bot]

It looks like the CI failed? (haven't looked into why)

jacobwilliams avatar Dec 26 '23 16:12 jacobwilliams

What is the reason for both JSONFORTRAN_ENABLE_TESTS and ENABLE_TESTS? It's not clear to me what the user is supposed to set to get the tests...

(note: the CI is failing because the tests aren't being enabled)

jacobwilliams avatar May 25 '24 21:05 jacobwilliams

It looks like -D ENABLE_TESTS=ON enables the tests?

jacobwilliams avatar May 26 '24 03:05 jacobwilliams

It looks like -D ENABLE_TESTS=ON enables the tests?

Yes. I added an option because at some point I was using it as a submodule which was imported with add_subdirectory from a parent cmake. It was a little bit confusing to me that the names in the variables defined by options do not include the name of the project they refer to.

Besides that, thank you a lot for this library. We are using it extensively in our FDTD solver project: https://github.com/OpenSEMBA/fdtd

lmdiazangulo avatar May 26 '24 08:05 lmdiazangulo

I think these changes have broken the conda-forge package. The shared library doesn't seem to be being built anymore. Did that get disabled?

We should be getting:

-- Installing: $PREFIX/lib/libjsonfortran.so.8.4.0
-- Installing: $PREFIX/lib/libjsonfortran.so.8.4
-- Installing: $PREFIX/lib/libjsonfortran.so
-- Installing: $PREFIX/lib/libjsonfortran.a

Now we are only getting:

-- Installing: $PREFIX/lib/libjsonfortran.a

https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=943042&view=logs&j=656edd35-690f-5c53-9ba3-09c10d0bea97&t=986b1512-c876-5f92-0d81-ba851554a0a3

jacobwilliams avatar May 26 '24 13:05 jacobwilliams

See #558

jacobwilliams avatar May 26 '24 13:05 jacobwilliams

Yes, maybe I disabled that while doing some tests. Maybe is better to revert the merge. Sorry about that.

lmdiazangulo avatar May 26 '24 14:05 lmdiazangulo

I think https://github.com/jacobwilliams/json-fortran/commit/1784d4ee2b8cc08f95e86a87840bbaa75111f649 fixes it.

jacobwilliams avatar May 26 '24 14:05 jacobwilliams