Skip to content

Commit 387e9bf

Browse files
committed
Add a sample (simple?) CMake project
1 parent 98495f0 commit 387e9bf

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
cmake_minimum_required(VERSION 3.10)
2+
project(clang_bind_test VERSION 0.0.1 LANGUAGES CXX)
3+
4+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
5+
6+
add_library(simple src/simple.cpp)
7+
target_include_directories(simple PUBLIC
8+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/>
9+
$<INSTALL_INTERFACE:include/>
10+
)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#pragma once
2+
3+
namespace simple {
4+
int add(int a, int b);
5+
} // namespace simple
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#include <clang_bind_test/function.hpp>
2+
3+
namespace simple {
4+
int add(int a, int b) { return a + b; }
5+
} // namespace simple

0 commit comments

Comments
 (0)