[Piglit] [PATCH 1/4] don't write generated header to the source directory

nobled nobled at dreamwidth.org
Tue Feb 28 14:06:05 PST 2012


It was impossible to have the source directory read-only.

Also add the include_directories() directive for tests/util
in just one place, under tests/, so that all subdirectories
inherit it. A bunch of CMakeLists.txt files duplicate it,
but now those copies can get removed in a later cleanup.
---
 CMakeLists.txt            |    2 +-
 tests/CMakeLists.txt      |    5 +++++
 tests/util/CMakeLists.txt |    1 +
 3 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d4b5b2a..7c31173 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -131,7 +131,7 @@ check_include_file(fcntl.h     HAVE_FCNTL_H)

 configure_file(
 	"${piglit_SOURCE_DIR}/tests/util/config.h.in"
-	"${piglit_SOURCE_DIR}/tests/util/config.h"
+	"${piglit_BINARY_DIR}/tests/util/config.h"
 )

 include_directories(src)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 52d16d4..1a53693 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,3 +1,8 @@
+include_directories(
+	${piglit_BINARY_DIR}/tests/util
+	${piglit_SOURCE_DIR}/tests/util
+)
+
 add_subdirectory (util)
 add_subdirectory (bugs)
 add_subdirectory (fbo)
diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
index 96964d6..a8d0373 100644
--- a/tests/util/CMakeLists.txt
+++ b/tests/util/CMakeLists.txt
@@ -2,6 +2,7 @@ add_definitions(-DSOURCE_DIR="${piglit_SOURCE_DIR}/")

 include_directories(
 	${OPENGL_INCLUDE_PATH}
+	${piglit_BINARY_DIR}/tests/util
 	${piglit_SOURCE_DIR}/tests/util
 )

-- 
1.7.4.1


More information about the Piglit mailing list