mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-05 02:06:02 -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
|
Debug
|
||||||
Release
|
Release
|
||||||
|
build
|
||||||
|
|
||||||
*.ncb
|
*.ncb
|
||||||
*.suo
|
*.suo
|
||||||
@ -9,3 +10,4 @@ Release
|
|||||||
doc
|
doc
|
||||||
core
|
core
|
||||||
*ipch
|
*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)
|
cmake_minimum_required (VERSION 2.6)
|
||||||
project (SQLiteCpp)
|
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_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
|
add_library(SQLiteCpp
|
||||||
src/Column.cpp
|
src/Column.cpp
|
||||||
src/Database.cpp
|
src/Database.cpp
|
||||||
src/Statement.cpp
|
src/Statement.cpp
|
||||||
src/Transaction.cpp
|
src/Transaction.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# add the exmple1 executable, linked with the wrapper library
|
||||||
add_executable(example1 examples/example1/main.cpp)
|
add_executable(example1 examples/example1/main.cpp)
|
||||||
target_link_libraries (example1 SQLiteCpp sqlite3)
|
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
|
cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
|
||||||
make -j
|
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
|
### License
|
||||||
|
|
||||||
Copyright (c) 2012-2013 Sébastien Rombauts (sebastien.rombauts@gmail.com)
|
Copyright (c) 2012-2013 Sébastien Rombauts (sebastien.rombauts@gmail.com)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user