set(CTEST_SOURCE_DIRECTORY "$ENV{TRAVIS_BUILD_DIR}")
set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/build")

set(CTEST_SITE "travis-ci.com")

set(CTEST_BUILD_OPTIONS "")
set(CTEST_BUILD_CONFIGURATION "Debug")

if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")

	set(CTEST_BUILD_NAME "linux-$ENV{TRAVIS_COMPILER}-default")
	set(CTEST_CMAKE_GENERATOR "Unix Makefiles")

elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")

	set(CTEST_BUILD_NAME "osx-xcode-ide")
	set(CTEST_CMAKE_GENERATOR "Xcode")

elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")

	set(CTEST_CMAKE_GENERATOR "Visual Studio 16 2019")
	set(CTEST_BUILD_NAME "windows-vs16-ide")

endif()

set(WITH_MEMCHECK TRUE)

set(TRAVIS_COMPILER "$ENV{TRAVIS_COMPILER}")
if (TRAVIS_COMPILER STREQUAL "gcc")
	set(CTEST_BUILD_OPTIONS "-DWITH_COVERAGE:BOOL=ON")
	set(WITH_COVERAGE TRUE)
else()
	set(CTEST_BUILD_OPTIONS "")
	set(WITH_COVERAGE FALSE)
endif()

include(${CTEST_SCRIPT_DIRECTORY}/common.cmake)
