diff options
author | David Shah <dave@ds0.me> | 2019-08-21 18:42:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-21 18:42:39 +0100 |
commit | c192ba261d77ad7f0a744fb90b01e4a5b63938c4 (patch) | |
tree | 0435625f345b62d5efef64207da90a7c46d51f02 | |
parent | a6a4349bd6ec9531937944a45fc0807c63057221 (diff) | |
parent | 2d66f8e6c979149ff5254b8cc61540617bf5c103 (diff) | |
download | nextpnr-c192ba261d77ad7f0a744fb90b01e4a5b63938c4.tar.gz nextpnr-c192ba261d77ad7f0a744fb90b01e4a5b63938c4.tar.bz2 nextpnr-c192ba261d77ad7f0a744fb90b01e4a5b63938c4.zip |
Merge pull request #316 from gsomlo/gls-py38-cmake
cmake: add python38 to list of versions searched for boost components
-rw-r--r-- | CMakeLists.txt | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f662dbe7..77745f95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -161,24 +161,13 @@ if (BUILD_PYTHON) endwhile () if (NOT Boost_PYTHON_FOUND) - find_package(Boost QUIET COMPONENTS python3 ${boost_libs}) - if ("${Boost_LIBRARIES}" MATCHES ".*(python|PYTHON).*" ) - set(Boost_PYTHON_FOUND TRUE) - endif () - endif () - - if (NOT Boost_PYTHON_FOUND) - find_package(Boost QUIET COMPONENTS python36 ${boost_libs}) - if ("${Boost_LIBRARIES}" MATCHES ".*(python|PYTHON).*" ) - set(Boost_PYTHON_FOUND TRUE) - endif () - endif () - - if (NOT Boost_PYTHON_FOUND) - find_package(Boost QUIET COMPONENTS python37 ${boost_libs}) - if ("${Boost_LIBRARIES}" MATCHES ".*(python|PYTHON).*" ) - set(Boost_PYTHON_FOUND TRUE) - endif () + foreach (PyVer 3 36 37 38) + find_package(Boost QUIET COMPONENTS python${PyVer} ${boost_libs}) + if ("${Boost_LIBRARIES}" MATCHES ".*(python|PYTHON).*" ) + set(Boost_PYTHON_FOUND TRUE) + break() + endif () + endforeach () endif () if (NOT Boost_PYTHON_FOUND) |