annotate src/parallel_execution/CMakeLists.txt @ 257:cd3486e4ba70

fix make error of twice
author mir3636
date Fri, 27 Jan 2017 21:20:07 +0900
parents d2f5d6fc56fa
children 195518ab62fc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
86
e06e1a9e569e create worker
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 cmake_minimum_required(VERSION 2.8)
e06e1a9e569e create worker
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
101
8987cf13d5bb Add Allocate macro
innparusu
parents: 98
diff changeset
3 # -DUSE_CUDA
138
04a2f486a30d insert works but is not balanced
kono
parents: 137
diff changeset
4 # add_definitions("-Wall -g -O")
137
909d0548284f fix stackClear
mir3636
parents: 131
diff changeset
5 add_definitions("-Wall -g")
86
e06e1a9e569e create worker
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6
131
a4507906938c Fix compile error but not work
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 117
diff changeset
7 set(CMAKE_C_COMPILER $ENV{CBC_COMPILER})
188
6ab77dec8b6a add command execution in CMakeList.txt
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
8
198
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
9 macro( GearsCommand )
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
10 set( _OPTIONS_ARGS )
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
11 set( _ONE_VALUE_ARGS TARGET )
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
12 set( _MULTI_VALUE_ARGS SOURCES )
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
13 cmake_parse_arguments( _Gears "${_OPTIONS_ARGS}" "${_ONE_VALUE_ARGS}" "${_MULTI_VALUE_ARGS}" ${ARGN} )
255
79bbe2c63fb0 cmake generate c from cbc
mir3636
parents: 218
diff changeset
14
256
d2f5d6fc56fa fix cmake file
mir3636
parents: 255
diff changeset
15 set (_Gears_CSOURCES)
d2f5d6fc56fa fix cmake file
mir3636
parents: 255
diff changeset
16 foreach(i ${_Gears_SOURCES})
d2f5d6fc56fa fix cmake file
mir3636
parents: 255
diff changeset
17 if (${i} MATCHES "\\.cbc")
d2f5d6fc56fa fix cmake file
mir3636
parents: 255
diff changeset
18 string(REGEX REPLACE "(.*).cbc" "c/\\1.c" j ${i})
d2f5d6fc56fa fix cmake file
mir3636
parents: 255
diff changeset
19 add_custom_command (
d2f5d6fc56fa fix cmake file
mir3636
parents: 255
diff changeset
20 OUTPUT ${j}
d2f5d6fc56fa fix cmake file
mir3636
parents: 255
diff changeset
21 DEPENDS ${i}
d2f5d6fc56fa fix cmake file
mir3636
parents: 255
diff changeset
22 COMMAND "perl" "generate_stub.pl" "-o" ${j} ${i}
d2f5d6fc56fa fix cmake file
mir3636
parents: 255
diff changeset
23 )
d2f5d6fc56fa fix cmake file
mir3636
parents: 255
diff changeset
24 else(${i} MATCHES "\\.cbc")
d2f5d6fc56fa fix cmake file
mir3636
parents: 255
diff changeset
25 set(j ${i})
d2f5d6fc56fa fix cmake file
mir3636
parents: 255
diff changeset
26 endif(${i} MATCHES "\\.cbc")
d2f5d6fc56fa fix cmake file
mir3636
parents: 255
diff changeset
27 list(APPEND _Gears_CSOURCES ${j})
d2f5d6fc56fa fix cmake file
mir3636
parents: 255
diff changeset
28 endforeach(i)
d2f5d6fc56fa fix cmake file
mir3636
parents: 255
diff changeset
29
210
ba56dab79dc4 separate code init for each executable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 208
diff changeset
30 add_custom_command (
ba56dab79dc4 separate code init for each executable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 208
diff changeset
31 OUTPUT c/${_Gears_TARGET}-context.c
256
d2f5d6fc56fa fix cmake file
mir3636
parents: 255
diff changeset
32 DEPENDS ${_Gears_CSOURCES}
255
79bbe2c63fb0 cmake generate c from cbc
mir3636
parents: 218
diff changeset
33 COMMAND "perl" "generate_context.pl" "-o" ${_Gears_TARGET} ${_Gears_CSOURCES}
210
ba56dab79dc4 separate code init for each executable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 208
diff changeset
34 )
255
79bbe2c63fb0 cmake generate c from cbc
mir3636
parents: 218
diff changeset
35 add_executable(${_Gears_TARGET} ${_Gears_CSOURCES} c/${_Gears_TARGET}-context.c)
198
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
36 endmacro()
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
37
210
ba56dab79dc4 separate code init for each executable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 208
diff changeset
38
198
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
39 GearsCommand(
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
40 TARGET
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
41 twice
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
42 SOURCES
218
d8a59b727f65 Fix spawnTaskManager
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 211
diff changeset
43 main.c rb_tree.c stack.c origin_cs.c allocate.c compare.c worker.c dependency.c time.c twice.c taskManager.c queue.c
86
e06e1a9e569e create worker
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 )
e06e1a9e569e create worker
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45
202
42dbe54332a0 add test
mir3636
parents: 199
diff changeset
46 GearsCommand(
42dbe54332a0 add test
mir3636
parents: 199
diff changeset
47 TARGET
210
ba56dab79dc4 separate code init for each executable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 208
diff changeset
48 stack_test
202
42dbe54332a0 add test
mir3636
parents: 199
diff changeset
49 SOURCES
211
962fbfe777bb temporarily change to createWorker1
mir3636
parents: 210
diff changeset
50 origin_cs.c test/stack_test.c stack.c
202
42dbe54332a0 add test
mir3636
parents: 199
diff changeset
51 )
42dbe54332a0 add test
mir3636
parents: 199
diff changeset
52
42dbe54332a0 add test
mir3636
parents: 199
diff changeset
53 GearsCommand(
42dbe54332a0 add test
mir3636
parents: 199
diff changeset
54 TARGET
210
ba56dab79dc4 separate code init for each executable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 208
diff changeset
55 queue_test
202
42dbe54332a0 add test
mir3636
parents: 199
diff changeset
56 SOURCES
211
962fbfe777bb temporarily change to createWorker1
mir3636
parents: 210
diff changeset
57 origin_cs.c test/queue_test.c queue.c
203
25db17f32ac2 replace Stack for stack
ikkun
parents: 202
diff changeset
58 )
255
79bbe2c63fb0 cmake generate c from cbc
mir3636
parents: 218
diff changeset
59
79bbe2c63fb0 cmake generate c from cbc
mir3636
parents: 218
diff changeset
60 GearsCommand(
79bbe2c63fb0 cmake generate c from cbc
mir3636
parents: 218
diff changeset
61 TARGET
79bbe2c63fb0 cmake generate c from cbc
mir3636
parents: 218
diff changeset
62 cbc_stack_test
79bbe2c63fb0 cmake generate c from cbc
mir3636
parents: 218
diff changeset
63 SOURCES
79bbe2c63fb0 cmake generate c from cbc
mir3636
parents: 218
diff changeset
64 origin_cs.c test/stack_test.c SingleLinkedStack.cbc
79bbe2c63fb0 cmake generate c from cbc
mir3636
parents: 218
diff changeset
65 )
79bbe2c63fb0 cmake generate c from cbc
mir3636
parents: 218
diff changeset
66