There is no guarantee that cmake will blindly pass all of the defines
to the preprocessor.
---
 tests/util/CMakeLists.txt |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
index 8f1420c..1b09437 100644
--- a/tests/util/CMakeLists.txt
+++ b/tests/util/CMakeLists.txt
@@ -24,6 +24,11 @@ set(UTIL_GL_SOURCES
        rgb9e5.c
        )
 
+if(HAVE_STRNDUP)
+       # Make sure to pass this to the preprocessor for the compiler.
+       add_definitions(-DHAVE_STRNDUP)
+endif()
+
 if(PIGLIT_USE_WAFFLE)
        list(APPEND UTIL_GL_SOURCES
                piglit-framework-gl/piglit_gbm_framework.c
-- 
1.7.9.5

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to