summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2015-09-14 22:01:48 +0100
committerJose Fonseca <jfonseca@vmware.com>2015-09-14 22:02:05 +0100
commitfb28def18ceb2516c460c4bd5825d2dc656c7818 (patch)
tree552e2642e826fc4f3421fb176d7a8e9cec9c2807 /gui
parent34280278d550799947067bdd2b2e63c8abd659c1 (diff)
cmake: Abort with an helpful message if an user tries to invoke cmake in gui subdir.
More than one once I received reports of failures to build qapitrace because the user presumed cmake should be invoked in the gui subdirectory. Nip that practice in the bud.
Diffstat (limited to 'gui')
-rw-r--r--gui/CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
index 6c5c7b92..a86336bb 100644
--- a/gui/CMakeLists.txt
+++ b/gui/CMakeLists.txt
@@ -1,3 +1,12 @@
+# CMake will throw a cryptic message if an user unwittingly invokes it from
+# this directory.
+if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
+ message (FATAL_ERROR
+ "qapitrace must be built from the top source directory.\n"
+ "Read docs/INSTALL.markdown for detailed build instructions."
+ )
+endif ()
+
add_definitions (-DQT_FORCE_ASSERTS)
if (APPLE)