diff --git a/src/args.cpp b/src/args.cpp index a482eaf..39bd584 100644 --- a/src/args.cpp +++ b/src/args.cpp @@ -43,7 +43,7 @@ const char *handle_args(int argc, char **argv) { auto ret = build::clean(); if (ret) return "CMake clean error!"; - return "CMake run completed!"; + return "Cleaned build directory!"; } else { return "Unknown argument!"; } diff --git a/src/build.cpp b/src/build.cpp index a8aaa81..011d236 100644 --- a/src/build.cpp +++ b/src/build.cpp @@ -48,13 +48,13 @@ int run(int argc, char **argv) { } int clean() { - int ret = 0; + bool ret = false; cmake::CMake cmake(".", true); if (fs::exists(cmake.bin_dir)) { ret = fs::remove_all(cmake.bin_dir); fs::create_directory(cmake.bin_dir); } - return ret; + return !ret; } } // namespace cmkr::build