mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 17:56:13 -04:00
Adding a "test" target to CMake & a Travis CI config file
This commit is contained in:
parent
a02c80d157
commit
ada826aa8f
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
Debug
|
||||
Release
|
||||
build
|
||||
|
||||
*.ncb
|
||||
*.suo
|
||||
@ -9,3 +10,4 @@ Release
|
||||
doc
|
||||
core
|
||||
*ipch
|
||||
.settings/
|
||||
|
15
.travis.yml
Normal file
15
.travis.yml
Normal file
@ -0,0 +1,15 @@
|
||||
language: cpp
|
||||
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
|
||||
# using a symbolic link to get the "make test" to work as if launched from the root directorys
|
||||
before_script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake ..
|
||||
- ln -s ../examples examples
|
||||
|
||||
script: make && make test
|
||||
|
@ -1,12 +1,23 @@
|
||||
cmake_minimum_required (VERSION 2.6)
|
||||
project (SQLiteCpp)
|
||||
add_definitions(-rdynamic -fstack-protector-all -Wall -Wextra -pedantic -Weffc++ -Wformat-security -Winit-self -Wswitch-default -Wswitch-enum -Wfloat-equal -Wundef -Wshadow -Wcast-qual -Wconversion -Wlogical-op -Winline -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn)
|
||||
|
||||
# add the wrapper as a library
|
||||
add_library(SQLiteCpp
|
||||
src/Column.cpp
|
||||
src/Database.cpp
|
||||
src/Statement.cpp
|
||||
src/Transaction.cpp
|
||||
)
|
||||
|
||||
# add the exmple1 executable, linked with the wrapper library
|
||||
add_executable(example1 examples/example1/main.cpp)
|
||||
target_link_libraries (example1 SQLiteCpp sqlite3)
|
||||
|
||||
# add a "test" target:
|
||||
enable_testing()
|
||||
|
||||
# does the example1 runs successfully
|
||||
add_test (Example1Run example1)
|
||||
|
||||
|
||||
|
@ -98,6 +98,11 @@ cd Release
|
||||
cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
|
||||
make -j
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
This project is continuously tested under Ubuntu Linux with the gcc and clang compilers
|
||||
using the Travis-CI community service (https://travis-ci.org)
|
||||
|
||||
### License
|
||||
|
||||
Copyright (c) 2012-2013 Sébastien Rombauts (sebastien.rombauts@gmail.com)
|
||||
|
Loading…
x
Reference in New Issue
Block a user