blob: f2f73780e39c76b872893a7b4f671d4926ff0a25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
cmake_minimum_required(VERSION 2.8)
project(chill)
set(CHILL_VERSION 0.2.1) # 2.8 doesn't support project version clause
if(NOT DEFINED ROSEHOME)
message( FATAL_ERROR "ROSEHOME is not set, try use -DROSEHOME" )
endif()
if (NOT DEFINED BOOSTHOME)
message( FATAL_ERROR "BOOSTHOME is not set, try use -DBOOSTHOME" )
endif()
find_package(PythonLibs 2.7 REQUIRED)
string(TIMESTAMP build_date "\\\"%m/%d/%Y\\\"")
set(CORE_LIBS
m rose rt util omega codegen rosecg dl parseRel
boost_date_time boost_filesystem boost_program_options
boost_regex boost_system boost_wave boost_iostreams)
set(CORE_SRC
src/dep.cc
src/irtools.cc
src/loop.cc
src/loop_basic.cc
src/loop_datacopy.cc
src/loop_extra.cc
src/loop_tile.cc
src/loop_unroll.cc
src/omegatools.cc
)
set(IR_CHILL_SRC
src/ir_rose.cc
src/ir_rose_utils.cc
)
set(PYTHON_SRC
src/chill_run.cc
src/chillmodule.cc
)
set(COMMON_FLAGS "-DCHILL_BUILD_DATE=\"${build_date}\" -DCHILL_BUILD_VERSION=\"\\\"${CHILL_VERSION}\\\"\"")
set(CMAKE_CXX_FLAGS "${COMMON_FLAGS} ${CMAKE_CXX_FLAGS}")
if (DEFINED OMEGAHOME)
link_directories(${OMEGAHOME}/lib)
set(OMEGA_INC ${OMEGAHOME}/include)
else()
set(OMEGA_INC
${CMAKE_CURRENT_SOURCE_DIR}/lib/omega/include
${CMAKE_CURRENT_SOURCE_DIR}/lib/parserel/include
${CMAKE_CURRENT_SOURCE_DIR}/lib/codegen/include
)
endif()
link_directories(${ROSEHOME}/lib ${BOOSTOME}/lib)
include_directories(
include
lib/rosecg/include
${OMEGA_INC}
${ROSEHOME}/include
${ROSEHOME}/include/rose
${BOOSTHOME}/include
${PYTHON_INCLUDE_DIRS})
add_executable(chill ${CORE_SRC} ${PYTHON_SRC} ${IR_CHILL_SRC})
target_link_libraries(chill ${CORE_LIBS} ${PYTHON_LIBRARY})
add_dependencies(chill omega codegen rosecg parseRel)
install(TARGETS chill
RUNTIME DESTINATION bin)
add_subdirectory(lib/omega)
add_subdirectory(lib/codegen)
add_subdirectory(lib/rosecg)
add_subdirectory(lib/parserel)
add_subdirectory(doc)
|