init: fully qualify and (more) robustly compute the cmake dir

This commit is contained in:
Danny Robson 2019-02-22 13:00:58 +11:00
parent 5c55820952
commit b0db83b691

View File

@ -50,6 +50,13 @@ def split_all_path(path):
if __name__ == '__main__':
self_path = os.path.realpath(__file__)
self_dir = os.path.dirname(self_path)
build_dir = os.path.realpath(os.getcwd())
source_dir = os.path.dirname(self_dir)
accumulated = []
components = ['']
@ -65,4 +72,4 @@ if __name__ == '__main__':
accumulated += [f'"-D{key}={val}"' for key, val in vars.items()]
accumulated += args
print("cmake ../../../ " + " ".join(accumulated))
print(f"cmake {source_dir} {' '.join(accumulated)}")