aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2012-02-21 13:08:06 -0800
committerPaul Berry <stereotype441@gmail.com>2012-03-23 13:36:35 -0700
commit1416f985ed2d46e830fa91e94a0e5c156c4112af (patch)
treee1598195414da8b14485bc1af2a808bc3693c633
parente505634142085823cc97801929a8262f990dea1b (diff)
downloadpiglit-1416f985ed2d46e830fa91e94a0e5c156c4112af.tar.gz
cmake: Define wrapper functions piglit_add_{executable,library}
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@linux.intel.com>
-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)