From 9020dc7c04d389d534f36890756d97d2be219e07 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 16 Sep 2016 17:59:21 +0200 Subject: cmake/mrproper: reindent --- cmake/opentrack-clean-build-directory.cmake | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/cmake/opentrack-clean-build-directory.cmake b/cmake/opentrack-clean-build-directory.cmake index a8141344..93c736dd 100644 --- a/cmake/opentrack-clean-build-directory.cmake +++ b/cmake/opentrack-clean-build-directory.cmake @@ -1,5 +1,6 @@ function(cleanup_build_dir) - if(NOT $ENV{USERNAME} STREQUAL "sthalik") + set(user "$ENV{USERNAME}") + if(NOT user STREQUAL "sthalik") message(WARNING "you can't run this potentially destructive function") message(FATAL_ERROR "if you're sure, remove this line") endif() @@ -13,18 +14,15 @@ function(cleanup_build_dir) set(got-cache FALSE) foreach(i ${files}) - if(i STREQUAL "CMakeCache.txt") + if(i STREQUAL "CMakeCache.txt") set(got-cache TRUE) - continue() + else() + list(APPEND files_ "${CMAKE_BINARY_DIR}/${i}") endif() - - list(APPEND files_ "${CMAKE_BINARY_DIR}/${i}") endforeach() - unset(files) - if(NOT got-cache) - message(FATAL_ERROR "") + message(FATAL_ERROR "sanity check failed") endif() # let's hope nothing bad happens -- cgit v1.2.3