annotate src/parallel_execution/CMakeLists.txt @ 198:4051c012dec3

cmake macro
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Dec 2016 21:48:40 +0900
parents 6ab77dec8b6a
children 9c85c3a34726
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
6ab77dec8b6a add command execution in CMakeList.txt
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
9 add_custom_command (
6ab77dec8b6a add command execution in CMakeList.txt
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
10 OUTPUT c/enumCode.h
6ab77dec8b6a add command execution in CMakeList.txt
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
11 COMMAND "perl" "generate_context.pl"
6ab77dec8b6a add command execution in CMakeList.txt
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
12 )
6ab77dec8b6a add command execution in CMakeList.txt
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
13
198
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
14 macro( GearsCommand )
188
6ab77dec8b6a add command execution in CMakeList.txt
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
15
198
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
16 set( _OPTIONS_ARGS )
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
17 set( _ONE_VALUE_ARGS TARGET )
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
18 set( _MULTI_VALUE_ARGS SOURCES )
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
19
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
20 cmake_parse_arguments( _Gears "${_OPTIONS_ARGS}" "${_ONE_VALUE_ARGS}" "${_MULTI_VALUE_ARGS}" ${ARGN} )
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
21
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
22 # message("target = ${_Gears_TARGET}")
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
23 # message("sources = ${_Gears_SOURCES}")
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
24
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
25 add_executable(${_Gears_TARGET} ${_Gears_SOURCES})
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
26 endmacro()
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
27
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
28 GearsCommand(
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
29 TARGET
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
30 twice
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
31 SOURCES
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
32 main.c
4051c012dec3 cmake macro
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 188
diff changeset
33 context.c rb_tree.c stack.c origin_cs.c allocate.c compare.c worker.c dependency.c time.c twice.c c/enumCode.h
86
e06e1a9e569e create worker
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 )
e06e1a9e569e create worker
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35