Fix test dependencies#1970
Merged
keithw merged 2 commits intoWebAssembly:mainfrom Aug 26, 2022
alexreinking:bugfix/1385
Merged
Conversation
Rather than disable tests with a warning when Python cannot be found, require it when tests are enabled. Avoid the search altogether when tests are disabled. This check additionally causes issues with FetchContent users that use the newer FindPython(3) module. Fixes #1385
find_package(Threads) was called redundantly and a bad check was used to disable a pthreads-specific test. Rather than checking WIN32, one should check CMAKE_USE_PTHREADS_INIT
Contributor
Author
|
Thanks @keithw so much for all your time reviewing my PRs today! |
matthias-blume
pushed a commit
to matthias-blume/wabt
that referenced
this pull request
Dec 16, 2022
* Only search for Python when BUILD_TESTS=ON Rather than disable tests with a warning when Python cannot be found, require it when tests are enabled. Avoid the search altogether when tests are disabled. This check additionally causes issues with FetchContent users that use the newer FindPython(3) module. Fixes WebAssembly#1385 * Fix usage of Threads find_package(Threads) was called redundantly and a bad check was used to disable a pthreads-specific test. Rather than checking WIN32, one should check CMAKE_USE_PTHREADS_INIT
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.
This PR consists of two tightly related changes. It depends on #1968
1. Fix usage of Threads
find_package(Threads)was called redundantly and a bad check was used to disable a pthreads-specific test. Rather than checkingWIN32, one should checkCMAKE_USE_PTHREADS_INIT.2. Only search for Python when
BUILD_TESTS=ONRather than disable tests with a warning when Python cannot be found, require it when tests are enabled. Avoid the search altogether when tests are disabled.
This check additionally causes issues with FetchContent users that use the newer FindPython(3) module.
Fixes #1385