update SCC to latest
This commit is contained in:
@ -1,20 +0,0 @@
|
||||
# Function to link between sub-projects
|
||||
function(add_dependent_subproject subproject_name)
|
||||
#if (NOT TARGET ${subproject_name}) # target unknown
|
||||
if(NOT PROJECT_${subproject_name}) # var unknown because we build only this subproject
|
||||
find_package(${subproject_name} CONFIG REQUIRED)
|
||||
else () # we know the target thus we are doing a build from the top directory
|
||||
include_directories(../${subproject_name}/incl)
|
||||
endif ()
|
||||
endfunction(add_dependent_subproject)
|
||||
|
||||
# Make sure we tell the topdir CMakeLists that we exist (if build from topdir)
|
||||
get_directory_property(hasParent PARENT_DIRECTORY)
|
||||
if(hasParent)
|
||||
set(PROJECT_${PROJECT_NAME} true PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
# Function to link between sub-projects
|
||||
function(add_dependent_header subproject_name)
|
||||
include_directories(../${subproject_name}/incl)
|
||||
endfunction(add_dependent_header)
|
@ -1,45 +0,0 @@
|
||||
macro(setup_conan)
|
||||
find_program(conan conan PATHS /usr/bin /usr/local/bin)
|
||||
if(NOT EXISTS ${conan})
|
||||
message(FATAL_ERROR "Conan is required. Please see README.md")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL Darwin)
|
||||
set(os Macos)
|
||||
else()
|
||||
set(os ${CMAKE_HOST_SYSTEM_NAME})
|
||||
endif()
|
||||
|
||||
if(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
|
||||
set(compiler gcc)
|
||||
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL AppleClang)
|
||||
set(compiler apple-clang)
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown compiler: ${CMAKE_CXX_COMPILER_ID}")
|
||||
endif()
|
||||
|
||||
string(SUBSTRING ${CMAKE_CXX_COMPILER_VERSION} 0 3 compiler_version)
|
||||
|
||||
set(conanfile ${CMAKE_SOURCE_DIR}/conanfile.txt)
|
||||
set(conanfile_cmake ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||
set(compiler_libcxx libstdc++11)
|
||||
|
||||
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
|
||||
set(CONAN_BUILD_TYPE Debug)
|
||||
elseif("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
|
||||
set(CONAN_BUILD_TYPE Release)
|
||||
else()
|
||||
set(CONAN_BUILD_TYPE ${CMAKE_BUILD_TYPE})
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND ${conan} install --build=missing
|
||||
-s build_type=${CONAN_BUILD_TYPE} -s compiler.libcxx=${compiler_libcxx}
|
||||
${CMAKE_SOURCE_DIR} RESULT_VARIABLE return_code)
|
||||
if(NOT ${return_code} EQUAL 0)
|
||||
message(FATAL_ERROR "conan install command failed.")
|
||||
endif()
|
||||
|
||||
include(${conanfile_cmake})
|
||||
conan_basic_setup()
|
||||
endmacro()
|
@ -1,24 +0,0 @@
|
||||
function(PrepareDocTarget)
|
||||
|
||||
# Configure the doxygen config file with current settings:
|
||||
configure_file(documentation-config.doxygen.in ${CMAKE_CURRENT_BINARY_DIR}/documentation-config.doxygen @ONLY)
|
||||
|
||||
# Set the name of the target : "doc" if it doesn't already exist and "doc<projectname>" if it does.
|
||||
# This way we make sure to have a single "doc" target. Either it is the one of the top directory or
|
||||
# it is the one of the subproject that we are compiling alone.
|
||||
set(DOC_TARGET_NAME "doc")
|
||||
if(TARGET doc)
|
||||
set(DOC_TARGET_NAME "doc${PROJECT_NAME}")
|
||||
endif()
|
||||
|
||||
add_custom_target(${DOC_TARGET_NAME} ${TARGET_ALL}
|
||||
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/documentation-config.doxygen
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating API documentation using doxygen for ${PROJECT_NAME}" VERBATIM)
|
||||
|
||||
set(INSTALL_DOC_DIR ${CMAKE_BINARY_DIR}/doc/${PROJECT_NAME}/html)
|
||||
file(MAKE_DIRECTORY ${INSTALL_DOC_DIR}) # needed for install
|
||||
|
||||
install(DIRECTORY ${INSTALL_DOC_DIR} DESTINATION share/${PROJECT_NAME}-${VERSION_MAJOR} COMPONENT doc)
|
||||
|
||||
endfunction()
|
@ -1,22 +0,0 @@
|
||||
if(__git_functions)
|
||||
return()
|
||||
endif()
|
||||
set(__git_functions YES)
|
||||
|
||||
function( get_branch_from_git )
|
||||
execute_process(
|
||||
COMMAND git rev-parse --abbrev-ref HEAD
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
RESULT_VARIABLE git_result
|
||||
OUTPUT_VARIABLE git_branch
|
||||
ERROR_VARIABLE git_error
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if( NOT git_result EQUAL 0 )
|
||||
message( FATAL_ERROR "Failed to execute Git: ${git_error}" )
|
||||
endif()
|
||||
|
||||
set( GIT_BRANCH ${git_branch} PARENT_SCOPE )
|
||||
endfunction( get_branch_from_git )
|
||||
|
Reference in New Issue
Block a user