aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/cuda.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2023-02-22 13:10:24 -0800
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2023-04-21 15:18:56 +0530
commitbfce5c45a4784d86be8472a00f628f2ffac74cf2 (patch)
tree420ebb65147f91175e9b84bc9dbb50cbf20b8684 /mesonbuild/compilers/cuda.py
parentc0c9f755a40a51889e73275578cb49296de84e43 (diff)
downloadmeson-bfce5c45a4784d86be8472a00f628f2ffac74cf2.zip
meson-bfce5c45a4784d86be8472a00f628f2ffac74cf2.tar.gz
meson-bfce5c45a4784d86be8472a00f628f2ffac74cf2.tar.bz2
compilers: convert method to get assert control to a boolean
C like compilers only off `-DNDEBUG` to disable asserts. This is not a universal paradigm however. Rust, for example has an argument that takes a boolean. To better represent this, we allow passing a `disable` boolean. `disable` was chosen rather than `enable` because it allowed all existing logic to be left in place
Diffstat (limited to 'mesonbuild/compilers/cuda.py')
-rw-r--r--mesonbuild/compilers/cuda.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/compilers/cuda.py b/mesonbuild/compilers/cuda.py
index 70a4fe9..bbc2fc8 100644
--- a/mesonbuild/compilers/cuda.py
+++ b/mesonbuild/compilers/cuda.py
@@ -787,5 +787,5 @@ class CudaCompiler(Compiler):
def get_profile_use_args(self) -> T.List[str]:
return ['-Xcompiler=' + x for x in self.host_compiler.get_profile_use_args()]
- def get_disable_assert_args(self) -> T.List[str]:
- return self.host_compiler.get_disable_assert_args()
+ def get_assert_args(self, disable: bool) -> T.List[str]:
+ return self.host_compiler.get_assert_args(disable)