comparison 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
comparison
equal deleted inserted replaced
197:de7c0bbfc91f 198:4051c012dec3
3 # -DUSE_CUDA 3 # -DUSE_CUDA
4 # add_definitions("-Wall -g -O") 4 # add_definitions("-Wall -g -O")
5 add_definitions("-Wall -g") 5 add_definitions("-Wall -g")
6 6
7 set(CMAKE_C_COMPILER $ENV{CBC_COMPILER}) 7 set(CMAKE_C_COMPILER $ENV{CBC_COMPILER})
8
9 8
10 add_custom_command ( 9 add_custom_command (
11 OUTPUT c/enumCode.h 10 OUTPUT c/enumCode.h
12 COMMAND "perl" "generate_context.pl" 11 COMMAND "perl" "generate_context.pl"
13 ) 12 )
14 13
14 macro( GearsCommand )
15 15
16 add_executable(twice 16 set( _OPTIONS_ARGS )
17 main.c 17 set( _ONE_VALUE_ARGS TARGET )
18 context.c 18 set( _MULTI_VALUE_ARGS SOURCES )
19 rb_tree.c 19
20 stack.c 20 cmake_parse_arguments( _Gears "${_OPTIONS_ARGS}" "${_ONE_VALUE_ARGS}" "${_MULTI_VALUE_ARGS}" ${ARGN} )
21 origin_cs.c 21
22 allocate.c 22 # message("target = ${_Gears_TARGET}")
23 compare.c 23 # message("sources = ${_Gears_SOURCES}")
24 worker.c 24
25 dependency.c 25 add_executable(${_Gears_TARGET} ${_Gears_SOURCES})
26 time.c 26 endmacro()
27 twice.c 27
28 c/enumCode.h 28 GearsCommand(
29 TARGET
30 twice
31 SOURCES
32 main.c
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
29 ) 34 )
30 35