mirror of https://gitlab.com/cppit/libclangmm
18 changed files with 98 additions and 214 deletions
@ -1,13 +1,15 @@ |
|||||||
cmake_minimum_required (VERSION 2.8.4) |
cmake_minimum_required (VERSION 2.8.4) |
||||||
set(project_name clangmm) |
set(project_name clangmm) |
||||||
project(${project_name}) |
project(${project_name}) |
||||||
set(library_installation_path "/usr/local/lib/libclangmm/") |
set(library_path "/usr/local/lib/") |
||||||
|
set(include_path "/usr/local/include/") |
||||||
|
|
||||||
if(APPLE) |
if(APPLE) |
||||||
set(Boost_USE_STATIC_LIBS "YES") |
set(Boost_USE_STATIC_LIBS "YES") |
||||||
set(CMAKE_MACOSX_RPATH 1) |
set(CMAKE_MACOSX_RPATH 1) |
||||||
endif() |
endif() |
||||||
|
|
||||||
enable_testing() |
|
||||||
add_subdirectory(src) |
add_subdirectory(src) |
||||||
add_subdirectory(tests) |
|
||||||
|
# enable_testing() |
||||||
|
# add_subdirectory(tests) |
||||||
|
|||||||
@ -0,0 +1,13 @@ |
|||||||
|
# Installation guide # |
||||||
|
|
||||||
|
## Debian/Ubuntu |
||||||
|
```sh |
||||||
|
$ sudo apt-get install libclang-dev make cmake gcc |
||||||
|
``` |
||||||
|
|
||||||
|
```sh |
||||||
|
$ git clone https://github.com/cppit/libclangmm.git clangmm |
||||||
|
$ cd clangmm |
||||||
|
$ make |
||||||
|
$ sudo make install |
||||||
|
``` |
||||||
@ -0,0 +1,10 @@ |
|||||||
|
#include "Utility.h" |
||||||
|
|
||||||
|
std::string clang::to_string(CXString cx_string) { |
||||||
|
std::string string; |
||||||
|
if(cx_string.data!=NULL) { |
||||||
|
string=clang_getCString(cx_string); |
||||||
|
clang_disposeString(cx_string); |
||||||
|
} |
||||||
|
return string; |
||||||
|
} |
||||||
@ -0,0 +1,10 @@ |
|||||||
|
#ifndef UTILITY_H_ |
||||||
|
#define UTILITY_H_ |
||||||
|
#include <clang-c/Index.h> |
||||||
|
#include <string> |
||||||
|
|
||||||
|
namespace clang { |
||||||
|
std::string to_string(CXString cx_string); |
||||||
|
} |
||||||
|
|
||||||
|
#endif // UTILITY_H_
|
||||||
Loading…
Reference in new issue