Mercurial > hg > Gears > GearsAgda
annotate src/parallel_execution/CMakeLists.txt @ 255:79bbe2c63fb0
cmake generate c from cbc
author | mir3636 |
---|---|
date | Fri, 27 Jan 2017 18:24:15 +0900 |
parents | d8a59b727f65 |
children | d2f5d6fc56fa |
rev | line source |
---|---|
86 | 1 cmake_minimum_required(VERSION 2.8) |
2 | |
101 | 3 # -DUSE_CUDA |
138 | 4 # add_definitions("-Wall -g -O") |
137 | 5 add_definitions("-Wall -g") |
86 | 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 | 9 macro( GearsCommand ) |
10 set( _OPTIONS_ARGS ) | |
11 set( _ONE_VALUE_ARGS TARGET ) | |
12 set( _MULTI_VALUE_ARGS SOURCES ) | |
13 cmake_parse_arguments( _Gears "${_OPTIONS_ARGS}" "${_ONE_VALUE_ARGS}" "${_MULTI_VALUE_ARGS}" ${ARGN} ) | |
255 | 14 |
15 set(_Gear_CSOURCES string(REGEX REPLACE "([^ ]*)\\.cbc" "c/\\1.c" ${_Gears_SOURCES})) | |
16 | |
210
ba56dab79dc4
separate code init for each executable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
208
diff
changeset
|
17 add_custom_command ( |
ba56dab79dc4
separate code init for each executable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
208
diff
changeset
|
18 OUTPUT c/${_Gears_TARGET}-context.c |
255 | 19 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
|
20 ) |
255 | 21 add_custom_command ( |
22 DEPENDS ${_Gears_SOURCES} | |
23 OUTPUT ${_Gears_CSOURCES} | |
24 COMMAND "perl" "generate_stub.pl" "-d" "-c" ${_Gears_SOURCES} | |
25 ) | |
26 add_executable(${_Gears_TARGET} ${_Gears_CSOURCES} c/${_Gears_TARGET}-context.c) | |
198 | 27 endmacro() |
28 | |
210
ba56dab79dc4
separate code init for each executable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
208
diff
changeset
|
29 |
198 | 30 GearsCommand( |
31 TARGET | |
32 twice | |
33 SOURCES | |
218
d8a59b727f65
Fix spawnTaskManager
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
211
diff
changeset
|
34 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 | 35 ) |
36 | |
202 | 37 GearsCommand( |
38 TARGET | |
210
ba56dab79dc4
separate code init for each executable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
208
diff
changeset
|
39 stack_test |
202 | 40 SOURCES |
211 | 41 origin_cs.c test/stack_test.c stack.c |
202 | 42 ) |
43 | |
44 GearsCommand( | |
45 TARGET | |
210
ba56dab79dc4
separate code init for each executable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
208
diff
changeset
|
46 queue_test |
202 | 47 SOURCES |
211 | 48 origin_cs.c test/queue_test.c queue.c |
203 | 49 ) |
255 | 50 |
51 GearsCommand( | |
52 TARGET | |
53 cbc_stack_test | |
54 SOURCES | |
55 origin_cs.c test/stack_test.c SingleLinkedStack.cbc | |
56 ) | |
57 |