summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-04-23 15:41:22 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-04-23 15:41:22 (GMT)
commit1c2136ee49b26730890154c89d9eebe95e113205 (patch)
treef82fe0f9f3f992d48199f46fd2e459d622e64bf6 /CMakeLists.txt
parenta3a1f374468d6c3d3888ef5f4fb90da744b46da2 (diff)
downloadhdf5-1c2136ee49b26730890154c89d9eebe95e113205.zip
hdf5-1c2136ee49b26730890154c89d9eebe95e113205.tar.gz
hdf5-1c2136ee49b26730890154c89d9eebe95e113205.tar.bz2
[svn-r26900] Update CMake doc references
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a4135f4..e9f73ec 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,6 +10,24 @@ PROJECT (HDF5 C CXX)
# set CMAKE_INSTALL_PREFIX to the required install path.
# Make install can be used to install all components for system-wide use.
#
+if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
+ MESSAGE(FATAL_ERROR "\nERROR! ${PROJECT_NAME} DOES NOT SUPPORT IN SOURCE BUILDS!\n"
+ "CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}"
+ " == CMAKE_CURRENT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}\n"
+ "NEXT STEPS:\n"
+ "(1) Delete the CMakeCache.txt file and the CMakeFiles/ directory\n"
+ " under the source directory for ${PROJECT_NAME}, otherwise you\n"
+ " will not be able to configure ${PROJECT_NAME} correctly!\n"
+ " * For example, on linux machines do:\n"
+ " $ rm -r CMakeCache.txt CMakeFiles/\n"
+ "(2) Create a different directory and configure ${PROJECT_NAME} in that directory.\n"
+ " * For example, on linux machines do:\n"
+ " $ mkdir MY_BUILD\n"
+ " $ cd MY_BUILD\n"
+ " $ cmake [OPTIONS] ..\n"
+ )
+endif ()
+
#-----------------------------------------------------------------------------
# Instructions for use : Sub-Project Build
#