Lines Matching +full:a +full:- +full:za +full:- +full:z0 +full:- +full:9 +full:_
3 # SPDX-License-Identifier: Apache-2.0
30 '''Run cmake to (re)generate a build system, a script, etc.
64 out, _ = p.communicate()
71 # A real error occurred, raise an exception
78 :param build_directory: runs "cmake --build build_directory"
80 these come after "--build <build_directory>"
83 Any additional keyword arguments are passed as-is to run_cmake().
86 return run_cmake(['--build', build_directory] + extra_args, **kwargs)
90 '''Make a C identifier from a string in the same way CMake does.
99 alpha_under = re.compile('[A-Za-z_]')
100 alpha_num_under = re.compile('[A-Za-z0-9_]')
103 ret.append('_')
108 ret.append('_')
114 '''Represents a CMake cache entry.
116 This class understands the type system in a CMakeCache.txt, and
120 ---------- -------------------------------------------
128 ---------- -------------------------------------------
131 # Regular expression for a cache entry.
133 # CMake variable names can include escape characters, allowing a
134 # wider set of names than is easy to match with a regular
135 # expression. To be permissive here, use a non-greedy match up to
136 # the first colon (':'). This breaks if the variable name has a
146 # Convert a CMake BOOL string into a Python bool.
148 # "True if the constant is 1, ON, YES, TRUE, Y, or a
149 # non-zero number. False if the constant is 0, OFF, NO,
151 # the suffix -NOTFOUND. Named boolean constants are
152 # case-insensitive. If the argument is not one of these
153 # constants, it is treated as a variable."
161 elif val.endswith('-NOTFOUND'):
172 # Comments can only occur at the beginning of a line.
173 # (The value of an entry could contain a comment character).
177 # Whitespace-only lines do not contain cache entries.
193 # If the value is a CMake list (i.e. is a string which
194 # contains a ';'), convert to a Python list.
210 '''Parses and represents a CMake cache file.'''
222 with open(cache_file, 'r', encoding="utf-8") as cache:
271 cmd = [cmake, '--version']
280 decoded = version_out.decode('utf-8')
284 'unexpected "cmake --version" output:\n{}\n'.
289 if '-' in version:
290 # Handle semver cases like "3.19.20210206-g1e50ab6"
292 version = version.split('-', 1)[0]