Skip to content

Commit

Permalink
Fix (another) TypeError when CMAKE_GENERATOR isn't present (#143)
Browse files Browse the repository at this point in the history
Follow-up to 6c4985b
Follow-up to 82bed70
  • Loading branch information
cottsay authored Nov 22, 2024
1 parent 8a69a89 commit 448bef9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions colcon_cmake/task/cmake/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,11 @@ def get_buildfile(cmake_cache):
"""
generator = get_variable_from_cmake_cache(
str(cmake_cache.parent), 'CMAKE_GENERATOR')
if generator and 'Ninja' in generator:
return cmake_cache.parent / 'build.ninja'
if 'Visual Studio' in generator:
return cmake_cache.parent / 'ALL_BUILD.vcxproj'
if generator is not None:
if 'Ninja' in generator:
return cmake_cache.parent / 'build.ninja'
if 'Visual Studio' in generator:
return cmake_cache.parent / 'ALL_BUILD.vcxproj'
return cmake_cache.parent / 'Makefile'


Expand Down

0 comments on commit 448bef9

Please sign in to comment.