File tree Expand file tree Collapse file tree 4 files changed +15
-0
lines changed Expand file tree Collapse file tree 4 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,9 @@ cmake.source-dir = "."
181181# DEPRECATED in 0.10; use build.targets instead.
182182cmake.targets = " "
183183
184+ # The CMAKE_TOOLCHAIN_FILE used for cross-compilation.
185+ cmake.toolchain-file = " "
186+
184187# The versions of Ninja to allow. If Ninja is not present on the system or does
185188# not pass this specifier, it will be downloaded via PyPI if possible. An empty
186189# string will disable this check.
Original file line number Diff line number Diff line change @@ -231,6 +231,9 @@ def configure(
231231 python_include_dir = get_python_include_dir ()
232232 numpy_include_dir = get_numpy_include_dir ()
233233
234+ if self .settings .cmake .toolchain_file :
235+ cache_config ["CMAKE_TOOLCHAIN_FILE" ] = self .settings .cmake .toolchain_file
236+
234237 # Classic Find Python
235238 cache_config ["PYTHON_EXECUTABLE" ] = sys .executable
236239 cache_config ["PYTHON_INCLUDE_DIR" ] = python_include_dir
Original file line number Diff line number Diff line change 102102 },
103103 "description" : " DEPRECATED in 0.10; use build.targets instead." ,
104104 "deprecated" : true
105+ },
106+ "toolchain-file" : {
107+ "type" : " string" ,
108+ "description" : " The CMAKE_TOOLCHAIN_FILE used for cross-compilation."
105109 }
106110 }
107111 },
Original file line number Diff line number Diff line change @@ -103,6 +103,11 @@ class CMakeSettings:
103103 DEPRECATED in 0.10; use build.targets instead.
104104 """
105105
106+ toolchain_file : Optional [Path ] = None
107+ """
108+ The CMAKE_TOOLCHAIN_FILE used for cross-compilation.
109+ """
110+
106111
107112@dataclasses .dataclass
108113class SearchSettings :
You can’t perform that action at this time.
0 commit comments