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

Specify buildfile for Visual Studio generator #114

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

Ace314159
Copy link
Contributor

This specifies a buildfile for the Visual Studio generator, so cmake will not always reconfigure.

Fixes #111

Copy link
Member

@cottsay cottsay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not certain that this will work 100% of the time when a Visual Studio generator is used, but this certainly addresses the most common case and will do no harm otherwise.

Thanks!

@cottsay cottsay merged commit 82bed70 into colcon:master Oct 4, 2023
@cottsay cottsay added this to the 0.2.28 milestone Oct 4, 2023
@FelixPe
Copy link

FelixPe commented Aug 26, 2024

@cottsay Shouldn't there be a check, if generator is not None as well, as for Ninja?

I ran into:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/colcon_core/executor/__init__.py", line 91, in __call__
    rc = await self.task(*args, **kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/colcon_core/task/__init__.py", line 93, in __call__
    return await task_method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/colcon_ros/task/ament_cmake/build.py", line 59, in build
    rc = await extension.build(
         ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/colcon_cmake/task/cmake/build.py", line 87, in build
    rc = await self._reconfigure(args, env)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/colcon_cmake/task/cmake/build.py", line 133, in _reconfigure
    buildfile = get_buildfile(cmake_cache)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/colcon_cmake/task/cmake/__init__.py", line 114, in get_buildfile
    if 'Visual Studio' in generator:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Repetitive restart of cmake configuration for Visual Studio generator
3 participants