building driver 2.5 without using cmake on rhel 7.1

24 views
Skip to first unread message

Ganesh M

unread,
Dec 21, 2016, 6:14:50 AM12/21/16
to DataStax C++ Driver for Apache Cassandra User Mailing List
Hi,
Do we really need cmake to build the driver?


I was able to build driver version 2.4.2 and above without using cmake.
But now I think some config files are added which will generate some header files and I am not sure if we can do this without using cmake.

Please someone help with the steps to follow to build the driver on rhel 7 without using cmake.


Thanks
Ganesh

Michael Fero

unread,
Dec 21, 2016, 8:51:04 AM12/21/16
to DataStax C++ Driver for Apache Cassandra User Mailing List
Ganesh,

Compiling without CMake is not recommended, but there is definitely nothing stopping you from doing so to fit the needs of your application (e.g. bundling it in within your own application). The only generated file is cassconfig.hpp.in (https://github.com/datastax/cpp-driver/blob/master/cassconfig.hpp.in) which gets generated during the CMake configuration process here (https://github.com/datastax/cpp-driver/blob/master/cmake/modules/CppDriver.cmake#L505).

Below is an example file that was generated for a driver that is configured with OpenSSL, use of std::atomic library, and has the ability to use sigtimedwait() [signal.h]:

#ifndef __CASSANDRA_CONFIG_HPP_INCLUDED__
#define __CASSANDRA_CONFIG_HPP_INCLUDED__

#define HAVE_OPENSSL
#define HAVE_STD_ATOMIC
/* #undef HAVE_BOOST_ATOMIC */
/* #undef HAVE_NOSIGPIPE */
#define HAVE_SIGTIMEDWAIT

#endif

~Fero

Ganesh M

unread,
Dec 22, 2016, 2:01:26 AM12/22/16
to DataStax C++ Driver for Apache Cassandra User Mailing List

Hi Fero,

Thanks for the suggestion.
As per your suggestion I manually created cassconfig.hpp under cpp-driver/src/ and started compiling code but I am getting below compilation error:

./src/third_party/sparsehash/src/sparsehash/dense_hash_set:103:46: fatal error: sparsehash/internal/sparseconfig.h: No such file or directory

I am not sure if sparseconfig.h is also an autogenerated file because I couldn't find this file in the repository

Reply all
Reply to author
Forward
0 new messages