(args, path, extra_config_args=[],
extra_build_args=[], cmakelists_path="..")
| 194 | |
| 195 | |
| 196 | def build_cmake_project(args, path, extra_config_args=[], |
| 197 | extra_build_args=[], cmakelists_path=".."): |
| 198 | mkdir_if_not_exists(path) |
| 199 | |
| 200 | cmake_command = ["cmake"] \ |
| 201 | + args.cmake_config_args \ |
| 202 | + extra_config_args \ |
| 203 | + [cmakelists_path] |
| 204 | return_code = subprocess.call(cmake_command, cwd=path) |
| 205 | if return_code != 0: |
| 206 | print("Command failed:", " ".join(cmake_command)) |
| 207 | sys.exit(1) |
| 208 | |
| 209 | cmake_command = ["cmake", |
| 210 | "--build", ".", |
| 211 | "--target", "install", |
| 212 | "--config", args.build_type] \ |
| 213 | + args.cmake_build_args \ |
| 214 | + extra_build_args |
| 215 | return_code = subprocess.call(cmake_command, cwd=path) |
| 216 | if return_code != 0: |
| 217 | print("Command failed:", " ".join(cmake_command)) |
| 218 | sys.exit(1) |
| 219 | |
| 220 | |
| 221 | def build_eigen(args): |
no test coverage detected