[Build] Support OpenAssetIO CI job#4
Merged
Conversation
If `libpython` is linked in to the `test.python.bridge` executable as a static library, then by default none of `libpython`'s symbols will be visible to Python extension modules, causing "undefined reference" errors when importing. This is simply the default behaviour for executable targets. So instruct CMake to make the executable's symbols visible. Signed-off-by: David Feltell <david.feltell@foundry.com>
The default is toolchain-specific (i.e. CMake generator-specific) and this can cause unexpected errors. E.g. if we've installed Python as a Release library, but this project is built as a Debug library, then on Windows we'll try to link to `python39_d`, i.e. the debug lib, which may not exist. We could enforce that `CMAKE_BUILD_TYPE` is always set externally, however if we forget then builds might just work, but then fail unexpectedly if we swap the toolchain. So better to just be consistent and default to Release in all cases, unless explicitly overridden. Signed-off-by: David Feltell <david.feltell@foundry.com>
elliotcmorris
approved these changes
Nov 8, 2022
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.
Default to Release build and export symbols for embedded interpreter.
See OpenAssetIO/OpenAssetIO#723