aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-11-15 00:11:33 -0500
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-11-15 00:11:33 -0500
commit9aa37f310820128635e5b46d740cfa0fb49dc846 (patch)
treef0b219bca17925f2277620c0da8e4f4f784eda2e /CMakeLists.txt
parent3f04a14d7c0b92bd67e67e2902c8153771418e60 (diff)
prevent in-source builds. hope it's ok with you... it's still possible, of course, to have the build dir as a subdir of the source dir.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 09934cdcc..ee93e3de3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,10 @@ project(Eigen)
cmake_minimum_required(VERSION 2.6.2)
+if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
+ message(FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there.")
+endif()
+
# automatically parse the version number
file(READ "${CMAKE_SOURCE_DIR}/Eigen/src/Core/util/Macros.h" _eigen2_version_header)
string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen2_world_version_match "${_eigen2_version_header}")
@@ -164,6 +168,7 @@ if(cmake_generator_tolower MATCHES "makefile")
message("make install | Install to ${CMAKE_INSTALL_PREFIX}")
message(" | * To change that: cmake . -DCMAKE_INSTALL_PREFIX=yourpath")
message("make doc | Generate the API documentation, requires Doxygen & LaTeX")
+ message("make check | Build and run the unit-tests")
message("make blas | Build BLAS library (not the same thing as Eigen)")
message("--------------+----------------------------------------------------------------")
endif()