source: icGREP/icgrep-devel/icgrep/CMakeLists.txt @ 3911

Last change on this file since 3911 was 3850, checked in by cameron, 5 years ago

icgrep-0.8 distribution

File size: 2.1 KB
Line 
1cmake_minimum_required (VERSION 2.8)
2
3project (icgrep)
4
5# The version number.
6set (icgrep_VERSION_MAJOR 0)
7set (icgrep_VERSION_MINOR 8)
8 
9# configure a header file to pass some of the CMake settings
10# to the source code
11#configure_file (
12#  "${PROJECT_SOURCE_DIR}/icgrepconfig.h.in"
13#  "${PROJECT_BINARY_DIR}/icgrepconfig.h"
14#  )
15
16# LLVM set up
17#
18# A convenience variable:
19set(LLVM_ROOT "../libllvm" CACHE PATH "Root of LLVM install.")
20
21# A bit of a sanity check:
22if( NOT EXISTS ${LLVM_ROOT}/include/llvm )
23message(FATAL_ERROR "LLVM_ROOT (${LLVM_ROOT}) is not a valid LLVM install")
24endif()
25
26# We incorporate the CMake features provided by LLVM:
27set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${LLVM_ROOT}/share/llvm/cmake")
28include(LLVMConfig)
29
30# Now set the header and library paths:
31include_directories( ${LLVM_INCLUDE_DIRS} )
32link_directories( ${LLVM_LIBRARY_DIRS} )
33add_definitions( ${LLVM_DEFINITIONS} )
34
35# Let's suppose we want to build a JIT compiler with support for
36# binary code (no interpreter):
37llvm_map_components_to_libraries(REQ_LLVM_LIBRARIES mcjit native)
38
39 
40add_library(PabloADT pe_advance.cpp  pe_all.cpp  pe_and.cpp  pe_charclass.cpp  pe_matchstar.cpp  pe_not.cpp  pe_or.cpp  pe_pabloe.cpp  pe_sel.cpp  pe_var.cpp  pe_xor.cpp ps_assign.cpp  ps_if.cpp  ps_pablos.cpp  ps_while.cpp printer_pablos.cpp)
41
42add_library(RegExpADT re_alt.cpp  re_cc.cpp  re_end.cpp  re_parser.cpp  re_re.cpp  re_rep.cpp  re_seq.cpp  re_start.cpp  rl_replimit.cpp  rl_unbounded.cpp  rl_upperbound.cpp parsefailure.cpp  parseresult.cpp  parsesuccess.cpp printer_re.cpp)
43
44
45#include_directories("${PROJECT_BINARY_DIR}")
46include_directories("${PROJECT_SOURCE_DIR}")
47include_directories("${PROJECT_SOURCE_DIR}/include")
48include_directories("${PROJECT_SOURCE_DIR}/include/simd-lib")
49include_directories("${PROJECT_SOURCE_DIR}/include/simd-lib/idisa_cpp")
50 
51# add the executable
52add_executable(icgrep icgrep.cpp llvm_gen.cpp  llvm_gen_helper.cpp utf_encoding.cpp cc_codegenobject.cpp  cc_compiler.cpp  cc_compiler_helper.cpp re_compiler.cpp pbix_compiler.cpp  symbol_generator.cpp utf8_encoder.cpp)
53
54target_link_libraries (icgrep PabloADT RegExpADT ${REQ_LLVM_LIBRARIES})
Note: See TracBrowser for help on using the repository browser.