Skip to content

Commit 56efc10

Browse files
author
Andrii Verbytskyi
committed
Merge branch 'version' of github.com:andriish/binder into version
2 parents a8c1051 + 4622919 commit 56efc10

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#This file can be used to build binder using preinstalled LLVM/Clang
22
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
33
PROJECT(binder CXX C)
4-
SET(VERSION 1.3.1)
4+
SET(VERSION 1.4.1)
55
option(STATIC "Statically compile Binder. See `documentation/install.rst` for more information." OFF)
66
set(CMAKE_VERBOSE_MAKEFILE ON)
77
#So far there are exceptions in config.cpp

source/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <enum.hpp>
3030
#include <function.hpp>
3131
#include <options.hpp>
32+
#include <iostream>
3233

3334
using namespace clang::tooling;
3435
using namespace llvm;
@@ -223,7 +224,11 @@ class BinderFrontendAction : public ASTFrontendAction
223224

224225
int main(int argc, const char **argv)
225226
{
227+
#if( LLVM_VERSION_MAJOR < 6 )
228+
llvm::cl::SetVersionPrinter([]() { std::cout<< "binder " << BINDER_VERSION_STRING << "\nLLVM " << LLVM_VERSION_MAJOR << "." << LLVM_VERSION_MINOR << "." << LLVM_VERSION_PATCH << "\n"; });
229+
#else
226230
llvm::cl::SetVersionPrinter([](llvm::raw_ostream &OS) { OS << "binder " << BINDER_VERSION_STRING << "\nLLVM " << LLVM_VERSION_MAJOR << "." << LLVM_VERSION_MINOR << "." << LLVM_VERSION_PATCH << "\n"; });
231+
#endif
227232
#if( LLVM_VERSION_MAJOR < 13 )
228233
CommonOptionsParser op(argc, argv, BinderToolCategory);
229234
ClangTool tool(op.getCompilations(), op.getSourcePathList());

0 commit comments

Comments
 (0)