cmake_minimum_required(VERSION 3.22)

project(Phoenix)

find_package(PhoenixCMake REQUIRED)

set(PROJECT_VERSION "1.1.1") # this line is updated by semantic release using regex

phoenix_base_project("PhoenixUnitTest" "${PROJECT_VERSION}"
		"Set of Tool and functions to ease UnitTest automatically"
		"https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/test-benchmark/PhoenixUnitTest")

pull_extra_module("PhoenixCore" "https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/system/PhoenixCore.git")
pull_extra_module("PhoenixOptionParser" "https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/config/PhoenixOptionParser.git")
pull_extra_module("PhoenixFileParser" "https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/config/PhoenixFileParser.git")

phoenix_include_directories(
	${CMAKE_CURRENT_SOURCE_DIR}
	${CMAKE_CURRENT_BINARY_DIR}
	${CMAKE_CURRENT_SOURCE_DIR}/src
)
phoenix_create_find_full("PhoenixUnitTest" "" "" "phoenix_dripfile" "" PhoenixCore PhoenixOptionParser PhoenixFileParser)

if(NOT DOC_ONLY)
	phoenix_create_bash_completion("phoenix_dripfile")
endif()

phoenix_add_subdirectory(program)

set(PHOENIXUNITTEST_PHOENIX_DRIPFILE_EXECUTABLE "${CMAKE_CURRENT_BINARY_DIR}/program/phoenix_dripfile" CACHE STRING "Full location of the phoenix_dripfile program")

phoenix_tests()
