https://git.reactos.org/?p=reactos.git;a=commitdiff;h=05169a498755234738811…
commit 05169a49875523473881171b37425f97e45a9f0c
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sun Dec 9 14:23:55 2018 +0100
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Tue Dec 11 21:50:58 2018 +0100
Revert "[CMAKE] Use configured include files to define the __RELFILE__ hack
(#979)"
This reverts commit 07bd6089ec96b068d92f42e764cc7336a7de24a0.
---
CMakeLists.txt | 3 +++
sdk/include/reactos/builddir.h.cmake | 7 -------
sdk/include/reactos/debug.h | 7 +------
sdk/include/reactos/version.cmake | 1 -
sdk/include/reactos/wine/debug.h | 7 +------
5 files changed, 5 insertions(+), 20 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f79577f65d..d2e8b861ee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,6 +57,9 @@ endif()
include(sdk/cmake/compilerflags.cmake)
add_definitions(-D__REACTOS__)
+add_definitions(-DREACTOS_SOURCE_DIR="\\"${REACTOS_SOURCE_DIR}\\"")
+add_definitions(-DREACTOS_BINARY_DIR="\\"${REACTOS_BINARY_DIR}\\"")
+add_compile_flags(-D__RELFILE__="&__FILE__[sizeof REACTOS_SOURCE_DIR]")
if(MSVC_IDE)
add_compile_flags("/MP")
diff --git a/sdk/include/reactos/builddir.h.cmake b/sdk/include/reactos/builddir.h.cmake
deleted file mode 100644
index 8bd5b44ac5..0000000000
--- a/sdk/include/reactos/builddir.h.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Do not edit - Machine generated */
-#pragma once
-
-#define REACTOS_SOURCE_DIR "@REACTOS_SOURCE_DIR@"
-#define REACTOS_BINARY_DIR "@REACTOS_BINARY_DIR@"
-
-/* EOF */
diff --git a/sdk/include/reactos/debug.h b/sdk/include/reactos/debug.h
index f56090b65c..ab332fda18 100644
--- a/sdk/include/reactos/debug.h
+++ b/sdk/include/reactos/debug.h
@@ -15,12 +15,7 @@
#pragma once
#ifndef __RELFILE__
-# ifdef __REACTOS__
-# include <reactos/builddir.h>
-# define __RELFILE__ &__FILE__[sizeof(REACTOS_SOURCE_DIR)]
-# else
-# define __RELFILE__ __FILE__
-# endif
+#define __RELFILE__ __FILE__
#endif
/* Define DbgPrint/DbgPrintEx/RtlAssert unless the NDK is used */
diff --git a/sdk/include/reactos/version.cmake b/sdk/include/reactos/version.cmake
index 6f9cec7167..c1c22ee913 100644
--- a/sdk/include/reactos/version.cmake
+++ b/sdk/include/reactos/version.cmake
@@ -53,4 +53,3 @@ endif()
configure_file(sdk/include/reactos/version.h.cmake
${REACTOS_BINARY_DIR}/sdk/include/reactos/version.h)
configure_file(sdk/include/reactos/buildno.h.cmake
${REACTOS_BINARY_DIR}/sdk/include/reactos/buildno.h)
-configure_file(sdk/include/reactos/builddir.h.cmake
${REACTOS_BINARY_DIR}/sdk/include/reactos/builddir.h)
diff --git a/sdk/include/reactos/wine/debug.h b/sdk/include/reactos/wine/debug.h
index 23f402a13f..35aefc9852 100644
--- a/sdk/include/reactos/wine/debug.h
+++ b/sdk/include/reactos/wine/debug.h
@@ -28,12 +28,7 @@
#endif
#ifndef __RELFILE__
-# ifdef __REACTOS__
-# include <reactos/builddir.h>
-# define __RELFILE__ &__FILE__[sizeof(REACTOS_SOURCE_DIR)]
-# else
-# define __RELFILE__ __FILE__
-# endif
+#define __RELFILE__ __FILE__
#endif
#ifdef __WINE_WINE_TEST_H