Mercurial > hg > Gears > GearsAgda
annotate src/parallel_execution/CMakeLists.txt @ 278:23767f714f4a
fix generate_stub
author | mir3636 |
---|---|
date | Thu, 02 Feb 2017 20:27:56 +0900 |
parents | b6ed4b2a5d9d |
children | 2c2e4e597eb0 |
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 |
256 | 15 set (_Gears_CSOURCES) |
16 foreach(i ${_Gears_SOURCES}) | |
17 if (${i} MATCHES "\\.cbc") | |
18 string(REGEX REPLACE "(.*).cbc" "c/\\1.c" j ${i}) | |
19 add_custom_command ( | |
20 OUTPUT ${j} | |
259
195518ab62fc
fix type gathering pattern match in generate_stub.pl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
257
diff
changeset
|
21 DEPENDS ${i} |
256 | 22 COMMAND "perl" "generate_stub.pl" "-o" ${j} ${i} |
23 ) | |
270 | 24 else() |
256 | 25 set(j ${i}) |
270 | 26 endif() |
256 | 27 list(APPEND _Gears_CSOURCES ${j}) |
28 endforeach(i) | |
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 | 32 DEPENDS ${_Gears_CSOURCES} |
255 | 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 | 35 add_executable(${_Gears_TARGET} ${_Gears_CSOURCES} c/${_Gears_TARGET}-context.c) |
198 | 36 endmacro() |
37 | |
210
ba56dab79dc4
separate code init for each executable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
208
diff
changeset
|
38 |
198 | 39 GearsCommand( |
40 TARGET | |
41 twice | |
42 SOURCES | |
278 | 43 main.cbc RedBlackTree.cbc SingleLinkedStack.cbc CPUWorker.cbc time.cbc twice.cbc TaskManagerImpl.cbc SingleLinkedQueue.cbc SynchronizedQueue.cbc |
44 ) | |
45 | |
46 GearsCommand( | |
47 TARGET | |
48 queue_test | |
49 SOURCES | |
50 test/queue_test.c SingleLinkedQueue.cbc | |
86 | 51 ) |
52 | |
202 | 53 GearsCommand( |
54 TARGET | |
210
ba56dab79dc4
separate code init for each executable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
208
diff
changeset
|
55 stack_test |
202 | 56 SOURCES |
278 | 57 test/stack_test.c SingleLinkedStack.cbc |
202 | 58 ) |
59 |