Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLD: meson updates for SciPy #1603

Merged
merged 7 commits into from Feb 4, 2024
Merged

BLD: meson updates for SciPy #1603

merged 7 commits into from Feb 4, 2024

Conversation

HaoZeke
Copy link
Contributor

@HaoZeke HaoZeke commented Feb 3, 2024

Also includes a fix for #1294.

Addresses the latest review for SciPy integration.

@HaoZeke
Copy link
Contributor Author

HaoZeke commented Feb 3, 2024

@galabovaa and @jajhall this should be ready to go.

Copy link
Contributor

@galabovaa galabovaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

@jajhall jajhall merged commit de46be5 into ERGO-Code:latest Feb 4, 2024
44 checks passed
@HaoZeke HaoZeke deleted the scipyMeson branch February 4, 2024 09:46
@barracuda156
Copy link
Contributor

@HaoZeke Why does it refer only to LLVM? GCC needs that check and -latomic flag.

@HaoZeke
Copy link
Contributor Author

HaoZeke commented Feb 4, 2024

@HaoZeke Why does it refer only to LLVM? GCC needs that check and -latomic flag.

I believe that is covered by this section:

if(MSVC)
  set(HAVE_CXX_ATOMICS_WITHOUT_LIB True)
elseif(LLVM_COMPILER_IS_GCC_COMPATIBLE OR CMAKE_CXX_COMPILER_ID MATCHES "XL")
  # First check if atomics work without the library.
  check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITHOUT_LIB)
  # If not, check if the library exists, and atomics work with it.
  if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
    check_library_exists(atomic __atomic_fetch_add_4 "" HAVE_LIBATOMIC)
    if(HAVE_LIBATOMIC)
      list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
      check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITH_LIB)
      if (NOT HAVE_CXX_ATOMICS_WITH_LIB)
        message(FATAL_ERROR "Host compiler must support std::atomic!")
      endif()
    else()
      message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.")
    endif()
  endif()
endif()

Would be best if you could try it though, I don't have a 32-bit machine to check against.

@barracuda156
Copy link
Contributor

@HaoZeke If, counter-intuitively, LLVM_COMPILER_IS_GCC_COMPATIBLE evaluates as true for GCC, it probably will work.

@HaoZeke HaoZeke mentioned this pull request Feb 4, 2024
@HaoZeke
Copy link
Contributor Author

HaoZeke commented Feb 4, 2024

@HaoZeke If, counter-intuitively, LLVM_COMPILER_IS_GCC_COMPATIBLE evaluates as true for GCC, it probably will work.

Ah, my bad, that's unlikely, I opened #1604 with a modified fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants