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

28 lines
853 B
CMake
Raw Normal View History

find_package(Threads REQUIRED)
macro(build_and_run arg)
add_executable(Sqlpp11MySQL${arg} ${arg}.cpp)
target_link_libraries(Sqlpp11MySQL${arg} PRIVATE sqlpp-mysql)
target_link_libraries(Sqlpp11MySQL${arg} PRIVATE Threads::Threads)
if(${arg} STREQUAL "JsonTest")
target_link_libraries(Sqlpp11MySQL${arg} PRIVATE MySQL::MySQL)
endif()
if(NOT MSVC)
target_compile_options(Sqlpp11MySQL${arg} PRIVATE -Wall -Wextra -pedantic)
endif()
add_test(${arg} Sqlpp11MySQL${arg})
endmacro()
build_and_run(JsonTest)
build_and_run(CustomQuery)
build_and_run(DateTimeTest)
build_and_run(SampleTest)
build_and_run(SelectTest)
build_and_run(UnionTest)
build_and_run(DynamicSelectTest)
build_and_run(MoveConstructorTest)
build_and_run(PreparedTest)
build_and_run(TruncatedTest)
build_and_run(UpdateTest)
build_and_run(RemoveTest)