Skip to content

Commit 45840c1

Browse files
committed
Added CMake files
1 parent d261a33 commit 45840c1

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
testapp
22
testapp-clang
33

4+
build
5+
46
# Prerequisites
57
*.d
68

CMakeLists.txt

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
cmake_minimum_required(VERSION 3.10)
2+
3+
set(CMAKE_CXX_STANDARD 14)
4+
set(CMAKE_CXX_STANDARD_REQUIRED True)
5+
6+
# set the project name
7+
project(Tutorial)
8+
9+
add_subdirectory(lib)
10+
11+
# add the executable
12+
add_executable(TestApp testapp.cpp)
13+
14+
target_link_libraries(TestApp PUBLIC TestLib)

lib/CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
set(CMAKE_CXX_STANDARD 11)
3+
set(CMAKE_CXX_STANDARD_REQUIRED True)
4+
5+
# add the executable
6+
add_library(TestLib SHARED Test.cpp)

0 commit comments

Comments
 (0)