19
19
# in the host system or cross compiling sysroot.
20
20
#
21
21
# By default dependencies are first sought in bundled source code, and if not
22
- # found from the system libraries. This default behaviour can be controlled by
22
+ # found from the system libraries. This default behaviour can be controlled by
23
23
# several options
24
24
#
25
25
# EXCLUDE - can be used to disable searching in a particular location. Valid
40
40
# create an interface target which can be used to link in to any other target.
41
41
#
42
42
# The options "SYSTEM_HEADER_FILE" and "SYSTEM_LIB_NAMES" will be passed verbatim
43
- # to the cmake functions find_header() and find_library() to search all the
43
+ # to the cmake functions find_header() and find_library() to search all the
44
44
# correct system locations.
45
45
#
46
46
# When using bundled source code the function will search several default locations
47
47
# under '${CMAKE_CURRENT_SOURCE_DIR}/third_party' based on the package and target
48
48
# names. The search location can be controlled by the "SOURCE_DIR" parameter
49
49
#
50
- # The target name can be controlled by the option "TARGET". When using
50
+ # The target name can be controlled by the option "TARGET". When using
51
51
# bundled source code this is used to verify the target was created properly
52
52
# after calling add_subdirectory. If the add_subdirectory exposes a number of
53
53
# other targets, you can use the "ADDITIONAL_TARGETS" option to list them, this
@@ -86,7 +86,7 @@ function(search_dependency_source)
86
86
message (STATUS "Found ${x_TARGET} source code in ${P} " )
87
87
# Function arguments are automatically parsed out in to numbered variables
88
88
# ARG#, and a complete argument list is stored in ARGN. Variables are passed
89
- # down the function call stack until they are overwritten. This allows a
89
+ # down the function call stack until they are overwritten. This allows a
90
90
# badly written function to test for the existance of an optional variable
91
91
# in it's own argument list but actually pick up a variable for a function
92
92
# much higher up the call stack.
@@ -100,12 +100,12 @@ function(search_dependency_source)
100
100
# here.
101
101
#
102
102
# This is a very ugly way of mitigating the error. We manually unset all
103
- # the cmake variable related to function arguments immediately before
103
+ # the cmake variable related to function arguments immediately before
104
104
# including the dependency project. This will make it APPEAR as though
105
105
# add_subdirectory was called from outside a function or macro.
106
106
#
107
107
# Note the limitation, argument lists are apparently unlimited, we are only
108
- # unsetting the first 100 argument variables. This will probably be enough
108
+ # unsetting the first 100 argument variables. This will probably be enough
109
109
# as I haven't seen functions taking that many arguments, but it certainly
110
110
# isn't bulletproof. Cmake doesn't appear to have any functionality which
111
111
# could be used to achieve this so we are left with few, if any, other options.
@@ -119,7 +119,7 @@ function(search_dependency_source)
119
119
#
120
120
# Additionally, cmake variable are only propogated down the stack, not up
121
121
# (unless PARENT_SCOPE is used in set()) so by unsetting variables here we
122
- # won't affect whatever function called us, or anything even higher up
122
+ # won't affect whatever function called us, or anything even higher up
123
123
# the call stack.
124
124
foreach (i RANGE 0 100 )
125
125
unset (ARGV${i} )
@@ -134,11 +134,11 @@ function(search_dependency_source)
134
134
OUTPUT_STRIP_TRAILING_WHITESPACE
135
135
)
136
136
file (WRITE ${CMAKE_BINARY_DIR} /submodule-checks/${x_TARGET}.used "${GIT_COMMIT} ${P} \n " )
137
-
137
+
138
138
if (NOT TARGET ${x_TARGET} )
139
139
message (WARNING "Source code in ${P} did not declare target ${x_TARGET} as was expected" )
140
140
endif ()
141
-
141
+
142
142
# This is very ugly, but required for some python modules, it will not last beyond this temporary solution
143
143
if (EXISTS "${P} /include" )
144
144
set (x_${x_TARGET}_IncludeDir "${P} /include" CACHE PATH "Path to ${x_TARGET} bundled source code header files" )
@@ -188,7 +188,7 @@ endfunction()
188
188
# This macro will return(), ie cause the caller to return, if there are no available locations.
189
189
# It will raise a fatal error if unknown values are specified for any of the input parameters.
190
190
#
191
- # Inputs:
191
+ # Inputs:
192
192
# - x_PREFER - Parameter to GenericFindDependency, preferred location as defined by the project
193
193
# - SWIFT_PREFERRED_DEPENDENCY_SOURCE - Global user preference, defined on the command line
194
194
# - x_EXCLUDE - List of sources to exclude from consideration
@@ -355,7 +355,7 @@ function(GenericFindDependency)
355
355
TARGET "${x_TARGET} "
356
356
SOURCE_SEARCH_PATHS "${x_SOURCE_SEARCH_PATHS} "
357
357
)
358
-
358
+
359
359
# If the expected target was created we have succeeded
360
360
if (TARGET ${x_TARGET} )
361
361
message (STATUS "Using dependency ${x_TARGET} from bundled source code" )
@@ -407,4 +407,3 @@ function(GenericFindDependency)
407
407
endif ()
408
408
endforeach ()
409
409
endfunction ()
410
-
0 commit comments