Fix DetectStdPmr for cross-compiling scenarios.#4995
Merged
Conversation
Member
Author
|
Validated in the Conda PR, this is ready for review. |
ihnorton
reviewed
May 22, 2024
| TILEDB_CAN_RUN_STD_PMR | ||
| TILEDB_CAN_COMPILE_STD_PMR | ||
| SOURCES "${CMAKE_SOURCE_DIR}/cmake/inputs/detect_std_pmr.cc" | ||
| try_compile( |
Member
There was a problem hiding this comment.
nit: indentation (non-blocking)
KiterLuc
pushed a commit
that referenced
this pull request
May 30, 2024
…entation. (#5027) SC-48427 #4995 changed detection of `std::pmr` from trying to _run_ a C++ file referencing pmr APIs, to trying to _compile_ it, which works in cross compilation scenarios and fixed Conda failures for reasons I do not understand. However in macOS versions prior to 14 the pmr headers exist, but binaries compiled with it fail ot run. There was already a check to force using the vendored pmr in such versions but it was defective, because it checked the `MACOS_DEPLOYMENT_TARGET` environment variable, which might not exist. Before #4995, the runtime failure on these versions would be caught by `try_run`. This PR updates the detection script to use the [`CMAKE_OSX_DEPLOYMENT_TARGET`](https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_DEPLOYMENT_TARGET.html) variable, which gets automatically filled by CMake either from the aforementioned environment variable or automatically. --- TYPE: NO_HISTORY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SC-47807
We use
try_compileinstead oftry_runto detect whether the headers forstd::pmrare available. This fixes errors in cross-compiling scenarios, like when building for osx-arm64 in an osx-x64 machine. Should fix failures in conda-forge/tiledb-feedstock#290, waiting for adding a patch and validating.TYPE: BUILD
DESC: Fix configuration errors when cross-compiling.