aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorHans Johnson <hans-johnson@uiowa.edu>2016-07-27 07:53:36 -0500
committerHans Johnson <hans-johnson@uiowa.edu>2016-07-28 08:56:44 -0500
commitea081254b4a0538f81c74bdb8338b29a068303aa (patch)
treeef6fcc472e88667f9c84e8595dbd0ffa7b680554 /CMakeLists.txt
parent44ef9da070628a2ff7bf63afca60d0ebe0ed7875 (diff)
COMP: Prevent insource builds and inbuild installs
With cmake is best to require out-of-source builds, and to avoid intalling into the same directory as the build was performed. Both of these situations can cause very confusing situations that can frustrate new users of the software package, so check for and provide guidance to the end-users. These files were initially contributed to the ITK (www.itk.org) project and have been widely re-used by many other projects. NOTE: This patch is dependant on pull request #16
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0f235537..ae2bd2d3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,6 +42,8 @@ configure_file(
# Add the CMake directory for custon CMake modules
set(CMAKE_MODULE_PATH "${LAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH})
+include(PreventInSourceBuilds)
+include(PreventInBuildInstalls)
if (UNIX)
if ( "${CMAKE_Fortran_COMPILER}" MATCHES "ifort" )