aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/piglit_util.cmake26
1 files changed, 26 insertions, 0 deletions
diff --git a/cmake/piglit_util.cmake b/cmake/piglit_util.cmake
index 78a09199..68c72888 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)