Commit 4bcea0a2 authored by jcfr's avatar jcfr

ENH: Add external project qCDashAPI

This external project hosted on github.com/jcfr/qCDashAPI is
a small Qt based library allowing to easily query a CDash server.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@17000 3bd1e089-480b-0410-8dfb-8563597acbee
parent d0ae8919
......@@ -355,6 +355,12 @@ INCLUDE(${VTK_USE_FILE})
FIND_PACKAGE(CTK REQUIRED)
INCLUDE(${CTK_USE_FILE})
#-----------------------------------------------------------------------------
# qCDashAPI
#-----------------------------------------------------------------------------
FIND_PACKAGE(qCDashAPI REQUIRED)
INCLUDE(${qCDashAPI_USE_FILE})
#-----------------------------------------------------------------------------
# Qt
#-----------------------------------------------------------------------------
......
......@@ -33,6 +33,7 @@ set(CTK_DIR "@CTK_DIR_CONFIG@")
set(ITK_DIR "@ITK_DIR_CONFIG@")
set(PYTHON_INCLUDE_PATH "@PYTHON_INCLUDE_PATH@")
set(PYTHON_LIBRARIES "@PYTHON_LIBRARIES@")
set(qCDashAPI_DIR "@qCDashAPI_DIR_CONFIG@")
set(SLICERLIBCURL_DIR "@SLICERLIBCURL_DIR_CONFIG@")
set(Teem_DIR "@Teem_DIR_CONFIG@")
set(VTK_DIR "@VTK_DIR_CONFIG@")
......
......@@ -50,6 +50,7 @@ if(Slicer_USE_BatchMake)
endif()
SET(CTK_DIR_CONFIG ${CTK_DIR})
SET(ITK_DIR_CONFIG ${ITK_DIR})
SET(qCDashAPI_DIR_CONFIG ${qCDashAPI_DIR})
SET(PYTHON_INCLUDE_PATH_CONFIG ${PYTHON_INCLUDE_PATH})
SET(PYTHON_LIBRARIES_CONFIG ${PYTHON_LIBRARIES})
SET(SLICERLIBCURL_DIR_CONFIG ${SLICERLIBCURL_DIR})
......@@ -57,7 +58,7 @@ SET(Teem_DIR_CONFIG ${Teem_DIR})
SET(VTK_DIR_CONFIG ${VTK_DIR})
# List all required external project
SET(Slicer_EXTERNAL_PROJECTS_CONFIG CTK GenerateCLP ITK SLICERLIBCURL Teem VTK)
SET(Slicer_EXTERNAL_PROJECTS_CONFIG CTK GenerateCLP ITK qCDashAPI SLICERLIBCURL Teem VTK)
IF(Slicer_USE_BatchMake)
LIST(APPEND Slicer_EXTERNAL_PROJECTS_CONFIG BatchMake)
ENDIF()
......
......@@ -63,7 +63,7 @@ endif()
#------------------------------------------------------------------------------
# Slicer dependency list
#------------------------------------------------------------------------------
set(Slicer_DEPENDENCIES libarchive cmcurl OpenIGTLink teem VTK Insight CTK)
set(Slicer_DEPENDENCIES libarchive cmcurl OpenIGTLink teem VTK Insight CTK qCDashAPI)
if(Slicer_USE_BatchMake)
list(APPEND Slicer_DEPENDENCIES BatchMake)
endif()
......@@ -200,6 +200,8 @@ ExternalProject_Add(${proj}
-DCTK_DIR:PATH=${CTK_DIR}
# CTKAppLauncher
-DCTKAPPLAUNCHER_DIR:PATH=${CTKAPPLAUNCHER_DIR}
# qCDashAPI
-DqCDashAPI_DIR:PATH=${qCDashAPI_DIR}
INSTALL_COMMAND ""
)
......
# Make sure this file is included only once
get_filename_component(CMAKE_CURRENT_LIST_FILENAME ${CMAKE_CURRENT_LIST_FILE} NAME_WE)
IF(${CMAKE_CURRENT_LIST_FILENAME}_FILE_INCLUDED)
RETURN()
ENDIF()
SET(${CMAKE_CURRENT_LIST_FILENAME}_FILE_INCLUDED 1)
# Sanity checks
if(DEFINED qCDashAPI_DIR AND NOT EXISTS ${qCDashAPI_DIR})
message(FATAL_ERROR "qCDashAPI_DIR variable is defined but corresponds to non-existing directory")
endif()
# Set dependency list
set(qCDashAPI_DEPENDENCIES "")
# Include dependent projects if any
SlicerMacroCheckExternalProjectDependency(qCDashAPI)
set(proj qCDashAPI)
if(NOT DEFINED qCDashAPI_DIR)
#message(STATUS "${__indent}Adding project ${proj}")
ExternalProject_Add(${proj}
GIT_REPOSITORY "${git_protocol}://github.com/jcfr/qCDashAPI.git"
GIT_TAG "origin/master"
SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
BINARY_DIR ${proj}-build
CMAKE_GENERATOR ${gen}
CMAKE_ARGS
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
#-DCMAKE_C_FLAGS:STRING=${ep_common_c_flags} # Unused
-DBUILD_TESTING:BOOL=OFF
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
INSTALL_COMMAND ""
DEPENDS
${qCDashAPI_DEPENDENCIES}
)
set(qCDashAPI_DIR ${CMAKE_BINARY_DIR}/${proj}-build)
else()
# The project is provided using qCDashAPI_DIR, nevertheless since other project may depend on qCDashAPI,
# let's add an 'empty' one
SlicerMacroEmptyExternalProject(${proj} "${qCDashAPI_DEPENDENCIES}")
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment