From 4874e2c397ddb8310d0c63d6fd4d4c9c88431f70 Mon Sep 17 00:00:00 2001 From: "David C. Lonie" Date: Fri, 3 Oct 2014 12:48:10 -0400 Subject: [PATCH] Fix the regex for detecting in-source builds. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 19f73d558e..680c3cfe2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ endif() project(cdat) # Disable in source build of any kind -STRING(REGEX MATCH "${cdat_SOURCE_DIR}/" BUILDINSOURCE "${cdat_BINARY_DIR}/") +STRING(REGEX MATCH "^${cdat_SOURCE_DIR}/" BUILDINSOURCE "${cdat_BINARY_DIR}/") if (BUILDINSOURCE) set(msg "[ERROR] CDAT requires an out of source Build.") set(msg "${msg} Run 'git clean -dfx' to restore source dir.")