Skip to content

BLD: meson updates for SciPy#1603

Merged
jajhall merged 7 commits intoERGO-Code:latestfrom
HaoZeke:scipyMeson
Feb 4, 2024
Merged

BLD: meson updates for SciPy#1603
jajhall merged 7 commits intoERGO-Code:latestfrom
HaoZeke:scipyMeson

Conversation

@HaoZeke
Copy link
Copy Markdown
Contributor

@HaoZeke HaoZeke commented Feb 3, 2024

Also includes a fix for #1294.

Addresses the latest review for SciPy integration.

@HaoZeke
Copy link
Copy Markdown
Contributor Author

HaoZeke commented Feb 3, 2024

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

Copy link
Copy Markdown
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
@HaoZeke HaoZeke deleted the scipyMeson branch February 4, 2024 09:46
@barracuda156
Copy link
Copy Markdown
Contributor

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

@HaoZeke
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

4 participants