Skip to content

Commit

Permalink
Add support for Ninja Multi-Config (#106)
Browse files Browse the repository at this point in the history
- Add `Ninja Multi-Config` generator as a match for a `Ninja` generator
- Add `Ninja Multi-Config` to the set of generators where `is_multi_configuration_generator()` is `True`
- Fix a 'Ninja' generator check to be multi-config compatible.
  • Loading branch information
KazNX authored Sep 13, 2021
1 parent 6875f1d commit 9607ee8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion colcon_cmake/task/cmake/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def get_buildfile(cmake_cache):
"""
generator = get_variable_from_cmake_cache(
str(cmake_cache.parent), 'CMAKE_GENERATOR')
if generator == 'Ninja':
if 'Ninja' in generator:
return cmake_cache.parent / 'build.ninja'
return cmake_cache.parent / 'Makefile'

Expand Down Expand Up @@ -148,6 +148,7 @@ def is_multi_configuration_generator(path, cmake_args=None):
:rtype: bool
"""
known_multi_configuration_generators = (
'Ninja Multi-Config',
'Visual Studio',
'Xcode',
)
Expand Down

0 comments on commit 9607ee8

Please sign in to comment.