Reactivated dev tools in scripts and Travis CI config file

This commit is contained in:
Sébastien Rombauts 2013-09-24 08:32:22 +02:00
parent 7dc1ae92a2
commit 5812460a21
4 changed files with 14 additions and 9 deletions

View File

@ -12,7 +12,7 @@ before_install:
before_script: before_script:
- mkdir build - mkdir build
- cd build - cd build
- cmake .. - cmake -DSQLITECPP_RUN_CPPLINT=ON -DSQLITECPP_RUN_CPPCHECK=ON -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON ..
- ln -s ../examples examples - ln -s ../examples examples
script: make && ctest --output-on-failure script: make && ctest --output-on-failure

View File

@ -140,11 +140,16 @@ endif (SQLITECPP_RUN_CPPLINT)
option(SQLITECPP_RUN_CPPCHECK "Run cppcheck C++ static analysis tool." OFF) option(SQLITECPP_RUN_CPPCHECK "Run cppcheck C++ static analysis tool." OFF)
if (SQLITECPP_RUN_CPPCHECK) if (SQLITECPP_RUN_CPPCHECK)
# add a cppcheck target to the "all" target find_program(CPPCHECK_EXECUTABLE NAMES cppcheck)
add_custom_target(SQLiteCpp_cppcheck if (CPPCHECK_EXECUTABLE)
ALL # add a cppcheck target to the "all" target
COMMAND cppcheck -j 4 cppcheck --enable=style --quiet ${CPPCHECK_ARG_TEMPLATE} ${PROJECT_SOURCE_DIR}/src add_custom_target(SQLiteCpp_cppcheck
) ALL
COMMAND cppcheck -j 4 cppcheck --enable=style --quiet ${CPPCHECK_ARG_TEMPLATE} ${PROJECT_SOURCE_DIR}/src
)
else (CPPCHECK_EXECUTABLE)
message(STATUS "cppcheck not found")
endif (CPPCHECK_EXECUTABLE)
else (SQLITECPP_RUN_CPPCHECK) else (SQLITECPP_RUN_CPPCHECK)
message(STATUS "SQLITECPP_RUN_CPPCHECK OFF") message(STATUS "SQLITECPP_RUN_CPPCHECK OFF")
endif (SQLITECPP_RUN_CPPCHECK) endif (SQLITECPP_RUN_CPPCHECK)

View File

@ -6,7 +6,7 @@
mkdir build mkdir build
cd build cd build
@REM generate solution for Visual Studio 2010, and build it @REM generate solution for Visual Studio 2010, and build it
cmake .. -G "Visual Studio 10" cmake -DSQLITECPP_RUN_CPPLINT=ON -DSQLITECPP_RUN_CPPCHECK=ON -DSQLITECPP_RUN_DOXYGEN=ON -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON .. -G "Visual Studio 10"
cmake --build . cmake --build .
@REM prepare and launch tests @REM prepare and launch tests
@ -15,4 +15,4 @@ mkdir examples\example1
copy ..\examples\example1\example.db3 examples\example1 copy ..\examples\example1\example.db3 examples\example1
copy ..\examples\example1\logo.png examples\example1 copy ..\examples\example1\logo.png examples\example1
ctest --output-on-failure ctest --output-on-failure
cd .. cd ..

View File

@ -6,7 +6,7 @@
mkdir -p build mkdir -p build
cd build cd build
# generate solution for GCC # generate solution for GCC
cmake .. cmake -DSQLITECPP_RUN_CPPLINT=ON -DSQLITECPP_RUN_CPPCHECK=ON -DSQLITECPP_RUN_DOXYGEN=ON -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON ..
cmake --build . cmake --build .
# prepare and launch tests # prepare and launch tests