Use CMake 3.14+ documented way to pass the source dir -S. (#337)

The `-H<src_dir>` was never officially documented by CMake
This commit is contained in:
Robert Maynard
2022-01-27 17:45:35 -05:00
committed by GitHub
parent 4f7af69925
commit 11c7ec8afa
12 changed files with 17 additions and 17 deletions

View File

@@ -26,7 +26,7 @@ for example in examples:
print("running example %s" % example.name)
print("================" + ('=' * len(example.name)))
project = Path(".") / 'build' / example.name
configure = runCommand('cmake -H%s -B%s' % (example, project))
configure = runCommand('cmake -S%s -B%s' % (example, project))
print(' ' + '\n '.join([line for line in configure.split('\n') if 'CPM:' in line]))
build = runCommand('cmake --build %s -- -j%i' % (project, os.cpu_count() / 2))
print(' ' + '\n '.join([line for line in build.split('\n') if 'Built target' in line]))