Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MartinBinder
ogs
Commits
903e318b
Commit
903e318b
authored
13 years ago
by
Lars Bilke
Browse files
Options
Downloads
Patches
Plain Diff
Added missing cmake module.
parent
6773a13f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CleanDirectoryList.cmake
+48
-0
48 additions, 0 deletions
CleanDirectoryList.cmake
with
48 additions
and
0 deletions
CleanDirectoryList.cmake
0 → 100644
+
48
−
0
View file @
903e318b
# - Removes duplicate entries and non-directories from a provided list
#
# clean_directory_list(<listvar> [<additional list items>...])
#
# Requires CMake 2.6 or newer (uses the 'function' command)
#
# Original Author:
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2009-2010.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
if
(
__clean_directory_list
)
return
()
endif
()
set
(
__clean_directory_list YES
)
function
(
clean_directory_list _var
)
# combine variable's current value with additional list items
set
(
_in
${${
_var
}}
${
ARGN
}
)
if
(
_in
)
# Initial list cleaning
list
(
REMOVE_DUPLICATES _in
)
# Grab the absolute path of each actual directory
set
(
_out
)
foreach
(
_dir
${
_in
}
)
if
(
IS_DIRECTORY
"
${
_dir
}
"
)
get_filename_component
(
_dir
"
${
_dir
}
"
ABSOLUTE
)
file
(
TO_CMAKE_PATH
"
${
_dir
}
"
_dir
)
list
(
APPEND _out
"
${
_dir
}
"
)
endif
()
endforeach
()
if
(
_out
)
# Clean up the output list now
list
(
REMOVE_DUPLICATES _out
)
endif
()
# return _out
set
(
${
_var
}
"
${
_out
}
"
PARENT_SCOPE
)
endif
()
endfunction
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment