When trying to build a cmake package with cmake 3.14 and Visual Studio 2019, I see the following error:
Traceback (most recent call last):
File "c:\users\scpet\desktop\ws\py_colcon_venv\lib\site-packages\colcon_core\executor\__init__.py", line 91, in __call__
rc = await self.task(*args, **kwargs)
File "c:\users\scpet\desktop\ws\py_colcon_venv\lib\site-packages\colcon_core\task\__init__.py", line 92, in __call__
return await task_method(*args, **kwargs)
File "c:\users\scpet\desktop\ws\py_colcon_venv\lib\site-packages\colcon_cmake\task\cmake\build.py", line 85, in build
rc = await self._reconfigure(args, env)
File "c:\users\scpet\desktop\ws\py_colcon_venv\lib\site-packages\colcon_cmake\task\cmake\build.py", line 160, in _reconfigure
.format_map(locals()))
RuntimeError: Unknown / unsupported VS version ''
I've added an entry for Visual Studio 2019 into cmake/build.py, but the format is different than previous versions due to changes discussed in the cmake 3.14 release notes:
The VS 2019 generator differs from generators for earlier versions in that it does not provide variants that specify the target platform in the generator name. Instead CMAKE_GENERATOR_PLATFORM must be used, e.g. through the -A command-line option. Furthermore, the default target platform (architecture) is now based on the host platform. The VS host toolset selection is now based on the host architecture as well.
So I've simply removed the architecture from the string, and it worked in my subsequent testing.
When trying to build a cmake package with cmake 3.14 and Visual Studio 2019, I see the following error:
I've added an entry for Visual Studio 2019 into
cmake/build.py
, but the format is different than previous versions due to changes discussed in the cmake 3.14 release notes:So I've simply removed the architecture from the string, and it worked in my subsequent testing.