Skip to content

Commit 9fb24bd

Browse files
author
clin99
committed
Add CMakefile and example folder
1 parent 3a7a008 commit 9fb24bd

3 files changed

Lines changed: 48 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
cmake_minimum_required (VERSION 3.10)
2+
MESSAGE(STATUS "CMAKE_ROOT: " ${CMAKE_ROOT})
3+
4+
# Project name
5+
project (TaskFlow)
6+
7+
# Turn on the verbose
8+
set(CMAKE_VERBOSE_MAKEFILE ON)
9+
10+
# CXX target properties
11+
set(CMAKE_C_COMPILER "gcc")
12+
set(CMAKE_CXX_COMPILER "g++")
13+
set(CMAKE_CXX_STANDARD 17)
14+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
15+
set(CMAKE_CXX_EXTENSIONS OFF)
16+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
17+
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
18+
message(STATUS "CMAKE_CXX_COMPILER: " ${CMAKE_CXX_COMPILER})
19+
message(STATUS "CMAKE_CXX_FLAGS: " ${CMAKE_CXX_FLAGS})
20+
21+
# The version number
22+
set (TASKFLOW_MAJOR_VERSION "0")
23+
set (TASKFLOW_MINOR_VERSION "1")
24+
25+
26+
# add the binayr tree to the search path for include files so we can find TutorialConfig.h
27+
include_directories("${PROJECT_SOURCE_DIR}")
28+
29+
30+
31+
# Find package
32+
#set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
33+
find_package(Threads REQUIRED)
34+
MESSAGE(STATUS "CMAKE_THREAD_LIBS_INIT: " ${CMAKE_THREAD_LIBS_INIT})
35+
36+
# Example program
37+
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/example)
38+
add_executable(simple example/simple.cpp)
39+
target_link_libraries(simple ${CMAKE_THREAD_LIBS_INIT})
40+
41+

example/simple

8.54 KB
Binary file not shown.

example/simple.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include <iostream>
2+
#include <taskflow.hpp>
3+
4+
int main(){
5+
6+
}
7+

0 commit comments

Comments
 (0)