From 4dd2a40e75b4e7e6d7e3e2f4b200a702dfe9f9a7 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 25 Nov 2019 07:46:35 +1100 Subject: [PATCH] CACHEDIR.TAG: use CMake to configure this file This ensures that IDEs will generate the file during configuration, rather than relying on the use to run `init.py` (which confuses CLion for some reason). --- CMakeLists.txt | 5 +++++ init.py | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..16fd371 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,5 @@ +configure_file ( + "${CMAKE_CURRENT_SOURCE_DIR}/build/CACHEDIR.TAG.in" + "${CMAKE_BINARY_DIR}/CACHEDIR.TAG" + @ONLY +) diff --git a/init.py b/init.py index 565c498..2e13047 100755 --- a/init.py +++ b/init.py @@ -88,7 +88,6 @@ if __name__ == '__main__': accumulated += [f'"-D{key}={val}"' for key, val in vars.items()] accumulated += args cmds = [ - f"cp {os.path.join(self_dir, 'CACHEDIR.TAG.in')} CACHEDIR.TAG", f"cmake {source_dir} {' '.join(accumulated)}", ' '.join(build) ]