Ignore:
Timestamp:
Jul 18, 2015, 10:18:34 AM (4 years ago)
Author:
nmedfort
Message:

First attempt to intergrate 'generate_predefined_ucd_functions' into build process.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/CMakeLists.txt

    r4661 r4684  
    5555
    5656if(ENABLE_MULTIPLEXING)
    57 find_package(Boost COMPONENTS system)
     57find_package(Boost COMPONENTS system REQUIRED)
    5858else()
    5959find_package(Boost)
     
    6666
    6767add_library(PabloADT ${PABLO_SRC})
    68 add_library(RegExpADT re/re_re.cpp re/re_cc.cpp re/re_parser.cpp re/re_rep.cpp re/parsefailure.cpp re/re_nullable.cpp re/re_simplifier.cpp re/re_compiler.cpp re/printer_re.cpp re/re_diff.cpp re/re_intersect.cpp re/re_analysis.cpp)
     68add_library(RegExpADT re/re_re.cpp re/re_cc.cpp re/re_rep.cpp re/re_diff.cpp re/re_intersect.cpp re/printer_re.cpp)
     69add_library(RegExpCompiler re/re_parser.cpp re/parsefailure.cpp re/re_nullable.cpp re/re_simplifier.cpp re/re_compiler.cpp re/re_analysis.cpp)
    6970add_library(CCADT cc/cc_namemap.cpp cc/cc_compiler.cpp utf8_encoder.cpp UCD/CaseFolding_txt.cpp)
    70 add_library(UCDlib UCD/unicode_set.cpp UCD/ucd_compiler.cpp UCD/PropertyObjects.cpp UCD/precompiled_gc.cpp UCD/precompiled_sc.cpp UCD/precompiled_scx.cpp UCD/precompiled_blk.cpp UCD/precompiled_derivedcoreproperties.cpp UCD/precompiled_proplist.cpp UCD/resolve_properties.cpp)
    71 
     71add_library(UCDlib UCD/unicode_set.cpp UCD/ucd_compiler.cpp UCD/PropertyObjects.cpp UCD/resolve_properties.cpp)
     72
     73
     74# add the executable
     75target_link_libraries (PabloADT ${REQ_LLVM_LIBRARIES})
     76target_link_libraries (CCADT PabloADT)
     77target_link_libraries (UCDlib RegExpADT PabloADT CCADT)
     78target_link_libraries (RegExpADT PabloADT CCADT UCDlib)
     79target_link_libraries (RegExpCompiler RegExpADT)
     80
     81# add the executable
     82add_executable(generate_predefined_ucd_functions generate_predefined_ucd_functions.cpp)
     83target_link_libraries (generate_predefined_ucd_functions RegExpADT UCDlib PabloADT CCADT ${REQ_LLVM_LIBRARIES})
     84
     85set(PRECOMPILED_PROPERTIES_OBJ ${PROJECT_BINARY_DIR}/precompiled_properties.o)
     86set(PRECOMPILED_FILES ${PRECOMPILED_PROPERTIES_OBJ} ${PROJECT_SOURCE_DIR}/UCD/precompiled_properties.cpp)
     87
     88if(ENABLE_MULTIPLEXING)
     89set(MULTIPLEXING_FLAG -multiplexing)
     90endif()
     91
     92add_custom_command(OUTPUT ${PRECOMPILED_FILES}
     93  COMMAND generate_predefined_ucd_functions
     94  ARGS -o ${PRECOMPILED_PROPERTIES_OBJ} -dir ${PROJECT_SOURCE_DIR}/UCD/ -lib $<TARGET_FILE:UCDlib> ${MULTIPLEXING_FLAG}
     95  DEPENDS generate_predefined_ucd_functions
     96  COMMENT "Building predefined UCD functions..."
     97  VERBATIM)
     98
     99add_custom_target(run_generate_predefined_ucd_functions ALL DEPENDS ${PRECOMPILED_FILES})
     100
     101add_executable(icgrep icgrep.cpp do_grep.cpp compiler.cpp ${PRECOMPILED_FILES})
     102target_link_libraries (icgrep UCDlib PabloADT RegExpCompiler CCADT ${REQ_LLVM_LIBRARIES})
     103
     104add_dependencies(icgrep run_generate_predefined_ucd_functions)
     105add_dependencies(RegExpCompiler run_generate_predefined_ucd_functions)
    72106
    73107IF(Boost_FOUND)
     
    97131
    98132include_directories("${PROJECT_SOURCE_DIR}")
    99 include_directories("${PROJECT_SOURCE_DIR}/re")
    100 include_directories("${PROJECT_SOURCE_DIR}/cc")
    101 include_directories("${PROJECT_SOURCE_DIR}/pablo")
    102 include_directories("${PROJECT_SOURCE_DIR}/UCD")
    103 include_directories("${PROJECT_SOURCE_DIR}/include")
    104 include_directories("${PROJECT_SOURCE_DIR}/include/simd-lib")
    105 include_directories("${PROJECT_SOURCE_DIR}/include/simd-lib/idisa_cpp")
    106 
    107 # add the executable
    108 add_executable(icgrep icgrep.cpp do_grep.cpp compiler.cpp)
    109 add_executable(generate_predefined_ucd_functions generate_predefined_ucd_functions.cpp)
    110 
    111 target_link_libraries (PabloADT ${REQ_LLVM_LIBRARIES})
    112 target_link_libraries (CCADT PabloADT RegExpADT)
    113 target_link_libraries (UCDlib PabloADT CCADT)
    114 target_link_libraries (RegExpADT PabloADT CCADT UCDlib)
    115 target_link_libraries (icgrep UCDlib PabloADT RegExpADT CCADT ${REQ_LLVM_LIBRARIES})
    116 target_link_libraries (generate_predefined_ucd_functions UCDlib PabloADT CCADT ${REQ_LLVM_LIBRARIES})
    117133
    118134#Check compiler support for 0x / 11
Note: See TracChangeset for help on using the changeset viewer.