-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2672 from nilsleiffischer/cmake_find_python
Make finding Python in build system more robust, update Docker container
- Loading branch information
Showing
41 changed files
with
136 additions
and
942 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Distributed under the MIT License. | ||
# See LICENSE.txt for details. | ||
|
||
# To run Python tests we need the development component (libs and include dirs). | ||
# It provides the `Python::Python` imported target. | ||
find_package(Python REQUIRED COMPONENTS Development) | ||
|
||
# We can't rely on CMake 3.14 quite yet so we backport the `Python::NumPy` | ||
# imported target that FindPython in CMake 3.14+ could also provide. | ||
find_package(NumPy 1.10 REQUIRED) | ||
|
||
message(STATUS "NumPy incl: " ${NUMPY_INCLUDE_DIRS}) | ||
message(STATUS "NumPy vers: " ${NUMPY_VERSION}) | ||
|
||
file(APPEND | ||
"${CMAKE_BINARY_DIR}/LibraryVersions.txt" | ||
"NumPy Version: ${NUMPY_VERSION}\n" | ||
) | ||
|
||
# Also check that SciPy is installed | ||
find_python_module(scipy TRUE) | ||
|
||
add_library(Python::NumPy INTERFACE IMPORTED) | ||
set_property(TARGET Python::NumPy PROPERTY | ||
INTERFACE_INCLUDE_DIRECTORIES ${NUMPY_INCLUDE_DIRS}) | ||
|
||
set_property( | ||
GLOBAL APPEND PROPERTY SPECTRE_THIRD_PARTY_LIBS | ||
Python::NumPy Python::Python | ||
) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.