diff options
author | Michael Wild <themiwi@users.sourceforge.net> | 2010-02-26 14:35:26 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2010-03-17 15:32:14 (GMT) |
commit | beda5eab398ad117e2fe17cbbca1e65843abc74d (patch) | |
tree | 2f06d884d16705557fde7f955f5c914a0d95ceb4 /Modules/GetPrerequisites.cmake | |
parent | b41647ca8fd5220c0d20f757f3db8c0c493b4d2e (diff) | |
download | CMake-beda5eab398ad117e2fe17cbbca1e65843abc74d.zip CMake-beda5eab398ad117e2fe17cbbca1e65843abc74d.tar.gz CMake-beda5eab398ad117e2fe17cbbca1e65843abc74d.tar.bz2 |
ENH: Hook in GetPrerequisites to override item type
The hook is called gp_resolved_file_type_override.
Signed-off-by: Michael Wild <themiwi@users.sourceforge.net>
Diffstat (limited to 'Modules/GetPrerequisites.cmake')
-rw-r--r-- | Modules/GetPrerequisites.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake index 123b433..24cee55 100644 --- a/Modules/GetPrerequisites.cmake +++ b/Modules/GetPrerequisites.cmake @@ -16,6 +16,7 @@ # gp_resolve_item # (projects can override with gp_resolve_item_override) # gp_resolved_file_type +# (projects can override with gp_resolved_file_type_override) # gp_file_type # get_prerequisites # list_prerequisites @@ -345,6 +346,9 @@ endfunction(gp_resolve_item) # embedded # other # +# Override on a per-project basis by providing a project-specific +# gp_resolved_file_type_override function. +# function(gp_resolved_file_type original_file file exepath dirs type_var) #message(STATUS "**") @@ -428,6 +432,13 @@ function(gp_resolved_file_type original_file file exepath dirs type_var) endif() endif() + # Provide a hook so that projects can override the decision on whether a + # library belongs to the system or not by whatever logic they choose: + # + if(COMMAND gp_resolved_file_type_override) + gp_resolved_file_type_override("${resolved_file}" type) + endif() + set(${type_var} "${type}" PARENT_SCOPE) #message(STATUS "**") |