ros2 / domain_bridge

Bridge communication across different ROS 2 domains.
Apache License 2.0
52 stars 12 forks source link

Branch name change for Cmake command ```ExternalProject_Add``` #77

Open harunkurtdev opened 1 year ago

harunkurtdev commented 1 year ago

I want use ExternalProject_Add command for automatic download and build for my_project.

But default branch name main , can you change with master.

if you not change branch name cmake not support $GIT_BRANCH (I don't know ) command just $GIT_TAG

domain_bridge indiriliyor...
Cloning into 'domain_bridge_lib'...
fatal: invalid reference: master
CMake Error at /home/harun/titra_work/task1_domain2domain/domain2domain/build/doman2domain/domain_bridge_lib-prefix/tmp/domain_bridge_lib-gitclone.cmake:40 (message):
  Failed to checkout tag: 'master'

gmake[2]: *** [CMakeFiles/domain_bridge_lib.dir/build.make:98: domain_bridge_lib-prefix/src/domain_bridge_lib-stamp/domain_bridge_lib-download] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:105: CMakeFiles/domain_bridge_lib.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
cmake_minimum_required(VERSION 3.8)
include(FetchContent)
include(ExternalProject)

project(
        my_project
        VERSION 1.0
        DESCRIPTION "my_project"
)

message("domain_bridge indiriliyor...")

ExternalProject_Add(
    domain_bridge_lib
    GIT_REPOSITORY https://github.com/ros2/domain_bridge.git
    GIT_TAG 0.5.0
    BUILD_COMMAND $(MAKE) domain_bridge
    STEP_TARGETS build
)