mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
initial checkin of cmake and travis config files
This commit is contained in:
parent
801672b962
commit
5cb93fdb77
19
.travis.yml
Normal file
19
.travis.yml
Normal file
@ -0,0 +1,19 @@
|
||||
language: cpp
|
||||
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
|
||||
env:
|
||||
- BUILD_TYPE=Debug
|
||||
- BUILD_TYPE=Release
|
||||
|
||||
install:
|
||||
- cmake -Hprojects/CMake -BBuild -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
- cd Build
|
||||
- make
|
||||
- cd ..
|
||||
|
||||
script:
|
||||
- cd Build
|
||||
- ctest
|
46
projects/CMake/CMakeLists.txt
Normal file
46
projects/CMake/CMakeLists.txt
Normal file
@ -0,0 +1,46 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
project(Catch C CXX)
|
||||
message("configure: Catch/SelfTest")
|
||||
|
||||
# switch to the right compiler
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
if(APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
endif(APPLE)
|
||||
|
||||
# define some folders
|
||||
set(CATCH_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../")
|
||||
set(SELF_TEST_DIR ${CATCH_DIR}/projects/SelfTest)
|
||||
set(SCRIPTS_DIR ${CATCH_DIR}/scripts/)
|
||||
|
||||
# define the sources of the self test
|
||||
set(
|
||||
SOURCES
|
||||
${SELF_TEST_DIR}/ApproxTests.cpp
|
||||
${SELF_TEST_DIR}/BDDTests.cpp
|
||||
${SELF_TEST_DIR}/catch_self_test.cpp
|
||||
${SELF_TEST_DIR}/ClassTests.cpp
|
||||
${SELF_TEST_DIR}/CmdLineTests.cpp
|
||||
${SELF_TEST_DIR}/ConditionTests.cpp
|
||||
${SELF_TEST_DIR}/ExceptionTests.cpp
|
||||
${SELF_TEST_DIR}/GeneratorTests.cpp
|
||||
${SELF_TEST_DIR}/MessageTests.cpp
|
||||
${SELF_TEST_DIR}/MiscTests.cpp
|
||||
${SELF_TEST_DIR}/SectionTrackerTests.cpp
|
||||
${SELF_TEST_DIR}/TestMain.cpp
|
||||
${SELF_TEST_DIR}/TrickyTests.cpp
|
||||
${SELF_TEST_DIR}/VariadicMacrosTests.cpp
|
||||
)
|
||||
|
||||
# configure the executable
|
||||
include_directories(${CATCH_DIR}/include/)
|
||||
add_executable(SelfTest ${SOURCES})
|
||||
|
||||
# configure unit tests via ctest
|
||||
enable_testing()
|
||||
add_test(NAME SelfTest_run COMMAND python ${SCRIPTS_DIR}/approvalTests.py "${CATCH_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/SelfTest")
|
||||
|
||||
#add_custom_target(SelfTest_scripts ALL
|
||||
# COMMAND ${CMAKE_COMMAND} -E create_symlink \"${CMAKE_CURRENT_SOURCE_DIR}/../../../Data/Resources/mentor2wkt.json\" \"${CMAKE_CURRENT_BINARY_DIR}/mentor2wkt.json\"
|
||||
#)
|
Loading…
Reference in New Issue
Block a user