init: fully qualify and (more) robustly compute the cmake dir
This commit is contained in:
parent
5c55820952
commit
b0db83b691
9
init.py
9
init.py
@ -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)}")
|
||||
|
Loading…
Reference in New Issue
Block a user