Skip to content
Snippets Groups Projects
Commit 17470a57 authored by Adam Radziszewski's avatar Adam Radziszewski
Browse files

fix build for version info

parent 55288146
No related branches found
No related tags found
No related merge requests found
...@@ -4,10 +4,6 @@ set(corpus2_ver_major "1") ...@@ -4,10 +4,6 @@ set(corpus2_ver_major "1")
set(corpus2_ver_minor "0") set(corpus2_ver_minor "0")
set(corpus2_ver_patch "12") set(corpus2_ver_patch "12")
add_definitions(-DLIBCORPUS2_VERSION_MAJOR=${corpus2_ver_major})
add_definitions(-DLIBCORPUS2_VERSION_MINOR=${corpus2_ver_minor})
add_definitions(-DLIBCORPUS2_VERSION_PATCH=${corpus2_ver_patch})
cmake_minimum_required(VERSION 2.8.0) cmake_minimum_required(VERSION 2.8.0)
# use some of our own Find* scripts # use some of our own Find* scripts
......
...@@ -8,6 +8,7 @@ if (Libedit_FOUND) ...@@ -8,6 +8,7 @@ if (Libedit_FOUND)
endif (Libedit_FOUND) endif (Libedit_FOUND)
include_directories( ${CMAKE_SOURCE_DIR} ) include_directories( ${CMAKE_SOURCE_DIR} )
include_directories(${corpus2_BINARY_DIR}/include)
add_executable( tagset-tool tagset-tool.cpp ) add_executable( tagset-tool tagset-tool.cpp )
target_link_libraries ( tagset-tool corpus2 pwrutils ${Boost_LIBRARIES} ${LIBS}) target_link_libraries ( tagset-tool corpus2 pwrutils ${Boost_LIBRARIES} ${LIBS})
......
...@@ -32,6 +32,13 @@ or FITNESS FOR A PARTICULAR PURPOSE. ...@@ -32,6 +32,13 @@ or FITNESS FOR A PARTICULAR PURPOSE.
#include <histedit.h> #include <histedit.h>
#endif #endif
#ifdef HAVE_CONFIG_D_H
#include <libcorpus2/config_d.h>
#endif
// not checking for HAVE_VERSION, there is no reason it shouldn't be there
#include <libcorpus2/version.h>
namespace { namespace {
const char* _prompt = "> "; const char* _prompt = "> ";
} }
...@@ -246,7 +253,7 @@ int main(int argc, char** argv) ...@@ -246,7 +253,7 @@ int main(int argc, char** argv)
return 1; return 1;
} }
if (vm.count("version")) { if (vm.count("version")) {
std::cout << "tagset-tool (libcorpus2) " << Corpus2::version_string() << "\n"; std::cout << "tagset-tool (libcorpus2) " << LIBCORPUS2_VERSION << "\n";
return 0; return 0;
} }
......
...@@ -28,13 +28,6 @@ or FITNESS FOR A PARTICULAR PURPOSE. ...@@ -28,13 +28,6 @@ or FITNESS FOR A PARTICULAR PURPOSE.
namespace Corpus2 { namespace Corpus2 {
const std::string version_string()
{
std::stringstream version;
version << version_major << "." << version_minor << "." << version_patch;
return version.str();
}
Corpus2PathSearcher::Corpus2PathSearcher() Corpus2PathSearcher::Corpus2PathSearcher()
: PwrNlp::PathSearcher<FileNotFound>(LIBCORPUS2_PATH_SEPARATOR) : PwrNlp::PathSearcher<FileNotFound>(LIBCORPUS2_PATH_SEPARATOR)
{ {
......
...@@ -23,12 +23,6 @@ or FITNESS FOR A PARTICULAR PURPOSE. ...@@ -23,12 +23,6 @@ or FITNESS FOR A PARTICULAR PURPOSE.
namespace Corpus2 { namespace Corpus2 {
const int version_major = (LIBCORPUS2_VERSION_MAJOR);
const int version_minor = (LIBCORPUS2_VERSION_MINOR);
const int version_patch = (LIBCORPUS2_VERSION_PATCH);
const std::string version_string();
class Corpus2PathSearcher : public PwrNlp::PathSearcher<FileNotFound> class Corpus2PathSearcher : public PwrNlp::PathSearcher<FileNotFound>
{ {
public: public:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment