Commit 188bfc14 authored by Arnaud Le Meillour's avatar Arnaud Le Meillour
Browse files

update CI/CD files

parent 22df9b09
Pipeline #75943 passed with stage
in 53 seconds
......@@ -7,9 +7,6 @@ include(init-project)
###############################################################################
# External Tango Classes needed by this project
#getTangoClass()
# Local Tango Classes build in this project
addTangoClasses(Serial)
......
......@@ -4,7 +4,7 @@ set(TC_EXPORT ${PROJECT_NAME}_lib-export)
# Target declaration
add_library(${TC_TARGET})
msg(DEBUG "Define Library target ${TC_TARGET}")
msg(STATUS "Define Library target ${TC_TARGET}")
###############################################################################
......@@ -41,8 +41,8 @@ configTangoClass()
addDependencies(${TC_DEPENDENCIES})
# Get header files
getFiles(TC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/include "*.h")
getFiles(TC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/include "*.hpp")
getFiles(TC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/include "*.h")
target_sources(${TC_TARGET}
PRIVATE
......@@ -51,27 +51,27 @@ target_sources(${TC_TARGET}
${CMAKE_CURRENT_SOURCE_DIR}/src/${PROJECT_NAME}StateMachine.cpp
)
# Add Version file
# configure_file(
# "${TC_TEMPLATE_DIR}/VersionConfig.h.in"
# "${CMAKE_CURRENT_BINARY_DIR}/VersionConfig.h"
# )
# target_sources(${TC_TARGET}
# PRIVATE
# ${CMAKE_CURRENT_BINARY_DIR}/VersionConfig.h
# )
target_link_libraries(${TC_TARGET}
PRIVATE
${TC_TANGO_LIB}
Tango_lib-target
PUBLIC
${TC_TANGO_CLASSES_TARGET}
#${TC_TANGO_CLASSES}
)
target_link_directories(${TC_TARGET}
PRIVATE
${TC_TANGO_LIB_DIR}
#PUBLIC
# ${TC_TANGO_CLASSES_DIR}
)
target_include_directories(${TC_TARGET}
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
${TC_TANGO_LIB_INCLUDE_DIR}
PUBLIC
#${TC_TANGO_CLASSES_INCLUDE_DIR}
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>"
)
......@@ -108,7 +108,7 @@ install(TARGETS ${TC_TARGET}
)
configure_package_config_file(
${TC_LIB_CONFIG_TEMPLATE}
"${TC_TEMPLATE_DIR}/Config.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_CMAKEDIR}
)
......
......@@ -44,21 +44,12 @@ target_sources(${TC_TARGET}
target_link_libraries(${TC_TARGET}
PRIVATE
${TC_TANGO_LIB}
${TC_TANGO_CLASSES}
Tango_lib-target
${TC_TANGO_CLASSES_TARGET}
)
target_link_directories(${TC_TARGET}
PRIVATE
${TC_TANGO_LIB_DIR}
${TC_TANGO_CLASSES_DIR}
)
target_include_directories(${TC_TARGET}
PRIVATE
${TC_TANGO_LIB_INCLUDE_DIR}
${TC_TANGO_CLASSES_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/src
)
......
......@@ -5,9 +5,10 @@ msg(DEBUG "\n")
set(_TC_LOG_PREFIX ${TC_LOG_PREFIX})
set(TC_LOG_PREFIX "DEBUG")
msg(DEBUG "===DEBUG===DEBUG===DEBUG===DEBUG===DEBUG===DEBUG===DEBUG===")
msg(DEBUG "## DEBUG ####################################################### DEBUG ##")
msg(DEBUG "")
msg(DEBUG "# CMAKE VARIABLE #####################################################")
# CMAKE VARIABLE #####################################################
printDebug(CMAKE_ROOT)
......@@ -172,8 +173,8 @@ printDebug(UNIX)
printDebug(WIN32)
printDebug(WINCE)
msg(DEBUG "# GIT VARIABLE #####################################################")
# GIT VARIABLE #####################################################
printDebug(VERSION_MAJOR)
printDebug(VERSION_MINOR)
......@@ -198,8 +199,8 @@ printDebug(CI_COMMIT_SHA)
printDebug(CI_COMMIT_SHORT_SHA)
msg(DEBUG "# LOCAL VARIABLE #####################################################")
# LOCAL VARIABLE #####################################################
printDebug(REPO_DOCKER_IMG)
printDebug(REPO_FS)
......@@ -210,6 +211,9 @@ printDebug(ZMQ_VERSION)
printDebug(OMNIORB_VERSION)
printDebug(CPPTANGO_VERSION)
printDebug(TC_TARGET)
printDebug(TC_EXPORT)
printDebug(TC_ZMQ_VERSION)
printDebug(TC_OMNIORB_VERSION)
printDebug(TC_CPPTANGO_VERSION)
......@@ -223,9 +227,6 @@ printDebug(TC_ESRF_REPO)
printDebug(TC_PROJECT_SERVERS)
printDebug(TC_PROJECT_CLASSES)
printDebug(TC_TARGET)
printDebug(TC_EXPORT)
printDebug(TC_INSTALL_CMAKE_DIR)
printDebug(TC_OUTPUT_NAME)
......@@ -249,12 +250,19 @@ printDebug(TC_TANGO_LIB_DIR)
printDebug(TC_TANGO_LIB_INCLUDE_DIR)
printDebug(TC_TANGO_CLASSES_TARGET)
printDebug(TC_REMOTE_TANGO_CLASSES)
printDebug(TC_TANGO_CLASSES)
printDebug(TC_TANGO_CLASSES_DIR)
printDebug(TC_TANGO_CLASSES_INCLUDE_DIR)
printDebug(Serial_POPULATED)
printDebug(Serial_SOURCE_DIR)
printDebug(Serial_BINARY_DIR)
printDebug(Serial_SUBBUILD_DIR)
printDebug(Serial_)
msg(DEBUG "===DEBUG===DEBUG===DEBUG===DEBUG===DEBUG===DEBUG===DEBUG===")
msg(DEBUG "")
msg(DEBUG "## DEBUG ####################################################### DEBUG ##")
set(TC_LOG_PREFIX ${_TC_LOG_PREFIX})
unset(_TC_LOG_PREFIX)
msg(DEBUG "\n")
......@@ -52,58 +52,79 @@ else()
set(TC_ENV_INTERACTIVE YES)
endif()
set(TC_LIB_CONFIG_TEMPLATE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/template/Config.cmake.in)
set(TC_TEMPLATE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cmake/template)
string(TIMESTAMP VERSION_BUILD_TIMESTAMP "%Y-%m-%d %H:%M:%S")
# INSTITUTE PROJECT CONFIGURATION
configProject()
getGitInfo()
###############################################################################
###############################################################################
# GET TANGO LIBRARIES
set(TC_TANGO_LIB zmq;COS4;omniORB4;omniDynamic4;omnithread;tango;dl;pthread)
set(TC_TANGO_LIB dl;pthread;zmq;omniORB4;COS4;omniDynamic4;omnithread;tango)
set(TC_TANGO_LIB_DIR)
set(TC_TANGO_LIB_INCLUDE_DIR)
#-ZeroMQ-####################
findLib(
NAME zmq
NAME_CMAKE ZeroMQ
NAME_PKG_CONFIG libzmq
VERSION ${TC_ZMQ_VERSION}
SEARCH_DIR ${TC_ZMQ_DIR}
OUTPUT_LIB_DIR TC_TANGO_LIB_DIR
OUTPUT_INCLUDE_DIR TC_TANGO_LIB_INCLUDE_DIR
)
#-CppZMQ-####################
findLib(
NAME cppzmq
NAME_CMAKE cppzmq
VERSION ${TC_CPPZMQ_VERSION}
SEARCH_DIR ${TC_ZMQ_DIR};${TC_CPPZMQ_DIR}
OUTPUT_LIB_DIR TC_TANGO_LIB_DIR
OUTPUT_INCLUDE_DIR TC_TANGO_LIB_INCLUDE_DIR
)
#-omniORB-####################
findLib(
NAME omniORB
NAME_PKG_CONFIG omniORB4
VERSION ${TC_OMNIORB_VERSION}
SEARCH_DIR ${TC_OMNIORB_DIR}
OUTPUT_LIB_DIR TC_TANGO_LIB_DIR
OUTPUT_INCLUDE_DIR TC_TANGO_LIB_INCLUDE_DIR
)
#-cppTango-####################
findLib(
NAME cppTango
NAME_PKG_CONFIG tango
VERSION ${TC_CPPTANGO_VERSION}
SEARCH_DIR ${TC_ZMQ_DIR};${TC_CPPZMQ_DIR};${TC_OMNIORB_DIR};${TC_CPPTANGO_DIR}
OUTPUT_LIB_DIR TC_TANGO_LIB_DIR
OUTPUT_INCLUDE_DIR TC_TANGO_LIB_INCLUDE_DIR
)
if(NOT TARGET Tango_lib-target)
#-ZeroMQ-####################
findLib(
NAME zmq
NAME_CMAKE ZeroMQ
NAME_PKG_CONFIG libzmq
VERSION ${TC_ZMQ_VERSION}
SEARCH_DIR ${TC_ZMQ_DIR}
OUTPUT_LIB_DIR TC_TANGO_LIB_DIR
OUTPUT_INCLUDE_DIR TC_TANGO_LIB_INCLUDE_DIR
)
#-CppZMQ-####################
findLib(
NAME cppzmq
NAME_CMAKE cppzmq
VERSION ${TC_CPPZMQ_VERSION}
SEARCH_DIR ${TC_ZMQ_DIR};${TC_CPPZMQ_DIR}
OUTPUT_LIB_DIR TC_TANGO_LIB_DIR
OUTPUT_INCLUDE_DIR TC_TANGO_LIB_INCLUDE_DIR
)
#-omniORB-####################
findLib(
NAME omniORB
NAME_PKG_CONFIG omniORB4
VERSION ${TC_OMNIORB_VERSION}
SEARCH_DIR ${TC_OMNIORB_DIR}
OUTPUT_LIB_DIR TC_TANGO_LIB_DIR
OUTPUT_INCLUDE_DIR TC_TANGO_LIB_INCLUDE_DIR
)
#-cppTango-####################
findLib(
NAME cppTango
NAME_PKG_CONFIG tango
VERSION ${TC_CPPTANGO_VERSION}
SEARCH_DIR ${TC_ZMQ_DIR};${TC_CPPZMQ_DIR};${TC_OMNIORB_DIR};${TC_CPPTANGO_DIR}
OUTPUT_LIB_DIR TC_TANGO_LIB_DIR
OUTPUT_INCLUDE_DIR TC_TANGO_LIB_INCLUDE_DIR
)
# Create an interface library to represent the tango linkage
add_library(Tango_lib-target INTERFACE)
set_target_properties(Tango_lib-target
PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${TC_TANGO_LIB_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${TC_TANGO_LIB}"
INTERFACE_LINK_DIRECTORIES "${TC_TANGO_LIB_DIR}"
)
msg("\n-------------------------------------------------------------")
msg("CONFIGURE TANGO Libraries TARGET : Tango_lib-target for version ${tango_VERSION}")
endif()
include(debug)
......@@ -6,7 +6,7 @@ include(CMakeParseArguments)
include(CMakeFindDependencyMacro)
#include(ProcessorCount)
#include(CMakePrintHelpers)
include(ExternalProject)
#include(ExternalProject)
include(FetchContent)
if(NOT WIN32)
......@@ -49,6 +49,17 @@ macro(appendParentScope VAR_NAME VAR_VALUE)
endmacro()
############################################
#
#
#
macro(prependParentScope VAR_NAME VAR_VALUE)
list(PREPEND ${VAR_NAME} "${VAR_VALUE}")
list(REMOVE_DUPLICATES ${VAR_NAME} )
set(${VAR_NAME} ${${VAR_NAME}} PARENT_SCOPE)
endmacro()
############################################
# Macro
#
......@@ -87,29 +98,23 @@ endmacro()
############################################
#
# find_dependency()
#
#
macro(addDependencies)
foreach(_CLASS IN ITEMS ${ARGN})
if(${_CLASS} IN_LIST TC_TANGO_CLASSES)
msg(STATUS " - Add remote dependency ${_CLASS} ...")
#list(APPEND TC_TANGO_CLASSES_TARGET ${_CLASS}_lib-target)
list(APPEND TC_TANGO_CLASSES_LIB ${_CLASS})
list(APPEND TC_TANGO_CLASSES_LIB_DIR ${${_CLASS}_LIB_DIR})
list(APPEND TC_TANGO_CLASSES_INCLUDE_DIR ${${_CLASS}_INCLUDE_DIR})
elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../../classes/${_CLASS}/CMakeLists.txt)
msg(STATUS " - Add local dependency ${_CLASS} ...")
if(TARGET ${_CLASS}_lib-target)
list(APPEND TC_TANGO_CLASSES_TARGET ${_CLASS}_lib-target)
#list(APPEND TC_TANGO_CLASSES_LIB ${_CLASS})
#list(APPEND TC_TANGO_CLASSES_LIB_DIR ${${_CLASS}_LIB_DIR})
list(APPEND TC_TANGO_CLASSES_INCLUDE_DIR ${${_CLASS}_INCLUDE_DIR})
msg(STATUS " - Add dependency ${_CLASS} via target : ${_CLASS}_lib-target")
elseif(TARGET ${_CLASS})
list(APPEND TC_TANGO_CLASSES_TARGET ${_CLASS}_lib-target)
msg(STATUS " - Add dependency ${_CLASS} via target : ${_CLASS}::${_CLASS}_lib-target")
elseif(TARGET ${_CLASS}::${_CLASS}_lib-target)
list(APPEND TC_TANGO_CLASSES_TARGET ${_CLASS}::${_CLASS}_lib-target)
msg(STATUS " - Add dependency ${_CLASS} via target : ${_CLASS}::${_CLASS}_lib-target")
else()
msg(FATAL_ERROR " - Fail to add denpendecy ${_CLASS}, target dir not found !")
msg(FATAL_ERROR " - Fail to add denpendecy ${_CLASS}, target dir not found !")
endif()
endforeach()
......@@ -122,8 +127,6 @@ endmacro()
#
#
macro(addTangoClasses TARGETS_LIST)
msg(" ADDDDDD TC TARGET ...")
foreach(_TARGET IN ITEMS ${TARGETS_LIST})
......@@ -146,8 +149,6 @@ endmacro()
#
#
macro(addTangoServers TARGETS_LIST)
msg(" ADDDDDD TS TARGET ...")
foreach(_TARGET IN ITEMS ${TARGETS_LIST})
......@@ -165,6 +166,7 @@ macro(addTangoServers TARGETS_LIST)
endmacro()
#########################################################################################################
#########################################################################################################
##
......@@ -287,6 +289,178 @@ function(printDebug)
endfunction()
############################################
#
#
#
function(getGitInfo)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
find_package(Git REQUIRED QUIET)
if(GIT_FOUND)
set(GIT_SHA1 "")
set(GIT_SHA1_SHORT "")
set(GIT_BRANCH "")
set(GIT_TAG "")
set(GIT_DIRTY "")
set(GIT_COMMIT_AUTHOR "")
set(GIT_COMMIT_DATE "")
set(GIT_VERSION "")
set(GIT_EXTENDED_INFO "")
set(GIT_REPOSITORY_STATUS "")
# Get the SHA1
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_SHA1
RESULT_VARIABLE _PROCESS_RESULT
ERROR_VARIABLE _PROCESS_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT _PROCESS_RESULT EQUAL 0)
msg(WARNING "Failed to get the long SHA1 hash for the repository. Error: ${_PROCESS_ERROR}")
endif()
# Get the short version of the SHA1
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --short ${GIT_SHA1}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_SHA1_SHORT
RESULT_VARIABLE _PROCESS_RESULT
ERROR_VARIABLE _PROCESS_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT _PROCESS_RESULT EQUAL 0)
msg(WARNING "Failed to get the short SHA1 hash for the repository. Error: ${_PROCESS_ERROR}")
endif()
# Get the branch it was built from
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_BRANCH
RESULT_VARIABLE _PROCESS_RESULT
ERROR_VARIABLE _PROCESS_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT _PROCESS_RESULT EQUAL 0)
msg(WARNING "Failed to get the current branch for the repository. Error: ${_PROCESS_ERROR}")
endif()
# Detached head, see if this is a tag in detached mode
if(GIT_BRANCH STREQUAL "HEAD")
execute_process(
COMMAND ${GIT_EXECUTABLE} describe --exact-match --tags HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_BRANCH
RESULT_VARIABLE _PROCESS_RESULT
ERROR_VARIABLE _PROCESS_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# No tag, we are on a commit somewhere on a detached head, the version
# tag will be built to reflect this
if(NOT _PROCESS_RESULT EQUAL 0)
set(GIT_BRANCH "DETACHED")
endif()
endif()
# Get the tag
execute_process(
COMMAND ${GIT_EXECUTABLE} describe --tags --always HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_TAG
RESULT_VARIABLE _PROCESS_RESULT
ERROR_VARIABLE _PROCESS_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT _PROCESS_RESULT EQUAL 0)
msg(WARNING "Failed to get the current tag for the repository. Error: ${_PROCESS_ERROR}")
endif()
# Check for dirty source
execute_process(
COMMAND ${GIT_EXECUTABLE} diff-index --name-only HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_DIRTY
RESULT_VARIABLE _PROCESS_RESULT
ERROR_VARIABLE _PROCESS_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT _PROCESS_RESULT AND NOT GIT_DIRTY)
set(SOURCE_DIRTY "")
else()
set(SOURCE_DIRTY "-dirty")
endif()
# Get the commit date
execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 --pretty=format:%ad HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_DATE
RESULT_VARIABLE _PROCESS_RESULT
ERROR_VARIABLE _PROCESS_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT _PROCESS_RESULT EQUAL 0)
message(WARNING "Failed to get the commit date for the last commit. Error: ${_PROCESS_ERROR}")
endif()
# Get the commit author
execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 --pretty=format:%cn HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_AUTHOR
RESULT_VARIABLE _PROCESS_RESULT
ERROR_VARIABLE _PROCESS_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT _PROCESS_RESULT EQUAL 0)
message(WARNING "Failed to get the commit author for the last commit. Error: ${_PROCESS_ERROR}")
endif()
# Build the version string
# 1. DETACHED HEAD: DETACHED-SHA1
# 2. On branch: TAG-SHA1
if(GIT_BRANCH STREQUAL "DETACHED")
set(GIT_VERSION "${GIT_BRANCH}-${GIT_SHA1_SHORT}${SOURCE_DIRTY}")
else()
set(GIT_VERSION "${GIT_TAG}-${GIT_SHA1_SHORT}${SOURCE_DIRTY}")
endif()
# Build some extended information about the commit
set(GIT_EXTENDED_INFO "${GIT_COMMIT_AUTHOR}|${GIT_COMMIT_DATE}")
# Build the final full status message for injection into the header. All
# other variables are injected individually as a convenience
set(GIT_REPOSITORY_STATUS "${GIT_VERSION}|${GIT_EXTENDED_INFO}")
# Update paent scope
set(GIT_SHA1 ${GIT_SHA1} PARENT_SCOPE)
set(GIT_SHA1_SHORT ${GIT_SHA1_SHORT} PARENT_SCOPE)
set(GIT_BRANCH ${GIT_BRANCH} PARENT_SCOPE)
set(GIT_TAG ${GIT_TAG} PARENT_SCOPE)
set(GIT_DIRTY ${GIT_DIRTY} PARENT_SCOPE)
set(GIT_COMMIT_AUTHOR ${GIT_COMMIT_AUTHOR} PARENT_SCOPE)
set(GIT_COMMIT_DATE ${GIT_COMMIT_DATE} PARENT_SCOPE)
set(GIT_VERSION ${GIT_VERSION} PARENT_SCOPE)
set(GIT_EXTENDED_INFO ${GIT_EXTENDED_INFO} PARENT_SCOPE)
set(GIT_REPOSITORY_STATUS ${GIT_REPOSITORY_STATUS} PARENT_SCOPE)
else()
message(WARNING "Git not found. Build will not contain git revision info.")
endif()
endif()
endfunction()
############################################
#
#
......@@ -400,115 +574,70 @@ function(getTangoClass)
if(NOT (_CLASS_BY_FS OR _CLASS_BY_GIT OR _CLASS_BY_URL))
msg(FATAL_ERROR " - getTangoClass() syntax error: At leat,One of the argument [BY_FS, BY_GIT, BY_URL] is needed !")
endif()
option(LIB_FOUND "Tango Class dependency loaded" OFF)
###############################################################
# Search via find_package() on the file system
if(_CLASS_BY_FS)
msg(STATUS " - Search ${_CLASS_NAME} (version >=${_CLASS_VERSION}) via CMake find_package()")
# Add optional search dirs
if(_CLASS_SEARCH_DIR)
appendParentScope(CMAKE_PREFIX_PATH ${_CLASS_SEARCH_DIR})
prependParentScope(CMAKE_PREFIX_PATH ${_CLASS_SEARCH_DIR})
msg(DEBUG " with additional search dir..")
printDebug(CMAKE_PREFIX_PATH)
endif()
find_package(${_CLASS_NAME} ${_CLASS_VERSION} QUIET)
find_dependency(${_CLASS_NAME} ${_CLASS_VERSION} QUIET)
if(${_CLASS_NAME}_FOUND)
option(LIB_FOUND "Tango Class dependency loaded" ON)
msg("FS found")
printDebug(${_CLASS_NAME}_lib-target)
printDebug(${_CLASS_NAME}_VERSION)
printDebug(${_CLASS_NAME}_LIBRARY)
printDebug(${_CLASS_NAME}_LIB_DIR)
printDebug(${_CLASS_NAME}_INCLUDE_DIR)
message(STATUS "${TC_LOG_PREFIX}:: - Add external Tango Class ${_CLASS_NAME} (ver. ${${_CLASS_NAME}_VERSION})")
# Update Parent scope variables
appendParentScope(TC_TANGO_CLASSES ${_CLASS_NAME})
if(DEFINED ${_CLASS_NAME}_LIB_DIR)
appendParentScope(TC_TANGO_CLASSES_DIR ${${_CLASS_NAME}_LIB_DIR})
endif()
if(DEFINED ${_CLASS_NAME}_INCLUDE_DIR)
appendParentScope(TC_TANGO_CLASSES_INCLUDE_DIR ${${_CLASS_NAME}_INCLUDE_DIR})
endif()
appendParentScope(TC_REMOTE_TANGO_CLASSES ${_CLASS_NAME})
msg(DEBUG "Add remote Tango Class : ${_CLASS_NAME}")
else()
msg("FS Not found")
msg(FATAL_ERROR "Fail to get remote Tango Class ${_CLASS_NAME} !")
endif()
endif()
###############################################################
# Search via GITLAB repository
if(_CLASS_BY_GIT)
msg(STATUS " - Get ${_CLASS_NAME} (version >=${_CLASS_VERSION}) via Git")
msg(STATUS " - Get ${_CLASS_NAME} via Git \n<${_CLASS_GIT_REPOSITORY}><${_CLASS_GIT_TAG}>")
FetchContent_Declare(
${_CLASS_NAME}
GIT_REPOSITORY ${_CLASS_GIT_REPOSITORY}
GIT_TAG ${_CLASS_GIT_TAG}
GIT_PROGRESS TRUE
CMAKE_ARGS -D CMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-D CMAKE_PREFIX_PATH:PATH=<INSTALL_DIR>;${CMAKE_PREFIX_PATH}
)
#FetchContent_MakeAvailable(${_CLASS_NAME})
if(NOT ${_CLASS_NAME}_POPULATED)
FetchContent_Populate(${_CLASS_NAME})
FetchContent_GetProperties(${_CLASS_NAME}