mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-16 12:51:13 +08:00
cmake vertigo
This commit is contained in:
parent
a4d8d8b787
commit
73ca9d759f
@ -1,3 +1,4 @@
|
||||
|
||||
# Copyright (c) 2013-2016, Roland Bock, Alexey Elymanov
|
||||
# All rights reserved.
|
||||
#
|
||||
@ -25,8 +26,6 @@
|
||||
|
||||
include(FindPythonInterp)
|
||||
if (${PYTHONINTERP_FOUND})
|
||||
message( STATUS "Python found: " ${PYTHON_EXECUTABLE} )
|
||||
|
||||
execute_process(
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "import pyparsing"
|
||||
RESULT_VARIABLE PythonRESULT
|
||||
@ -36,9 +35,12 @@ if (${PYTHONINTERP_FOUND})
|
||||
if (${PythonRESULT})
|
||||
message( STATUS "Pyparsing is not installed." ${PythonRESULT} )
|
||||
else()
|
||||
message( STATUS "Pyparsing is installed." )
|
||||
message( STATUS "Enabling sql2ddl tests.")
|
||||
message( STATUS "Pyparsing is installed: Enabling sql2ddl tests." )
|
||||
|
||||
set(test_scripts_names ddl2cpp)
|
||||
file(WRITE ddl2cpp_test.h "
|
||||
auto test_scripts_pythonPath = \"${PYTHON_EXECUTABLE}\";
|
||||
" )
|
||||
|
||||
|
||||
create_test_sourcelist(test_scripts_sources test_scripts_main.cpp ${test_scripts_names})
|
||||
|
@ -1,6 +1,25 @@
|
||||
#include <sqlpp11/sqlpp11.h>
|
||||
|
||||
//#include "MockDb.h" //todo 1
|
||||
#include "ddl2cpp_test.h"
|
||||
#include <iostream>
|
||||
int ddl2cpp(int, char* [])
|
||||
{
|
||||
std::cout << test_scripts_pythonPath; //included from cmake-generated header if python is found
|
||||
/* maybe todo 1: test compile / db_mock, for now we're just testing that ddl2cpp generates header without errors
|
||||
*/
|
||||
/*
|
||||
MockDb db = {};
|
||||
MockDb::_serializer_context_t printer = {};
|
||||
|
||||
const auto f = test::TabFoo{};
|
||||
const auto t = test::TabBar{};
|
||||
const auto tab_a = f.as(sqlpp::alias::a);
|
||||
|
||||
getColumn(db, t._epsilon); //underscore bug check
|
||||
*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user