diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2024-12-30 11:32:32 -0500 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2024-12-30 11:32:32 -0500 |
commit | 04f2be3720904518abbe643f70a87adbef98b6f4 (patch) | |
tree | 7fff87045f87bc58c22bf78d074c038156772bbf | |
parent | b8a4b7e391328faf5c1e4cb8dbd9b5f55572834b (diff) |
build: Create a custom target for clean
Since the clean target doesn't know about iso/ and cmos.iso (they were
custom targets), we need a custom clean target that deletes those along
with the typical output files.
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | env.sh | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1621085..24cb5b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,3 +40,11 @@ add_custom_target(run-gdb DEPENDS iso ) + +add_custom_target(clean-custom + rm -rf + ${CMAKE_BINARY_DIR}/iso + ${CMAKE_BINARY_DIR}/cmos.iso + + DEPENDS clean +) @@ -28,7 +28,7 @@ alias b="mkdir -p $dir/build && cd $dir/build" CMAKE_FLAGS="-G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=true" alias cm="cmake $CMAKE_FLAGS" alias n="ninja" -alias nc="ninja clean" +alias nc="ninja clean-custom" alias nr="ninja run" alias ni="ninja iso" alias ng="ninja run-gdb" |