-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: generalize handling of "clean" actions, add manual "distclean"…
… target wire up remaining clean actions for targets defined in BuildTargets.csproj
- Loading branch information
Showing
12 changed files
with
175 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
set(REKO_SRC ${CMAKE_CURRENT_LIST_DIR}) | ||
list(INSERT CMAKE_MODULE_PATH 0 "${REKO_SRC}/../cmake") | ||
include(FindDotNet) | ||
|
||
macro(rmrf path) | ||
message("=> rm -r ${path}") | ||
file(REMOVE_RECURSE "${path}") | ||
endmacro() | ||
|
||
execute_process( | ||
COMMAND ${DOTNET_EXE} clean | ||
COMMAND_ERROR_IS_FATAL ANY | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} | ||
) | ||
|
||
file(GLOB_RECURSE CANDIDATES | ||
LIST_DIRECTORIES TRUE | ||
${REKO_SRC}/**/bin | ||
${REKO_SRC}/**/obj | ||
) | ||
|
||
foreach(p IN LISTS CANDIDATES) | ||
if(NOT IS_DIRECTORY "${p}" | ||
OR NOT p MATCHES "/(bin|obj)$") | ||
continue() | ||
endif() | ||
rmrf("${p}") | ||
endforeach() | ||
|
||
set(REKO_CMAKE_BUILD_TARGETS ${REKO_SRC}/BuildTargets/build) | ||
|
||
if(IS_DIRECTORY ${REKO_CMAKE_BUILD_TARGETS}) | ||
rmrf(${REKO_CMAKE_BUILD_TARGETS}) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters