[cmake-developers] Feature request: file globbing in ADDITIONAL_MAKE_CLEAN_FILES
CHEVRIER, Marc
marc.chevrier at sap.com
Fri Sep 2 03:13:41 EDT 2016
A more generic approach for cleanup actions is to add a new property which enables to specify a cmake script. And, in the script, everyone is free to do what he wants…
Example: set_directory_properties (PROPERTIES ADDITIONAL_MAKE_CLEAN_SCRIPT "my_clean_script.cmake")
From: cmake-developers <cmake-developers-bounces at cmake.org> on behalf of Steve Lorimer <steve.lorimer at gmail.com>
Date: Friday 2 September 2016 at 01:32
To: "cmake-developers at cmake.org" <cmake-developers at cmake.org>
Subject: [cmake-developers] Feature request: file globbing in ADDITIONAL_MAKE_CLEAN_FILES
As part of our build process we tag certain binary files with version information such as git branch, number of commits, build variant etc.
Eg, for a binary called "app" we could install a file in the local source directory with the name "app.branch_foo.91.debug"
The shell globbing pattern that matches is "app.*[0-9]*"
I need a globbing pattern because the tag can change without the makefiles changing, so the tag can't be hardcoded into the makefile.
If I specify a globbing pattern for ADDITIONAL_MAKE_CLEAN_FILES it specifies this as an actual file
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES app.*[0-9]*)
This results in
file(REMOVE_RECURSE
"../../../app/app.*[0-9]*"
...
)
That doesn't work, because it's not a real file, it's a globbing pattern
I've tried adding a nested file(GLOB ...) into the set_directory_properties but that doesn't work either.
Is this a feature worthy of addition?
- the ability to specify a globbing pattern in set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ...)?
- the ability to specify a globbing pattern in file(REMOVE_RECURSE ...)?
TIA
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160902/9a472edd/attachment.html>
More information about the cmake-developers
mailing list