summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-04-23 20:21:04 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-04-23 20:21:04 (GMT)
commit35a297b46143d6ebf10ea967d8519b410d429ef8 (patch)
tree596a5438073c01f0f5db9d6ff22eff040b991cd6 /CMakeLists.txt
parentf0c4d55f914d3d7ee27703fbeb54c99ffa1603eb (diff)
parentaa2f93cdf6339ff5c4ca88b6d0bdcd5ad97b96ef (diff)
downloadhdf5-35a297b46143d6ebf10ea967d8519b410d429ef8.zip
hdf5-35a297b46143d6ebf10ea967d8519b410d429ef8.tar.gz
hdf5-35a297b46143d6ebf10ea967d8519b410d429ef8.tar.bz2
[svn-r26911] svn merge -r26866:26910 https://svn.hdfgroup.uiuc.edu/hdf5/trunk
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 97b4463..e1dfe0a 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
#