0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-16 04:47:18 +08:00
sqlpp11/tests/CMakeLists.txt

29 lines
967 B
CMake
Raw Normal View History

2013-08-15 19:26:09 +08:00
macro (build_and_run arg)
# Add headers to sources to enable file browsing in IDEs
include_directories("${CMAKE_BINARY_DIR}/tests")
add_executable("${arg}" "${arg}.cpp" ${sqlpp_headers} "${CMAKE_CURRENT_LIST_DIR}/Sample.h")
add_test("${arg}" "${arg}")
2013-08-15 19:26:09 +08:00
endmacro ()
2014-11-04 06:16:53 +08:00
build_and_run(BooleanExpressionTest)
2014-10-29 14:34:42 +08:00
build_and_run(CustomQueryTest)
2014-11-04 06:16:53 +08:00
build_and_run(InterpretTest)
build_and_run(InsertTest)
build_and_run(RemoveTest)
build_and_run(UpdateTest)
build_and_run(SelectTest)
2014-11-04 06:16:53 +08:00
build_and_run(SelectTypeTest)
build_and_run(FunctionTest)
build_and_run(PreparedTest)
build_and_run(Minimalistic)
build_and_run(ResultTest)
2013-08-15 19:26:09 +08:00
# if you want to use the generator, you can do something like this:
#find_package(PythonInterp REQUIRED)
#add_custom_command(
# OUTPUT "${CMAKE_CURRENT_LIST_DIR}/Sample.h"
# COMMAND "${PYTHON_EXECUTABLE}" "${CMAKE_SOURCE_DIR}/scripts/ddl2cpp" "${CMAKE_CURRENT_LIST_DIR}/sample.sql" Sample test
# DEPENDS "${CMAKE_CURRENT_LIST_DIR}/sample.sql"
# VERBATIM)