diff options
author | Chad Versace <chad.versace@linux.intel.com> | 2012-02-21 13:08:06 -0800 |
---|---|---|
committer | Paul Berry <stereotype441@gmail.com> | 2012-03-23 13:36:35 -0700 |
commit | 1416f985ed2d46e830fa91e94a0e5c156c4112af (patch) | |
tree | e1598195414da8b14485bc1af2a808bc3693c633 /cmake/piglit_util.cmake | |
parent | e505634142085823cc97801929a8262f990dea1b (diff) |
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>
Diffstat (limited to 'cmake/piglit_util.cmake')
-rw-r--r-- | 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 78a091996..68c728887 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) |