From 3cbab4e2255bf83546bc2405d81b7a6e6dfe8e3c Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Tue, 2 Mar 2021 09:27:14 +0100 Subject: [PATCH] No write check on install dir with USE_SUPERBUILD=OFF --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d7c284a..b7158325 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,14 +54,14 @@ if(INSTALL_DIR) set(INSTALL_DIR_DEFAULT ${INSTALL_DIR}) endif(INSTALL_DIR) -if(UNIX) +if(UNIX AND NOT USE_SUPERBUILD) message("Checking for write permissions in install directory...") execute_process(COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}) execute_process(COMMAND test -w ${CMAKE_INSTALL_PREFIX} RESULT_VARIABLE res) if(res) message(WARNING "No write access at install directory, please set correct permissions") endif() -endif(UNIX) +endif(UNIX AND NOT USE_SUPERBUILD) if (USE_SUPERBUILD) project (SUPERBUILD)