Class: XcodeArchiveCache::Injection::BuildFlagsChanger
- Inherits:
-
Object
- Object
- XcodeArchiveCache::Injection::BuildFlagsChanger
show all
- Includes:
- Logs
- Defined in:
- lib/injection/build_flags_changer.rb
Instance Method Summary
collapse
-
#add_capital_i_path(build_configuration, path) ⇒ Object
-
#add_framework_headers_iquote(build_configuration, artifact_location, node) ⇒ Object
-
#add_framework_linker_flag(build_configuration, node) ⇒ Object
-
#add_headers_search_path(build_configuration, path) ⇒ Object
-
#add_iquote_path(build_configuration, path) ⇒ Object
-
#add_static_lib_libtool_flag(build_configuration, node) ⇒ Object
-
#add_static_lib_linker_flag(build_configuration, node) ⇒ Object
-
#add_swift_include_path(build_configuration, path) ⇒ Object
-
#fix_module_map_path(build_configuration, old_modulemap_names, path) ⇒ Object
-
#replace_or_add_framework_search_path(build_configuration, target_name, path) ⇒ Object
-
#replace_or_add_library_search_path(build_configuration, target_name, path) ⇒ Object
Methods included from Logs
#debug, #error, #info, #set_log_level
Instance Method Details
#add_capital_i_path(build_configuration, path) ⇒ Object
93
94
95
96
|
# File 'lib/injection/build_flags_changer.rb', line 93
def add_capital_i_path(build_configuration, path)
debug("using -I path #{path}")
add_cflag(build_configuration, path_to_capital_i(path))
end
|
60
61
62
63
64
|
# File 'lib/injection/build_flags_changer.rb', line 60
def (build_configuration, artifact_location, node)
= (artifact_location, node)
debug("using -iquote path #{}")
add_cflag(build_configuration, )
end
|
#add_framework_linker_flag(build_configuration, node) ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/injection/build_flags_changer.rb', line 18
def add_framework_linker_flag(build_configuration, node)
linker_flag = get_framework_linker_flag(node)
if linker_flag
debug("using linker flag #{linker_flag}")
add_linker_flag(build_configuration, linker_flag)
end
end
|
77
78
79
80
|
# File 'lib/injection/build_flags_changer.rb', line 77
def (build_configuration, path)
debug("using headers search path #{path}")
add_flag_to_configuration(build_configuration, HEADER_SEARCH_PATHS_KEY, path)
end
|
#add_iquote_path(build_configuration, path) ⇒ Object
85
86
87
88
|
# File 'lib/injection/build_flags_changer.rb', line 85
def add_iquote_path(build_configuration, path)
debug("using -iquote path #{path}")
add_cflag(build_configuration, path_to_iquote(path))
end
|
40
41
42
43
44
45
46
|
# File 'lib/injection/build_flags_changer.rb', line 40
def add_static_lib_libtool_flag(build_configuration, node)
flag = get_linker_flag(node)
if flag
debug("using libtool flag #{flag}")
add_libtool_flag(build_configuration, flag)
end
end
|
#add_static_lib_linker_flag(build_configuration, node) ⇒ Object
29
30
31
32
33
34
35
|
# File 'lib/injection/build_flags_changer.rb', line 29
def add_static_lib_linker_flag(build_configuration, node)
flag = get_linker_flag(node)
if flag
debug("using ld flag #{flag}")
add_linker_flag(build_configuration, flag)
end
end
|
#add_swift_include_path(build_configuration, path) ⇒ Object
51
52
53
54
|
# File 'lib/injection/build_flags_changer.rb', line 51
def add_swift_include_path(build_configuration, path)
debug("adding #{path} to SWIFT_INCLUDE_PATHS")
add_flag_to_configuration(build_configuration, SWIFT_INCLUDE_PATHS_KEY, path_to_search_path(path))
end
|
#fix_module_map_path(build_configuration, old_modulemap_names, path) ⇒ Object
102
103
104
105
106
107
|
# File 'lib/injection/build_flags_changer.rb', line 102
def fix_module_map_path(build_configuration, old_modulemap_names, path)
debug("using #{path}")
settings_with_modulemaps = [OTHER_CFLAGS_KEY, OTHER_CPLUSPLUSFLAGS_KEY, OTHER_SWIFT_FLAGS_KEY]
replace_or_add_flag(build_configuration, settings_with_modulemaps, MODULE_MAP_FLAG, old_modulemap_names, path_to_search_path(path), false)
end
|
#replace_or_add_framework_search_path(build_configuration, target_name, path) ⇒ Object
10
11
12
13
|
# File 'lib/injection/build_flags_changer.rb', line 10
def replace_or_add_framework_search_path(build_configuration, target_name, path)
debug("using framework search path #{path}")
replace_or_add_flag(build_configuration, [FRAMEWORK_SEARCH_PATHS_KEY], nil, [target_name], path_to_search_path(path), true)
end
|
#replace_or_add_library_search_path(build_configuration, target_name, path) ⇒ Object
69
70
71
72
|
# File 'lib/injection/build_flags_changer.rb', line 69
def replace_or_add_library_search_path(build_configuration, target_name, path)
debug("using library search path #{path}")
replace_or_add_flag(build_configuration, [LIBRARY_SEARCH_PATHS_KEY], nil, [target_name], path_to_search_path(path), true)
end
|