File: WorkboxRemoveOldFiles.cmake

package info (click to toggle)
warzone2100 4.6.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 660,320 kB
  • sloc: cpp: 676,209; ansic: 391,201; javascript: 78,238; python: 16,632; php: 4,294; sh: 4,094; makefile: 2,629; lisp: 1,492; cs: 489; xml: 404; perl: 224; ruby: 156; java: 89
file content (19 lines) | stat: -rw-r--r-- 654 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
cmake_minimum_required(VERSION 3.16...3.31)

# Remove the files that workbox-cli generates as output from the current/working directory
# - service-worker.js
# - service-worker.js.map
# - workbox-*.js
# - workbox-*.js.map

file(GLOB WORKBOX_GENERATED_FILES LIST_DIRECTORIES false
	"${CMAKE_CURRENT_SOURCE_DIR}/service-worker.js"
	"${CMAKE_CURRENT_SOURCE_DIR}/service-worker.js.map"
	"${CMAKE_CURRENT_SOURCE_DIR}/workbox-*.js"
	"${CMAKE_CURRENT_SOURCE_DIR}/workbox-*.js.map"
)

foreach(_file IN LISTS WORKBOX_GENERATED_FILES)
	execute_process(COMMAND ${CMAKE_COMMAND} -E echo "Removing old generated file: ${_file}")
	file(REMOVE "${_file}")
endforeach()