[Piglit] [PATCH v3 12/19] cmake: Define wrapper functions piglit_add_{executable, library}

Paul Berry stereotype441 at gmail.com
Wed Mar 21 08:58:11 PDT 2012


From: Chad Versace <chad.versace at linux.intel.com>

For now, `piglit_add_executable` is a trivial wrapper around
`add_executable`.  Ditto for `piglit_add_library`.

A subsequent commit will leverage the wrappers to add to each object file
an explicit dependency on the header files generated by piglit_dispatch.

Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
 cmake/piglit_util.cmake |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/cmake/piglit_util.cmake b/cmake/piglit_util.cmake
index 78a0919..68c7288 100644
--- a/cmake/piglit_util.cmake
+++ b/cmake/piglit_util.cmake
@@ -47,3 +47,29 @@ function(piglit_include_target_api)
     endif(EXISTS ${api_file})
 
 endfunction(piglit_include_target_api)
+
+#
+# For now, this is a trivial wrapper around `add_executable`.
+#
+# In the future, it will be used to add to each object file an explicit
+# dependency on the header files generated by piglit_dispatch.
+#
+function(piglit_add_executable name)
+
+    list(REMOVE_AT ARGV 0)
+    add_executable(${name} ${ARGV})
+
+endfunction(piglit_add_executable)
+
+#
+# For now, this is a trivial wrapper around `add_library`.
+#
+# In the future, it will be used to add to each object file an explicit
+# dependency on the header files generated by piglit_dispatch.
+#
+function(piglit_add_library name)
+
+    list(REMOVE_AT ARGV 0)
+    add_library(${name} ${ARGV})
+
+endfunction(piglit_add_library)
-- 
1.7.7.6



More information about the Piglit mailing list