fixing make files, removing mysql wrappers from active files

master
dmatetelki 9 years ago
parent a627b48d8c
commit 5f1bf903ed

@ -1,7 +1,7 @@
cmake_minimum_required (VERSION 2.6)
project (CPP_UTILS_LIB)
set(CMAKE_CXX_COMPILER "/usr/bin/g++-4.7")
set(CMAKE_CXX_COMPILER "/usr/bin/g++-5.1.0")
set (CXX_FLAGS "-Wall -Wextra -pedantic -Weffc++ -Wshadow "
"-Wpointer-arith -Wcast-qual "

@ -2,4 +2,6 @@ include_directories (.)
aux_source_directory(. CPPUTILS_SOURCES)
add_library (CppUtils SHARED ${CPPUTILS_SOURCES})
target_link_libraries(CppUtils pthread rt gcov ssl mysqlclient)
target_link_libraries(CppUtils pthread rt gcov ssl
# mysqlclient
)

@ -27,7 +27,7 @@ bool SocketServer::start()
if ( !m_connection->bind() )
return false;
if ( m_connection->listen( m_maxPendingQueueLen ) == -1 ) {
if ( m_connection->listen( m_maxPendingQueueLen ) == false ) {
return false;
}

@ -5,24 +5,27 @@ set (CXX_FLAGS "-Wall -Wextra -pedantic -Weffc++ -Wshadow "
add_definitions( ${CXX_FLAGS} )
include_directories (. ../lib)
link_directories (../lib/cpp_utils)
add_executable ( tcpserver tcpserver_main.cpp )
target_link_libraries ( tcpserver CppUtils )
target_link_libraries ( tcpserver CppUtils gcov)
add_executable ( tcpclient tcpclient_main.cpp )
target_link_libraries ( tcpclient CppUtils )
target_link_libraries ( tcpclient CppUtils gcov )
add_executable ( sslserver sslserver_main.cpp )
target_link_libraries ( sslserver CppUtils ssl pthread rt )
target_link_libraries ( sslserver CppUtils ssl pthread rt gcov )
add_executable ( sslclient sslclient_main.cpp )
target_link_libraries ( sslclient CppUtils ssl pthread rt )
target_link_libraries ( sslclient CppUtils ssl pthread rt gcov )
add_executable ( mysqlclient mysqlclient_main.cpp )
add_library ( lib_mysql_client SHARED IMPORTED )
# TODO use find_library
set_target_properties ( lib_mysql_client PROPERTIES IMPORTED_LOCATION /usr/lib/x86_64-linux-gnu/libmysqlclient.so )
target_link_libraries ( mysqlclient CppUtils lib_mysql_client )
# add_executable ( mysqlclient mysqlclient_main.cpp )
# add_library ( lib_mysql_client SHARED IMPORTED )
# # TODO use find_library
# set_target_properties ( lib_mysql_client PROPERTIES IMPORTED_LOCATION /usr/lib/x86_64-linux-gnu/libmysqlclient.so )
# target_link_libraries ( mysqlclient CppUtils lib_mysql_client )
add_custom_target( other DEPENDS tcpserver tcpclient sslserver sslclient mysqlclient )
add_custom_target( other DEPENDS tcpserver tcpclient sslserver sslclient
# mysqlclient
)

Loading…
Cancel
Save