aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2010-09-02 15:03:30 +0000
committerDavid Faure <faure@kde.org>2010-09-02 15:03:30 +0000
commitc25fb2e9b0c7af52dfc43a136efc702235096cab (patch)
treef1371866c0023c58ea9b763a7cec72bf8fbb78fe
parent279b235ebc4e21d6e99338fb5534c38d2520d69b (diff)
downloadextra-cmake-modules-c25fb2e9b0c7af52dfc43a136efc702235096cab.tar.gz
extra-cmake-modules-c25fb2e9b0c7af52dfc43a136efc702235096cab.tar.bz2
Add support for showing file and line number in debug output. Based on idea by MaikB on IRC.
Export KDE_DEBUG_FILELINE=1 to see it. Documented on http://techbase.kde.org/KDE_System_Administration/Environment_Variables. CCMAIL: kde-core-devel@kde.org svn path=/trunk/KDE/kdelibs/; revision=1171053
-rw-r--r--modules/FindKDE4Internal.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake
index 437bb850..69881d4b 100644
--- a/modules/FindKDE4Internal.cmake
+++ b/modules/FindKDE4Internal.cmake
@@ -1393,7 +1393,11 @@ set(KDE4_INCLUDES
${_KDE4_PLATFORM_INCLUDE_DIRS}
)
-set(KDE4_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS} -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS )
+# Used by kdebug.h: the "toplevel dir" is one level above CMAKE_SOURCE_DIR
+get_filename_component(CMAKE_TOPLEVEL_DIR "${CMAKE_SOURCE_DIR}/.." ABSOLUTE)
+string(LENGTH "${CMAKE_TOPLEVEL_DIR}" CMAKE_TOPLEVEL_DIR_LENGTH)
+
+set(KDE4_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS} -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DCMAKE_TOPLEVEL_DIR_LENGTH=${CMAKE_TOPLEVEL_DIR_LENGTH})
if (NOT _kde4_uninstall_rule_created)
set(_kde4_uninstall_rule_created TRUE)