Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed list mangling #80

Merged
merged 5 commits into from
Sep 14, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ matrix:
- language: cpp
os: osx
env: DEPLOY=false
osx_image: xcode8
osx_image: xcode10

before_install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
Expand Down
12 changes: 6 additions & 6 deletions clang_build/io_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def get_sources_and_headers(target_options, target_root_directory, target_build_
if 'linux' in target_options and _platform.PLATFORM == 'linux':
exclude_options += target_options['linux'].get('headers_exclude', [])

include_patterns = list(set([target_root_directory.joinpath(path) for path in include_options]))
exclude_patterns = list(set([target_root_directory.joinpath(path) for path in exclude_options]))
include_patterns = list(set(target_root_directory.joinpath(path) for path in include_options))
exclude_patterns = list(set(target_root_directory.joinpath(path) for path in exclude_options))

# Find header files
if include_patterns:
Expand Down Expand Up @@ -77,8 +77,8 @@ def get_sources_and_headers(target_options, target_root_directory, target_build_
if 'linux' in target_options and _platform.PLATFORM == 'linux':
exclude_options += target_options['linux'].get('headers_exclude', [])

include_patterns = list(set([target_root_directory.joinpath(path) for path in include_options_public]))
exclude_patterns = list(set([target_root_directory.joinpath(path) for path in exclude_options]))
include_patterns = list(set(target_root_directory.joinpath(path) for path in include_options_public))
exclude_patterns = list(set(target_root_directory.joinpath(path) for path in exclude_options))

# Find header files
if include_patterns:
Expand Down Expand Up @@ -109,8 +109,8 @@ def get_sources_and_headers(target_options, target_root_directory, target_build_
if 'linux' in target_options and _platform.PLATFORM == 'linux':
exclude_options += target_options['linux'].get('sources_exclude', [])

sources_patterns = list(set([target_root_directory.joinpath(path) for path in sources_options]))
exclude_patterns = list(set([target_root_directory.joinpath(path) for path in exclude_options]))
sources_patterns = list(set(target_root_directory.joinpath(path) for path in sources_options))
exclude_patterns = list(set(target_root_directory.joinpath(path) for path in exclude_options))

# Find source files from patterns
if sources_patterns:
Expand Down
6 changes: 3 additions & 3 deletions clang_build/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,13 @@ def __init__(self, config, environment, multiple_projects, is_root_project, pare
_LOGGER.info(f'Only building targets [{"], [".join(environment.target_list)}] out of base set of targets [{"], [".join(base_set)}].')
for target in self.targets_config:
if target not in environment.target_list:
base_set -= {target}
base_set.remove(target)

# Descendants will be retained, too
self.target_dont_build_list = set(dependency_graph.nodes())
for root_name in base_set:
root_identifier = f'{self.identifier}.{root_name}' if self.identifier else root_name
self.target_dont_build_list -= {root_identifier}
self.target_dont_build_list.remove(root_identifier)
self.target_dont_build_list -= _nx.algorithms.dag.descendants(dependency_graph, root_identifier)
self.target_dont_build_list = list(self.target_dont_build_list)

Expand All @@ -186,7 +186,7 @@ def __init__(self, config, environment, multiple_projects, is_root_project, pare

elif is_root_project:
_LOGGER.info(f'Building all targets!')
base_set = set({})
base_set = set()

# Create a dotfile of the dependency graph
if is_root_project and environment.create_dependency_dotfile:
Expand Down
6 changes: 3 additions & 3 deletions clang_build/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ def __init__(self,
# Public include directories are forwarded
self.include_directories_public += target.include_directories_public

self.include_directories = list(set([dir.resolve() for dir in self.include_directories]))
self.headers = list(set(self.headers))
self.include_directories = list(dict.fromkeys(dir.resolve() for dir in self.include_directories))
GPMueller marked this conversation as resolved.
Show resolved Hide resolved
self.headers = list(dict.fromkeys(self.headers))

# C language family dialect
if 'properties' in options and 'cpp_version' in options['properties']:
Expand Down Expand Up @@ -145,7 +145,7 @@ def __init__(self,
self.compile_flags += target.compile_flags_public
self.link_flags += target.link_flags_public

self.compile_flags = list(set(self.compile_flags))
self.compile_flags = list(dict.fromkeys(self.compile_flags))

# Interface flags
cf, lf = self.parse_flags_options(options, 'interface-flags')
Expand Down