Skip to content

Instantly share code, notes, and snippets.

@AALEKH
Created July 19, 2016 10:26
Show Gist options
  • Select an option

  • Save AALEKH/a7fd5a7a226ac144dd0d5654213605d1 to your computer and use it in GitHub Desktop.

Select an option

Save AALEKH/a7fd5a7a226ac144dd0d5654213605d1 to your computer and use it in GitHub Desktop.
original cmake
cmake_minimum_required(VERSION 3.0)
2 project(hpxflowproject)
3
4 ###############################################################################
5 ## file globbing ##############################################################
6 ###############################################################################
7
8 file( GLOB_RECURSE sources ../src/algorithm/*.cpp ../src/algorithm/*.h )
9 file( GLOB_RECURSE sources_t ../src/core_layer/*.cpp ../src/core_layer/*.h )
10 file( GLOB_RECURSE sources_f ../src/dataflow/*.cpp ../src/dataflow/*.h )
11 file( GLOB_RECURSE sources_s ../src/pipeline/*.cpp ../src/pipeline/*.h )
12
13 ###############################################################################
14 ## target definitions #########################################################
15 ###############################################################################
16
17 add_library(libhpxflow ${sources} ${sources_t} ${sources_f} ${sources_s})
18
19 target_compile_options(libhpxflow PUBLIC -std=c++11 -Wall -Wfloat-conversion)
20
21 target_include_directories( libhpxflow PUBLIC src/algorithm )
22 target_include_directories( libhpxflow PUBLIC src/core_layer )
23 target_include_directories( libhpxflow PUBLIC src/dataflow )
24 target_include_directories( libhpxflow PUBLIC src/pipeline )
25
26
27 ###############################################################################
28 ## dependencies ###############################################################
29 ###############################################################################
30
31 find_package(Boost 1.58.0 COMPONENTS filesystem system REQUIRED)
32
33 target_link_libraries(libhpxflow PUBLIC
34 ${Boost_LIBRARIES}
35 )
36
37 include_directories(${Boost_INCLUDE_DIRS})
38
39 ##############################################################################3
40 # Building examples ###########################################################
41 ###############################################################################
42
43 add_subdirectory(examples)
44
45
46 ###############################################################################
47 ## packaging ##################################################################
48 ###############################################################################
49
50 install(TARGETS libhpxflow DESTINATION hpx_flow_destination)
51
52 install(DIRECTORY resources DESTINATION hpx_flow_destination)
53
54
55 set(CPACK_PACKAGE_NAME "hpx_flow")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment