Skip to content

Commit 5db2581

Browse files
committed
use relative path to the cmake file
1 parent 76b688f commit 5db2581

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/update_gists

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ HEADERS = {
2929
USER_AGENT = "Mozilla/5.0 (Windows NT 6.1; Win64; x64)"
3030

3131

32-
def populate_cmake_template(name: str):
32+
def populate_cmake_template(name: str, dir: Path):
3333
file_list = "\n".join(
34-
f" ${{CMAKE_CURRENT_SOURCE_DIR}}/{h}"
34+
f" ${{CMAKE_CURRENT_SOURCE_DIR}}/{h.relative_to(dir)}"
3535
for h in (INCLUDE / name / "include" / "ut" / name).iterdir()
3636
if h.is_file()
3737
)
@@ -177,7 +177,7 @@ def write_cmake(name: str):
177177
return False
178178
print(f"Generating CMake file for target UT::{name}")
179179
with open(cmake_file, "w") as f:
180-
f.write(populate_cmake_template(name))
180+
f.write(populate_cmake_template(name, cmake_file.parent))
181181

182182

183183
def get_desc(p: Path):

0 commit comments

Comments
 (0)