Changed to use libmysqld and fixed the linker options
This commit is contained in:
@ -12,7 +12,7 @@ IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
ELSE(BUILD_TYPE)
|
||||
SET(CMAKE_INSTALL_CONFIG_NAME "Debug")
|
||||
SET(CMAKE_INSTALL_CONFIG_NAME "")
|
||||
ENDIF(BUILD_TYPE)
|
||||
MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
|
@ -7,7 +7,7 @@ include_directories(${PROJECT_BUILD_DIR}/include)
|
||||
# single file.
|
||||
foreach(prog basic-1 basic-2 jan_test)
|
||||
ADD_EXECUTABLE(${prog} ${prog}.cpp)
|
||||
TARGET_LINK_LIBRARIES(${prog} replication boost_system )
|
||||
TARGET_LINK_LIBRARIES(${prog} replication boost_system pthread)
|
||||
endforeach()
|
||||
|
||||
add_subdirectory(mysql2lucene EXCLUDE_FROM_ALL)
|
||||
|
@ -12,7 +12,7 @@ IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
ELSE(BUILD_TYPE)
|
||||
SET(CMAKE_INSTALL_CONFIG_NAME "Debug")
|
||||
SET(CMAKE_INSTALL_CONFIG_NAME "")
|
||||
ENDIF(BUILD_TYPE)
|
||||
MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
@ -37,13 +37,3 @@ IF(NOT CMAKE_INSTALL_LOCAL_ONLY)
|
||||
|
||||
ENDIF(NOT CMAKE_INSTALL_LOCAL_ONLY)
|
||||
|
||||
IF(CMAKE_INSTALL_COMPONENT)
|
||||
SET(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
|
||||
ELSE(CMAKE_INSTALL_COMPONENT)
|
||||
SET(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
|
||||
ENDIF(CMAKE_INSTALL_COMPONENT)
|
||||
|
||||
FILE(WRITE "/home/jan/skysql/skygateway/skygateway/replication_listener/examples/${CMAKE_INSTALL_MANIFEST}" "")
|
||||
FOREACH(file ${CMAKE_INSTALL_MANIFEST_FILES})
|
||||
FILE(APPEND "/home/jan/skysql/skygateway/skygateway/replication_listener/examples/${CMAKE_INSTALL_MANIFEST}" "${file}\n")
|
||||
ENDFOREACH(file)
|
||||
|
@ -27,12 +27,11 @@ void* binlog_reader(void * arg)
|
||||
pthread_t id = pthread_self();
|
||||
string database_dot_table;
|
||||
const char* server_type;
|
||||
Gtid gtid(0,1,31);
|
||||
|
||||
try {
|
||||
Gtid gtid(std::string("62cda1d0e3a011e289d76ac0855a31e8:54"));
|
||||
try {
|
||||
Binary_log binlog(create_transport(uri));
|
||||
binlog.connect();
|
||||
|
||||
binlog.connect(gtid);
|
||||
|
||||
server_type = binlog.get_mysql_server_type_str();
|
||||
|
||||
cout << "Server " << uri << " type: " << server_type << endl;
|
||||
@ -73,6 +72,7 @@ void* binlog_reader(void * arg)
|
||||
<< event->get_event_type()
|
||||
<< " txt " << get_event_type_str(event->get_event_type())
|
||||
<< " GTID " << gevent->m_gtid.get_string()
|
||||
<< " GTID2" << gevent->m_gtid.get_mysql_gtid()
|
||||
<< std::endl;
|
||||
|
||||
break;
|
||||
|
@ -12,7 +12,7 @@ IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
ELSE(BUILD_TYPE)
|
||||
SET(CMAKE_INSTALL_CONFIG_NAME "Debug")
|
||||
SET(CMAKE_INSTALL_CONFIG_NAME "")
|
||||
ENDIF(BUILD_TYPE)
|
||||
MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
|
@ -30,6 +30,14 @@ Author: Jan Lindström jan.lindstrom@skysql.com
|
||||
namespace mysql
|
||||
{
|
||||
|
||||
template <class T>
|
||||
inline std::string gno_to_string (const T& t)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << t;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
enum mysql_server_types {
|
||||
MYSQL_SERVER_TYPE_NA = 0,
|
||||
MYSQL_SERVER_TYPE_MARIADB = 1,
|
||||
@ -51,11 +59,14 @@ class Gtid
|
||||
Gtid(const std::string &mysql_gtid,
|
||||
const boost::uint64_t gno);
|
||||
|
||||
Gtid(const std::string &mysql_gtid);
|
||||
|
||||
~Gtid() {}
|
||||
|
||||
bool is_real_gtid() const { return m_real_gtid;}
|
||||
|
||||
const std::string& get_mysql_gtid() const { return m_mysql_gtid;}
|
||||
const std::string& get_mysql_gtid() const { return m_mysql_gtid; }
|
||||
|
||||
std::string get_string() const;
|
||||
|
||||
boost::uint32_t get_domain_id() const { return m_domain_id; }
|
||||
|
@ -8,8 +8,8 @@ set(replication_sources
|
||||
basic_content_handler.cpp utilities.cpp gtid.cpp)
|
||||
|
||||
# Find MySQL client library and header files
|
||||
find_library(MySQL_LIBRARY NAMES mysqlclient_r mysqlclient PATHS
|
||||
/usr/lib64/mysql /usr/lib/mysql)
|
||||
find_library(MySQL_LIBRARY NAMES libmysqld.a PATHS
|
||||
/usr/lib64/mysql /usr/lib/mysql /usr/local/mysql/lib)
|
||||
find_path(MySQL_INCLUDE_DIR mysql.h
|
||||
/usr/local/include/mysql /usr/include/mysql)
|
||||
include_directories(${MySQL_INCLUDE_DIR})
|
||||
|
@ -12,7 +12,7 @@ IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
ELSE(BUILD_TYPE)
|
||||
SET(CMAKE_INSTALL_CONFIG_NAME "Debug")
|
||||
SET(CMAKE_INSTALL_CONFIG_NAME "")
|
||||
ENDIF(BUILD_TYPE)
|
||||
MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
|
@ -52,6 +52,33 @@ namespace mysql
|
||||
{
|
||||
}
|
||||
|
||||
Gtid::Gtid(const std::string& mysql_gtid)
|
||||
:m_real_gtid(true),
|
||||
m_domain_id(0),
|
||||
m_server_id(0),
|
||||
m_sequence_number(0),
|
||||
m_server_type(MYSQL_SERVER_TYPE_MYSQL)
|
||||
{
|
||||
int i,k;
|
||||
unsigned char tmp[2];
|
||||
unsigned char *sid = (unsigned char *)mysql_gtid.c_str();
|
||||
|
||||
for(i=0; i < 16*2; i+=2) {
|
||||
unsigned int c;
|
||||
tmp[0] = sid[i];
|
||||
tmp[1] = sid[i+1];
|
||||
sscanf((const char *)tmp, "%02x", &c);
|
||||
tmp[0] = (unsigned char)c;
|
||||
tmp[1] = '\0';
|
||||
m_mysql_gtid.append(std::string((const char *)tmp));
|
||||
}
|
||||
i++;
|
||||
sscanf((const char *)&(sid[i]), "%lu", &m_sequence_number);
|
||||
m_mysql_gtid.append(to_string(m_sequence_number));
|
||||
|
||||
std::cout << "GTID:: " << m_mysql_gtid << " " << std::endl;
|
||||
}
|
||||
|
||||
std::string Gtid::get_string() const
|
||||
{
|
||||
if (m_server_type == MYSQL_SERVER_TYPE_MARIADB) {
|
||||
@ -64,11 +91,12 @@ namespace mysql
|
||||
// Dump the encoded SID using hexadesimal representation
|
||||
// Making it little bit more usefull
|
||||
for(size_t i=0;i < 16;i++) {
|
||||
sprintf((char *)tmp, "%x", (unsigned char)sid[i]);
|
||||
sprintf((char *)tmp, "%02x", (unsigned char)sid[i]);
|
||||
hexs.append(std::string((const char *)tmp));
|
||||
}
|
||||
return(hexs + std::string(":") + to_string(m_sequence_number));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -405,6 +405,21 @@ Query_event *proto_query_event(std::istream &is, Log_event_header *header)
|
||||
return qev;
|
||||
}
|
||||
|
||||
// Don't know better way to do this
|
||||
#define uchar unsigned char
|
||||
#define uint32 boost::uint32_t
|
||||
#define ulonglong unsigned long long
|
||||
|
||||
#define uint8korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
|
||||
(((uint32) ((uchar) (A)[1])) << 8) +\
|
||||
(((uint32) ((uchar) (A)[2])) << 16) +\
|
||||
(((uint32) ((uchar) (A)[3])) << 24)) +\
|
||||
(((ulonglong) (((uint32) ((uchar) (A)[4])) +\
|
||||
(((uint32) ((uchar) (A)[5])) << 8) +\
|
||||
(((uint32) ((uchar) (A)[6])) << 16) +\
|
||||
(((uint32) ((uchar) (A)[7])) << 24))) <<\
|
||||
32))
|
||||
|
||||
Gtid_event *proto_gtid_event(std::istream &is, Log_event_header *header)
|
||||
{
|
||||
Gtid_event *gev=new Gtid_event(header);
|
||||
@ -427,19 +442,20 @@ Gtid_event *proto_gtid_event(std::istream &is, Log_event_header *header)
|
||||
} else {
|
||||
boost::uint8_t flags=0;
|
||||
Protocol_chunk<boost::uint8_t> proto_flags(flags); // commit flag
|
||||
Protocol_chunk_string proto_sid(gev->m_mysql_gtid, 16); // encoded SID
|
||||
Protocol_chunk_string proto_sid(gev->m_mysql_gtid, 24); // encoded
|
||||
// SID
|
||||
char *sid;
|
||||
|
||||
is >> proto_flags
|
||||
>> proto_sid
|
||||
>> proto_gtid_event_sequence_number;
|
||||
is /* >> proto_flags */
|
||||
>> proto_sid;
|
||||
|
||||
sid = (char *)gev->m_mysql_gtid.c_str();
|
||||
|
||||
gev->sequence_number = uint8korr(sid+16);
|
||||
|
||||
gev->m_gtid= Gtid(gev->m_mysql_gtid, gev->sequence_number);
|
||||
}
|
||||
|
||||
fprintf(stderr, "GTID: %s \n", gev->m_gtid.get_string().c_str());
|
||||
|
||||
|
||||
|
||||
return gev;
|
||||
}
|
||||
|
||||
|
@ -221,10 +221,10 @@ version. Don't know if this is really the only way to do this, but it seems to w
|
||||
|
||||
Currently we support MariaDB and MySQL servers.
|
||||
*/
|
||||
int Binlog_tcp_driver::fetch_server_version(const std::string& user,
|
||||
const std::string& passwd,
|
||||
const std::string& host,
|
||||
long port)
|
||||
int Binlog_tcp_driver::fetch_server_version(const std::string& user,
|
||||
const std::string& passwd,
|
||||
const std::string& host,
|
||||
long port)
|
||||
{
|
||||
/* Need to serialize access to MySQL options */
|
||||
boost::mutex::scoped_lock lock(mysql_mutex);
|
||||
@ -241,6 +241,7 @@ int Binlog_tcp_driver::fetch_server_version(const std::string& user,
|
||||
|
||||
mysql_options(mysql, MYSQL_READ_DEFAULT_GROUP, "client");
|
||||
mysql_options(mysql, MYSQL_OPT_RECONNECT, &reconnect);
|
||||
mysql_options(mysql, MYSQL_OPT_USE_REMOTE_CONNECTION, NULL);
|
||||
|
||||
if ( !mysql_real_connect(mysql, host.c_str(), user.c_str(),
|
||||
passwd.c_str(), NULL, port,
|
||||
@ -249,7 +250,7 @@ int Binlog_tcp_driver::fetch_server_version(const std::string& user,
|
||||
throw(ListenerException(std::string("mysql_real_connect() failed"), __FILE__, __LINE__));
|
||||
}
|
||||
|
||||
// std::cerr << " Server " << mysql->server_version << std::endl;
|
||||
// std::cerr << " Server " << mysql->server_version << std::endl;
|
||||
|
||||
if ( strstr(mysql->server_version, "Maria") ||
|
||||
strstr(mysql->server_version, "maria"))
|
||||
@ -572,21 +573,30 @@ void Binlog_tcp_driver::start_binlog_dump(const Gtid gtid)
|
||||
|
||||
static boost::uint8_t com_binlog_dump = COM_BINLOG_DUMP_GTID;
|
||||
static boost::uint16_t binlog_flags = 0;
|
||||
static boost::uint32_t server_id = 1;
|
||||
const std::string binlog_file_name="";
|
||||
|
||||
Protocol_chunk<boost::uint8_t> prot_command(com_binlog_dump);
|
||||
Protocol_chunk<boost::uint32_t> prot_binlog_offset(offset); // binlog position to start at
|
||||
static boost::uint32_t server_id = 5;
|
||||
const std::string binlog_file_name="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
|
||||
static boost::uint64_t pos = 4;
|
||||
static boost::uint32_t binlog_name_size = 0;
|
||||
static boost::uint32_t gtid_size = 0;
|
||||
|
||||
Protocol_chunk<boost::uint8_t> prot_command(com_binlog_dump);
|
||||
Protocol_chunk<boost::uint16_t> prot_binlog_flags(binlog_flags); // not used
|
||||
Protocol_chunk<boost::uint32_t> prot_server_id(server_id); // must not be 0; see handshake package
|
||||
Protocol_chunk<boost::uint8_t> prot_gtid_size(gtid.get_mysql_gtid().size());
|
||||
Protocol_chunk<boost::uint32_t> prot_server_id(server_id); // must not be
|
||||
// 0; see
|
||||
// handshake
|
||||
// package
|
||||
Protocol_chunk<boost::uint64_t> prot_pos(pos);
|
||||
Protocol_chunk<boost::uint32_t> prot_binlog_name_size(binlog_name_size);
|
||||
gtid_size = gtid.get_mysql_gtid().size();
|
||||
Protocol_chunk<boost::uint32_t> prot_gtid_size(gtid_size);
|
||||
|
||||
command_request_stream
|
||||
<< prot_command
|
||||
<< prot_binlog_offset
|
||||
<< prot_binlog_flags
|
||||
<< prot_server_id
|
||||
<< prot_binlog_name_size
|
||||
<< binlog_file_name
|
||||
<< prot_pos
|
||||
<< prot_gtid_size
|
||||
<< gtid.get_mysql_gtid();
|
||||
|
||||
|
@ -21,8 +21,8 @@ LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
|
||||
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
|
||||
|
||||
# Find MySQL client library and header files
|
||||
find_library(MySQL_LIBRARY NAMES mysqlclient_r mysqlclient PATHS
|
||||
/usr/lib64/mysql /usr/lib/mysql)
|
||||
find_library(MySQL_LIBRARY NAMES mysqld.a PATHS
|
||||
/usr/lib64/mysql /usr/lib/mysql /usr/local/mysql/lib)
|
||||
find_path(MySQL_INCLUDE_DIR mysql.h
|
||||
/usr/local/include/mysql /usr/include/mysql)
|
||||
include_directories(${MySQL_INCLUDE_DIR})
|
||||
|
@ -1,53 +0,0 @@
|
||||
SET(CMAKE_C_COMPILER "/usr/bin/gcc")
|
||||
SET(CMAKE_C_COMPILER_ARG1 "")
|
||||
SET(CMAKE_C_COMPILER_ID "GNU")
|
||||
SET(CMAKE_C_COMPILER_VERSION "4.7.2")
|
||||
SET(CMAKE_C_PLATFORM_ID "Linux")
|
||||
|
||||
SET(CMAKE_AR "/usr/bin/ar")
|
||||
SET(CMAKE_RANLIB "/usr/bin/ranlib")
|
||||
SET(CMAKE_LINKER "/usr/bin/ld")
|
||||
SET(CMAKE_COMPILER_IS_GNUCC 1)
|
||||
SET(CMAKE_C_COMPILER_LOADED 1)
|
||||
SET(CMAKE_COMPILER_IS_MINGW )
|
||||
SET(CMAKE_COMPILER_IS_CYGWIN )
|
||||
IF(CMAKE_COMPILER_IS_CYGWIN)
|
||||
SET(CYGWIN 1)
|
||||
SET(UNIX 1)
|
||||
ENDIF(CMAKE_COMPILER_IS_CYGWIN)
|
||||
|
||||
SET(CMAKE_C_COMPILER_ENV_VAR "CC")
|
||||
|
||||
IF(CMAKE_COMPILER_IS_MINGW)
|
||||
SET(MINGW 1)
|
||||
ENDIF(CMAKE_COMPILER_IS_MINGW)
|
||||
SET(CMAKE_C_COMPILER_ID_RUN 1)
|
||||
SET(CMAKE_C_SOURCE_FILE_EXTENSIONS c)
|
||||
SET(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
||||
SET(CMAKE_C_LINKER_PREFERENCE 10)
|
||||
|
||||
# Save compiler ABI information.
|
||||
SET(CMAKE_C_SIZEOF_DATA_PTR "8")
|
||||
SET(CMAKE_C_COMPILER_ABI "ELF")
|
||||
SET(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
|
||||
|
||||
IF(CMAKE_C_SIZEOF_DATA_PTR)
|
||||
SET(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
|
||||
ENDIF(CMAKE_C_SIZEOF_DATA_PTR)
|
||||
|
||||
IF(CMAKE_C_COMPILER_ABI)
|
||||
SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
|
||||
ENDIF(CMAKE_C_COMPILER_ABI)
|
||||
|
||||
IF(CMAKE_C_LIBRARY_ARCHITECTURE)
|
||||
SET(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_C_HAS_ISYSROOT "")
|
||||
|
||||
|
||||
SET(CMAKE_C_IMPLICIT_LINK_LIBRARIES "c")
|
||||
SET(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/4.7;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib")
|
||||
|
||||
|
||||
|
@ -1,54 +0,0 @@
|
||||
SET(CMAKE_CXX_COMPILER "/usr/bin/c++")
|
||||
SET(CMAKE_CXX_COMPILER_ARG1 "")
|
||||
SET(CMAKE_CXX_COMPILER_ID "GNU")
|
||||
SET(CMAKE_CXX_COMPILER_VERSION "4.7.2")
|
||||
SET(CMAKE_CXX_PLATFORM_ID "Linux")
|
||||
|
||||
SET(CMAKE_AR "/usr/bin/ar")
|
||||
SET(CMAKE_RANLIB "/usr/bin/ranlib")
|
||||
SET(CMAKE_LINKER "/usr/bin/ld")
|
||||
SET(CMAKE_COMPILER_IS_GNUCXX 1)
|
||||
SET(CMAKE_CXX_COMPILER_LOADED 1)
|
||||
SET(CMAKE_COMPILER_IS_MINGW )
|
||||
SET(CMAKE_COMPILER_IS_CYGWIN )
|
||||
IF(CMAKE_COMPILER_IS_CYGWIN)
|
||||
SET(CYGWIN 1)
|
||||
SET(UNIX 1)
|
||||
ENDIF(CMAKE_COMPILER_IS_CYGWIN)
|
||||
|
||||
SET(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
|
||||
|
||||
IF(CMAKE_COMPILER_IS_MINGW)
|
||||
SET(MINGW 1)
|
||||
ENDIF(CMAKE_COMPILER_IS_MINGW)
|
||||
SET(CMAKE_CXX_COMPILER_ID_RUN 1)
|
||||
SET(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
||||
SET(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP)
|
||||
SET(CMAKE_CXX_LINKER_PREFERENCE 30)
|
||||
SET(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
|
||||
|
||||
# Save compiler ABI information.
|
||||
SET(CMAKE_CXX_SIZEOF_DATA_PTR "8")
|
||||
SET(CMAKE_CXX_COMPILER_ABI "ELF")
|
||||
SET(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
|
||||
|
||||
IF(CMAKE_CXX_SIZEOF_DATA_PTR)
|
||||
SET(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
|
||||
ENDIF(CMAKE_CXX_SIZEOF_DATA_PTR)
|
||||
|
||||
IF(CMAKE_CXX_COMPILER_ABI)
|
||||
SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
|
||||
ENDIF(CMAKE_CXX_COMPILER_ABI)
|
||||
|
||||
IF(CMAKE_CXX_LIBRARY_ARCHITECTURE)
|
||||
SET(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_CXX_HAS_ISYSROOT "")
|
||||
|
||||
|
||||
SET(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;c")
|
||||
SET(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/4.7;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib")
|
||||
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
|
||||
|
||||
SET(CMAKE_SYSTEM "Linux-3.5.0-28-generic")
|
||||
SET(CMAKE_SYSTEM_NAME "Linux")
|
||||
SET(CMAKE_SYSTEM_VERSION "3.5.0-28-generic")
|
||||
SET(CMAKE_SYSTEM_PROCESSOR "x86_64")
|
||||
|
||||
SET(CMAKE_HOST_SYSTEM "Linux-3.5.0-28-generic")
|
||||
SET(CMAKE_HOST_SYSTEM_NAME "Linux")
|
||||
SET(CMAKE_HOST_SYSTEM_VERSION "3.5.0-28-generic")
|
||||
SET(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
|
||||
|
||||
SET(CMAKE_CROSSCOMPILING "FALSE")
|
||||
|
||||
SET(CMAKE_SYSTEM_LOADED 1)
|
@ -17,6 +17,8 @@ errno.h
|
||||
-
|
||||
stdio.h
|
||||
-
|
||||
string.h
|
||||
-
|
||||
|
||||
/usr/local/include/table_replication_consistency.h
|
||||
|
||||
|
@ -53,15 +53,15 @@ CMakeFiles/Example.dir/Example.c.o: CMakeFiles/Example.dir/flags.make
|
||||
CMakeFiles/Example.dir/Example.c.o: Example.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /home/jan/skysql/skygateway/skygateway/table_replication_consistency/test/CMakeFiles $(CMAKE_PROGRESS_1)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object CMakeFiles/Example.dir/Example.c.o"
|
||||
/usr/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/Example.dir/Example.c.o -c /home/jan/skysql/skygateway/skygateway/table_replication_consistency/test/Example.c
|
||||
/usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/Example.dir/Example.c.o -c /home/jan/skysql/skygateway/skygateway/table_replication_consistency/test/Example.c
|
||||
|
||||
CMakeFiles/Example.dir/Example.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/Example.dir/Example.c.i"
|
||||
/usr/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /home/jan/skysql/skygateway/skygateway/table_replication_consistency/test/Example.c > CMakeFiles/Example.dir/Example.c.i
|
||||
/usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/jan/skysql/skygateway/skygateway/table_replication_consistency/test/Example.c > CMakeFiles/Example.dir/Example.c.i
|
||||
|
||||
CMakeFiles/Example.dir/Example.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/Example.dir/Example.c.s"
|
||||
/usr/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /home/jan/skysql/skygateway/skygateway/table_replication_consistency/test/Example.c -o CMakeFiles/Example.dir/Example.c.s
|
||||
/usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/jan/skysql/skygateway/skygateway/table_replication_consistency/test/Example.c -o CMakeFiles/Example.dir/Example.c.s
|
||||
|
||||
CMakeFiles/Example.dir/Example.c.o.requires:
|
||||
.PHONY : CMakeFiles/Example.dir/Example.c.o.requires
|
||||
|
@ -1,8 +1,8 @@
|
||||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
|
||||
|
||||
# compile C with /usr/bin/gcc
|
||||
C_FLAGS = -g -I/usr/local/include -I/home/jan/skysql/skygateway/skygateway/utils
|
||||
# compile C with /usr/bin/cc
|
||||
C_FLAGS = -I/usr/local/include -I/home/jan/skysql/skygateway/skygateway/utils
|
||||
|
||||
C_DEFINES =
|
||||
|
||||
|
@ -1 +1 @@
|
||||
/usr/bin/gcc -g CMakeFiles/Example.dir/Example.c.o -o Example -rdynamic -Wl,-Bstatic -ltable_replication_consistency -Wl,-Bdynamic -lreplication -lboost_system -lpthread
|
||||
/usr/bin/cc CMakeFiles/Example.dir/Example.c.o -o Example -rdynamic -Wl,-Bstatic -ltable_replication_consistency -Wl,-Bdynamic -lreplication -lboost_system -lpthread -lstdc++ -lcrypt -laio
|
||||
|
@ -21,5 +21,5 @@ include_directories(${SkySQL_INCLUDE_DIR})
|
||||
# Build rule for example
|
||||
foreach(prog Example)
|
||||
ADD_EXECUTABLE(${prog} ${prog}.c)
|
||||
TARGET_LINK_LIBRARIES(${prog} table_replication_consistency.a replication boost_system pthread)
|
||||
TARGET_LINK_LIBRARIES(${prog} table_replication_consistency.a replication boost_system pthread stdc++ crypt aio)
|
||||
endforeach()
|
||||
|
Binary file not shown.
@ -12,7 +12,7 @@ IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
ELSE(BUILD_TYPE)
|
||||
SET(CMAKE_INSTALL_CONFIG_NAME "Debug")
|
||||
SET(CMAKE_INSTALL_CONFIG_NAME "")
|
||||
ENDIF(BUILD_TYPE)
|
||||
MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
|
Reference in New Issue
Block a user