view src/parallel_execution/CMakeLists.txt @ 203:25db17f32ac2

replace Stack for stack
author ikkun
date Mon, 19 Dec 2016 22:23:37 +0900
parents 42dbe54332a0
children 1b15f02ec713
line wrap: on
line source

cmake_minimum_required(VERSION 2.8)

# -DUSE_CUDA
#  add_definitions("-Wall -g -O")
add_definitions("-Wall -g")

set(CMAKE_C_COMPILER $ENV{CBC_COMPILER})
 
add_custom_command (
      OUTPUT    c/enumCode.h
      COMMAND  "perl" "generate_context.pl" 
)

macro( GearsCommand )
    set( _OPTIONS_ARGS )
    set( _ONE_VALUE_ARGS TARGET )
    set( _MULTI_VALUE_ARGS SOURCES )
    cmake_parse_arguments( _Gears "${_OPTIONS_ARGS}" "${_ONE_VALUE_ARGS}" "${_MULTI_VALUE_ARGS}" ${ARGN} )
    add_executable(${_Gears_TARGET} ${_Gears_SOURCES} context.c c/enumCode.h )
endmacro()

GearsCommand(
  TARGET
      twice
  SOURCES 
      main.c rb_tree.c stack.c origin_cs.c allocate.c compare.c worker.c dependency.c time.c twice.c 
)

GearsCommand(
  TARGET
      test/stack_test
  SOURCES 
      test/stack_test.c stack.c
)

GearsCommand(
  TARGET
      test/queue_test
  SOURCES 
      test/queue_test.c queue.c
)