-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathCMakeLists.patch
26 lines (25 loc) · 1.02 KB
/
CMakeLists.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff --git a/scratch/CMakeLists.txt b/scratch/CMakeLists.txt
index adeeb2cf8..6e23f81b6 100644
--- a/scratch/CMakeLists.txt
+++ b/scratch/CMakeLists.txt
@@ -58,6 +58,11 @@ function(create_scratch source_files)
set(target_prefix scratch${scratch_dirname}_)
endif()
+ # Link our scratches against the helper files
+ get_filename_component(scratch_dirname ${scratch_src} DIRECTORY)
+ file(GLOB helper_files CONFIGURE_DEPENDS ${scratch_dirname}/../helper/*)
+ list(APPEND source_files ${helper_files})
+
# Get source absolute path and transform into relative path
get_filename_component(scratch_src ${scratch_src} ABSOLUTE)
get_filename_component(scratch_absolute_directory ${scratch_src} DIRECTORY)
@@ -88,7 +93,8 @@ file(
)
# Filter out files
foreach(entry ${scratch_subdirectories})
- if(NOT (IS_DIRECTORY ${entry}))
+ # Don't treat our helper directory as a scratch
+ if(NOT (IS_DIRECTORY ${entry}) OR ${entry} MATCHES ".*/helper")
list(REMOVE_ITEM scratch_subdirectories ${entry})
endif()
endforeach()