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

Last change on this file since 3994 was 3991, checked in by daled, 5 years ago

Minor changes.

File size: 2.3 KB
RevLine 
[3850]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 
[3955]40add_library(PabloADT pe_advance.cpp  pe_all.cpp  pe_and.cpp pe_call.cpp pe_charclass.cpp  pe_matchstar.cpp pe_scanthru.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)
[3850]41
[3914]42add_library(RegExpADT re_alt.cpp  re_cc.cpp  re_end.cpp  re_name.cpp re_parser.cpp  re_re.cpp  re_rep.cpp  re_seq.cpp  re_start.cpp parsefailure.cpp  parseresult.cpp  parsesuccess.cpp printer_re.cpp)
[3850]43
44
[3974]45
[3850]46#include_directories("${PROJECT_BINARY_DIR}")
47include_directories("${PROJECT_SOURCE_DIR}")
48include_directories("${PROJECT_SOURCE_DIR}/include")
49include_directories("${PROJECT_SOURCE_DIR}/include/simd-lib")
50include_directories("${PROJECT_SOURCE_DIR}/include/simd-lib/idisa_cpp")
51 
52# add the executable
[3991]53add_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_simplifier.cpp re_reducer.cpp re_nullable.cpp re_compiler.cpp pbix_compiler.cpp  symbol_generator.cpp utf8_encoder.cpp unicode_categories.h unicode_categories-flat.h unicode_categories-simple.h)
[3850]54
55target_link_libraries (icgrep PabloADT RegExpADT ${REQ_LLVM_LIBRARIES})
[3916]56
57set(CMAKE_CXX_FLAGS_RELEASE "-std=gnu++0x -O3 -msse2")
Note: See TracBrowser for help on using the repository browser.