Giter VIP home page Giter VIP logo

Comments (6)

gavanderhoorn avatar gavanderhoorn commented on July 26, 2024 1

CMAKE_COMMAND is also mentioned in the colcon usage output:

colcon --help
usage: colcon [-h] [--log-base LOG_BASE] [--log-level LOG_LEVEL]
              {build,extension-points,extensions,graph,info,list,metadata,mixin,test,test-result,version-check} ...

options:
...

colcon verbs:
...

Environment variables:
  CMAKE_COMMAND         The full path to the CMake executable
  ...

The documentation suggests placing the directory with your preferred CMake binary on the %PATH% before any other should also work.

from rosonwindows.

anion0278 avatar anion0278 commented on July 26, 2024

I guess I have found a solution, though it was so close that I should have checked it before :/ .
Looking at C:/opt/ros/foxy/x64/Lib/site-packages/colcon_cmake/task/cmake/__init__.py pointed me in the right direction.

"""Environment variable to override the CMake executable"""
CMAKE_COMMAND_ENVIRONMENT_VARIABLE = EnvironmentVariable(
    'CMAKE_COMMAND', 'The full path to the CMake executable')

So by setting env var CMAKE_COMMAND I could change the path to CMake executable:

set CMAKE_COMMAND=C:/Program Files/CMake/bin/cmake.exe

colcon now succesfully builds my Cpp packages.
At least I hope this information might be of use to someone else :) .
(I guess its partially related to #356 )

I wonder if it is possible to update the build configuration to incorporate a newer version of CMake into Foxy distribution?

from rosonwindows.

anion0278 avatar anion0278 commented on July 26, 2024

🤦 I should have read this more carefully :D . thanks!
However, I wonder if it is possible to update the build configuration to incorporate a newer version of CMake into Foxy distribution so that it works out of the box for everyone?

from rosonwindows.

ooeygui avatar ooeygui commented on July 26, 2024

@anion0278 ROS on Windows has a toolchain affinity, instead of ROS on Linux which has a distro affinity. Our binaries are compiled with the default toolchain for Visual Studio 2019, so it is required to be installed to build nodes for Noetic and Foxy. We can't change the toolchain for foxy; otherwise we would break existing deployments.

With Humble, we are moving to VS2022. Both can be installed in parallel.

from rosonwindows.

ooeygui avatar ooeygui commented on July 26, 2024

Wrong button. Leaving open for consideration since installing VS2019 is getting difficult.

from rosonwindows.

anion0278 avatar anion0278 commented on July 26, 2024

I'd like to mention that if anyone intends to utilize the VS 22 compiler with a newer version of CMake, it's crucial to select versions prior to 3.24. Specifically, I would recommend using version 3.23.3 (refer to the related issue: dusty-nv/jetson-containers#181 (comment)). The newer versions of CMake introduce ament-related issues when building Turtlebot3 from source (Failed to find exported target names). Alternatively, it seems to be possible to apply a fix for ament: moveit/moveit2#1570 (comment).
To avoid confusion, I have edited CMake version in my initial message.

from rosonwindows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.