From ea081254b4a0538f81c74bdb8338b29a068303aa Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Wed, 27 Jul 2016 07:53:36 -0500 Subject: 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 --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CMakeLists.txt') 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" ) -- cgit v1.2.3