0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-15 20:31:16 +08:00
sqlpp11/tests/CMakeLists.txt
rbock 9e1ecaf15a Fixed weird compiler crash with gcc-4.8.2
I have no idea why this is helping, but it does.

I need to invest some time to simplify the templates so that compilers
aren't as stressed with it.
2015-02-15 16:41:08 +01:00

31 lines
1016 B
CMake

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}")
endmacro ()
build_and_run(BooleanExpressionTest)
build_and_run(CustomQueryTest)
build_and_run(InterpretTest)
build_and_run(InsertTest)
build_and_run(RemoveTest)
build_and_run(UpdateTest)
build_and_run(SelectTest)
build_and_run(SelectTypeTest)
build_and_run(FunctionTest)
build_and_run(PreparedTest)
build_and_run(Minimalistic)
build_and_run(ResultTest)
build_and_run(UnionTest)
build_and_run(WithTest)
# 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)