aboutsummaryrefslogtreecommitdiff
path: root/cmake/Modules/CompilerRTUtils.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Modules/CompilerRTUtils.cmake')
-rw-r--r--cmake/Modules/CompilerRTUtils.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake
index f9760f40dbd5..fce37e3eb49a 100644
--- a/cmake/Modules/CompilerRTUtils.cmake
+++ b/cmake/Modules/CompilerRTUtils.cmake
@@ -26,3 +26,13 @@ function(find_flag_in_string flag_string flag out_var)
set(${out_var} FALSE PARENT_SCOPE)
endif()
endfunction()
+
+# Set the variable var_PYBOOL to True if var holds a true-ish string,
+# otherwise set it to False.
+macro(pythonize_bool var)
+ if (${var})
+ set(${var}_PYBOOL True)
+ else()
+ set(${var}_PYBOOL False)
+ endif()
+endmacro()