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

Last change on this file since 6043 was 6043, checked in by xwa163, 13 months ago

Init checkin for lz4_grep count-only pipeline with multiplexing

File size: 16.5 KB
RevLine 
[5179]1cmake_minimum_required (VERSION 2.8)
[3850]2
3project (icgrep)
4
[4096]5enable_testing()
[3850]6# The version number.
[4508]7set (icgrep_VERSION_MAJOR 1)
[5178]8set (icgrep_VERSION_MINOR 6)
[4096]9
[4583]10option(ENABLE_MULTIPLEXING "Compiling the Multiplexing Module")
[5240]11option(DISABLE_DUAL_ABI "Disable GCC Dual ABI support" OFF)
[5510]12option(CARRYPACK_MANAGER "Use CarryPack Manager to reduce space required for carries. For testing only." OFF)
[5178]13find_package(LLVM REQUIRED CONFIG)
[3850]14
[5240]15message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION} in: ${LLVM_DIR}")
[5373]16
[5202]17set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/cmake") # ensure custom FindXYZ.cmake files are found
[3850]18
[5373]19set (Parabix_REVISION "svn")
20include(VersionFromVCS)
21add_version_info_from_vcs(Parabix_REVISION)
22message(STATUS "Parabix_REVISION: ${Parabix_REVISION}")
23
24
[3850]25# Now set the header and library paths:
26include_directories( ${LLVM_INCLUDE_DIRS} )
27link_directories( ${LLVM_LIBRARY_DIRS} )
28add_definitions( ${LLVM_DEFINITIONS} )
29
[5486]30# include(FindCUDA) # https://cmake.org/cmake/help/v3.0/module/FindCUDA.html
31
[5151]32option(ENABLE_CUDA_COMPILE "Compiling with CUDA")
33set(CUDA_LIB "")
34if(ENABLE_CUDA_COMPILE)
35  find_package(CUDA)
36  if(CUDA_FOUND)
37    set(CUDA_INCLUDE ${CUDA_INCLUDE} "/usr/local/cuda-7.5/include")
38    include_directories(${CUDA_INCLUDE})
39    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCUDA_ENABLED")
40    SET(CUDA_LIB "cuda")
41  endif(CUDA_FOUND)
42endif()
43
[3850]44# Let's suppose we want to build a JIT compiler with support for
45# binary code (no interpreter):
[5733]46set(LLVM_ALL_TARGETS X86)
[5151]47llvm_map_components_to_libnames(REQ_LLVM_LIBRARIES ${LLVM_ALL_TARGETS} mcjit native IRReader Linker)
[3850]48
[4196]49# Check if boost has been installed on this system.
[4210]50set(Boost_USE_STATIC_LIBS ON)
51set(Boost_USE_MULTITHREADED OFF)
[5234]52set(Boost_USE_STATIC_RUNTIME OFF)
[4991]53find_package(Boost 1.46 REQUIRED COMPONENTS system filesystem iostreams)
[5252]54message(STATUS "Found Boost_LIBRARY_DIR: ${Boost_LIBRARY_DIR}")
[4212]55
[4991]56include_directories("${Boost_INCLUDE_DIRS}")
57link_directories(${Boost_LIBRARY_DIR})
[4974]58
[5429]59SET(OBJECT_CACHE_SRC toolchain/object_cache.cpp)
[5405]60
[5892]61SET(GREP_CORE_SRC kernels/linebreak_kernel.cpp kernels/grep_kernel.cpp kernels/scanmatchgen.cpp )
[5679]62
[5510]63SET(TOOLCHAIN_SRC toolchain/toolchain.cpp toolchain/pipeline.cpp)
[5429]64
[5734]65SET(DRIVER_SRC toolchain/driver.cpp toolchain/cpudriver.cpp)
66if(ENABLE_CUDA_COMPILE)
67SET(DRIVER_SRC ${DRIVER_SRC} toolchain/NVPTXDriver.cpp)
68endif()
[5464]69
[5985]70SET(KERNEL_SRC kernels/attributes.cpp kernels/processing_rate.cpp kernels/interface.cpp kernels/kernel.cpp kernels/multiblock_kernel.cpp kernels/block_kernel.cpp kernels/streamset.cpp kernels/kernel_builder.cpp)
[5429]71SET(KERNEL_SRC ${KERNEL_SRC} kernels/source_kernel.cpp kernels/s2p_kernel.cpp kernels/deletion.cpp kernels/swizzle.cpp kernels/p2s_kernel.cpp kernels/stdout_kernel.cpp)
[5267]72
[5734]73SET(IDISA_SRC IR_Gen/CBuilder.cpp IR_Gen/idisa_builder.cpp IR_Gen/idisa_avx_builder.cpp IR_Gen/idisa_i64_builder.cpp IR_Gen/idisa_sse_builder.cpp)
[5510]74SET(IDISA_SRC ${IDISA_SRC} IR_Gen/idisa_target.cpp)
[5734]75if(ENABLE_CUDA_COMPILE)
76SET(IDISA_SRC ${IDISA_SRC} IR_Gen/idisa_nvptx_builder.cpp)
77endif()
[5033]78
[5217]79SET(PABLO_SRC pablo/pabloAST.cpp pablo/branch.cpp pablo/codegenstate.cpp pablo/builder.cpp pablo/symbol_generator.cpp pablo/printer_pablos.cpp pablo/pablo_toolchain.cpp)
[5510]80SET(PABLO_SRC ${PABLO_SRC} pablo/pablo_kernel.cpp pablo/pablo_compiler.cpp)
81IF (CARRYPACK_MANAGER)
82SET(PABLO_SRC ${PABLO_SRC} pablo/carrypack_manager.cpp)
83ELSE()
84SET(PABLO_SRC ${PABLO_SRC} pablo/carry_manager.cpp)
85ENDIF()
[4766]86SET(PABLO_SRC ${PABLO_SRC} pablo/analysis/pabloverifier.cpp)
[5510]87SET(PABLO_SRC ${PABLO_SRC} pablo/optimizers/pablo_simplifier.cpp pablo/optimizers/codemotionpass.cpp pablo/optimizers/distributivepass.cpp pablo/optimizers/schedulingprepass.cpp)
88SET(PABLO_SRC ${PABLO_SRC} pablo/passes/flattenif.cpp)
[4922]89IF(ENABLE_MULTIPLEXING)
[5510]90SET(PABLO_SRC ${PABLO_SRC} pablo/optimizers/pablo_automultiplexing.cpp)
[4583]91ENDIF()
92
[5944]93SET (RE_PARSERS_SRC re/parsers/PCRE_parser.cpp re/parsers/ERE_parser.cpp re/parsers/BRE_parser.cpp re/parsers/Prosite_parser.cpp re/parsers/fixed_string_parser.cpp re/parsers/GLOB_parser.cpp re/parsers/parser.cpp)
94
[5464]95add_library(CodeGen ${TOOLCHAIN_SRC} ${DRIVER_SRC} ${OBJECT_CACHE_SRC} ${KERNEL_SRC} ${IDISA_SRC})
[4583]96add_library(PabloADT ${PABLO_SRC})
[5770]97# CCADT is the core library for representing and compiling character classes
98add_library(CCADT re/re_re.cpp re/re_cc.cpp cc/cc_compiler.cpp cc/alphabet.cpp cc/multiplex_CCs.cpp UCD/unicode_set.cpp)
99# RegExpADT is the core library for representing, parsing and printing regular expressions
[5944]100add_library(RegExpADT re/re_rep.cpp re/re_diff.cpp re/re_intersect.cpp re/re_range.cpp re/re_assertion.cpp re/printer_re.cpp re/re_utility.cpp)
101add_library(RegExpCompiler ${RE_PARSERS_SRC} re/casing.cpp re/to_utf8.cpp re/re_memoizer.cpp re/re_nullable.cpp re/re_simplifier.cpp re/re_star_normal.cpp re/re_minimizer.cpp re/re_local.cpp re/re_compiler.cpp re/re_analysis.cpp re/re_toolchain.cpp re/re_name_resolve.cpp re/re_name_gather.cpp re/collect_ccs.cpp re/re_multiplex.cpp re/re_utility.cpp re/grapheme_clusters.cpp re/exclude_CC.cpp re/replaceCC.cpp)
[5770]102add_library(UCDlib UCD/CaseFolding.cpp utf8_encoder.cpp utf16_encoder.cpp UCD/ucd_compiler.cpp UCD/PropertyObjects.cpp UCD/resolve_properties.cpp)
[5892]103add_library(GrepEngine  ${GREP_CORE_SRC} grep/grep_engine.cpp kernels/cc_kernel.cpp kernels/cc_scan_kernel.cpp kernels/charclasses.cpp kernels/streams_merge.cpp kernels/until_n.cpp kernels/UCD_property_kernel.cpp kernels/grapheme_kernel.cpp)
[6043]104add_library(LZ4_Lib lz4FrameDecoder.cpp kernels/cc_kernel.cpp kernels/lz4/lz4_deposit_uncompressed.cpp kernels/lz4/lz4_generate_deposit_stream.cpp kernels/pdep_kernel.cpp lz4/LZ4Generator.cpp kernels/lz4/lz4_block_decoder.cpp kernels/lz4/lz4_index_builder.cpp lz4/LZ4GrepEngine.cpp kernels/lz4/lz4_swizzled_match_copy_kernel.cpp kernels/bitstream_pdep_kernel.cpp kernels/bitstream_gather_pdep_kernel.cpp kernels/swizzled_multiple_pdep_kernel.cpp kernels/lz4/lz4_bitstream_not_kernel.cpp kernels/lz4/lz4_bitstream_match_copy_kernel.cpp kernels/lz4/lz4_fake_stream_generating_kernel.cpp)
[4198]105
[6020]106
[5405]107# force the compiler to compile the object cache to ensure that the versioning information is up to date
108add_custom_target(RecompileObjectCache ALL touch ${CMAKE_CURRENT_SOURCE_DIR}/${OBJECT_CACHE_SRC})
109add_dependencies(CodeGen RecompileObjectCache)
110
[4684]111# add the executable
[5464]112target_link_libraries (CodeGen ${REQ_LLVM_LIBRARIES})
113target_link_libraries (PabloADT CodeGen)
[4684]114target_link_libraries (CCADT PabloADT)
[5770]115target_link_libraries (RegExpADT PabloADT CCADT)
[5892]116target_link_libraries (UCDlib GrepEngine RegExpCompiler RegExpADT PabloADT CCADT)
[5770]117target_link_libraries (RegExpCompiler UCDlib CCADT RegExpADT)
[5892]118target_link_libraries (GrepEngine RegExpCompiler CodeGen)
[4684]119
[5944]120add_executable(icgrep icgrep.cpp util/file_select.cpp grep_interface.cpp)
[5402]121add_executable(u8u16 u8u16.cpp)
122add_executable(base64 base64.cpp kernels/radix64.cpp)
[5944]123add_executable(wc wc.cpp util/file_select.cpp)
[5591]124add_executable(editd editd/editd.cpp editd/pattern_compiler.cpp editd/editdscan_kernel.cpp editd/editd_gpu_kernel.cpp editd/editd_cpu_kernel.cpp kernels/streams_merge.cpp kernels/cc_kernel.cpp)
[5864]125add_executable(lz4d lz4d.cpp lz4FrameDecoder.cpp kernels/cc_kernel.cpp kernels/lz4/lz4_index_decoder.cpp kernels/lz4/lz4_bytestream_decoder.cpp)
[5893]126add_executable(core combine/core.cpp combine/regexGen.cpp combine/stringGen.cpp combine/propGen.cpp combine/icgrep-test/icgrep-test.cpp grep_interface.cpp grep/grep_engine.cpp kernels/scanmatchgen.cpp kernels/u8u32_kernel.cpp kernels/delmask_kernel.cpp kernels/cc_kernel.cpp kernels/cc_scan_kernel.cpp kernels/charclasses.cpp kernels/linebreak_kernel.cpp kernels/streams_merge.cpp kernels/grep_kernel.cpp kernels/until_n.cpp)
[5848]127add_executable(character_deletion character_deletion.cpp kernels/cc_kernel.cpp)
[6039]128add_executable(character_deposit character_deposit.cpp kernels/cc_kernel.cpp kernels/pdep_kernel.cpp kernels/bitstream_pdep_kernel.cpp)
[5921]129add_executable(lz4d_ext_dep lz4d_ext_dep.cpp)
[5955]130add_executable(lz4_grep grep_interface.cpp util/file_select.cpp lz4_grep.cpp lz4/LZ4GrepGenerator.cpp)
[5172]131
[5921]132
[5825]133#Exclude CoRE from default build.
134set_target_properties(core PROPERTIES EXCLUDE_FROM_ALL 1)
[5516]135
[5892]136target_link_libraries (icgrep GrepEngine UCDlib PabloADT RegExpCompiler CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[5770]137target_link_libraries (u8u16 PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
138target_link_libraries (base64 PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[5944]139target_link_libraries (wc GrepEngine UCDlib PabloADT RegExpCompiler  CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[5770]140target_link_libraries (editd PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
141target_link_libraries (lz4d PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[5518]142target_link_libraries (core RegExpCompiler ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES})
[5848]143target_link_libraries (character_deletion PabloADT RegExpCompiler CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[5857]144target_link_libraries (character_deposit PabloADT RegExpCompiler CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[5921]145target_link_libraries (lz4d_ext_dep LZ4_Lib PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[5955]146target_link_libraries (lz4_grep LZ4_Lib GrepEngine UCDlib PabloADT RegExpCompiler CodeGen CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[4919]147
[5864]148
[5921]149
[4922]150IF(ENABLE_MULTIPLEXING)
[5156]151    message(STATUS "Enabling Multiplexing")
152    find_package(Z3 REQUIRED)
153    include_directories(${Z3_INCLUDE_DIRS})
154    target_link_libraries(PabloADT ${Z3_LIBRARIES})
155    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_MULTIPLEXING")
[4583]156ENDIF()
157
[4096]158include_directories("${PROJECT_SOURCE_DIR}")
159
[4152]160#Check compiler support for 0x / 11
161include(CheckCXXCompilerFlag)
162CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
163if(COMPILER_SUPPORTS_CXX11)
164  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
165else()
166  CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
167  if(COMPILER_SUPPORTS_CXX0X)
168    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
169  else()
170    CHECK_CXX_COMPILER_FLAG("-std=gnu++11" COMPILER_SUPPORTS_GNU11)
171    if(COMPILER_SUPPORTS_GNU11)
172      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
[5156]173    else()
174      CHECK_CXX_COMPILER_FLAG("-std=gnu++0x" COMPILER_SUPPORTS_GNU0X)
[4152]175      if(COMPILER_SUPPORTS_GNU0X)
176        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
177      endif()
178    endif()
179  endif()
180endif()
[4096]181
[4200]182#Disable RunTime Type Information
[5037]183IF (MSVC) # using Visual Studio C++
[4436]184  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-")
[4200]185ELSE() # using Clang, GCC, Intel C++, etc
[5646]186  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") 
[4200]187ENDIF()
188
[5240]189#Disable Dual ABI support
190IF(DISABLE_DUAL_ABI)
191SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
192ENDIF()
193
[4227]194#Enable all warnings
[4356]195SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
[4200]196
[5493]197UNSET(HAS_EXECINFO CACHE)
198UNSET(HAS_MACH_VM_TYPES CACHE)
[5486]199include(CheckIncludeFileCXX)
[5493]200CHECK_INCLUDE_FILE_CXX(mach/vm_types.h HAS_MACH_VM_TYPES)
201IF (HAS_MACH_VM_TYPES)
202  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAS_MACH_VM_TYPES")
[5489]203ELSE()
[5493]204  UNSET(LIBUNWIND_FOUND CACHE)
205  find_package(Libunwind)
206  IF (LIBUNWIND_FOUND)
207    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAS_LIBUNWIND")
208    include_directories(${LIBUNWIND_INCLUDE_DIR})
209    target_link_libraries(CodeGen ${LIBUNWIND_LIBRARIES})
210  ELSE()
211    CHECK_INCLUDE_FILE_CXX(execinfo.h HAS_EXECINFO)
212    IF (HAS_EXECINFO)
213       SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAS_EXECINFO")
214    ENDIF()
215  ENDIF()
[5486]216ENDIF()
217
[5510]218IF (CARRYPACK_MANAGER)
219SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_CARRYPACK_MANAGER")
220ENDIF()
221
[4480]222SET(CMAKE_REQUIRED_FLAGS)
[4152]223
[4118]224# detect LLVM version and add compiler flags.
[5731]225MATH(EXPR LLVM_VERSION_INTEGER "${LLVM_VERSION_MAJOR} * 10000 + ${LLVM_VERSION_MINOR} * 100 + ${LLVM_VERSION_PATCH}")
226SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLLVM_VERSION_INTEGER=${LLVM_VERSION_INTEGER}")
[5196]227SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLLVM_VERSION_major=${LLVM_VERSION_MAJOR} -DLLVM_VERSION_MINOR=${LLVM_VERSION_MINOR}")
[5734]228message(STATUS "LLVM Version Integer: ${LLVM_VERSION_INTEGER}")
[4118]229
[5599]230SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPARABIX_VERSION='\"${Parabix_REVISION}\"'")
231IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
232  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
233ENDIF()
[5373]234
[5486]235SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG")
236
237SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} -O1 -g -fno-omit-frame-pointer -fno-optimize-sibling-calls")
[5489]238
[6028]239#UNSET(HAS_ADDRESS_SANITIZER)
240#CHECK_INCLUDE_FILE_CXX("sanitizer/asan_interface.h" HAS_ADDRESS_SANITIZER)
241#IF (HAS_ADDRESS_SANITIZER)
242#SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DHAS_ADDRESS_SANITIZER -fsanitize=address")
243#ENDIF()
[4919]244
[5495]245
[4096]246add_test(
247  NAME greptest
248  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
[5495]249  COMMAND python greptest.py ${CMAKE_BINARY_DIR}/icgrep)
[4096]250
[4137]251add_test(
[4456]252  NAME proptest
253  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
[5495]254  COMMAND python greptest.py -d ${PROJECT_SOURCE_DIR}/../QA -t ${PROJECT_SOURCE_DIR}/../QA/proptest.xml ${CMAKE_BINARY_DIR}/icgrep)
[4456]255
256add_test(
[4137]257  NAME abc_test
258  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
[5495]259  COMMAND ./run_abc ${CMAKE_BINARY_DIR}/icgrep)
[4137]260
[5208]261add_test(
262  NAME u8u16_test
263  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/u8u16
[5495]264  COMMAND ./run_all "${CMAKE_BINARY_DIR}/u8u16 -segment-size=16 -enable-segment-pipeline-parallel")
[5208]265
[5801]266#add_test(
267#  NAME lz4d_test
268#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/lz4d
269#  COMMAND ./run_all ${CMAKE_BINARY_DIR}/lz4d)
[5423]270
271add_test(
[5226]272  NAME editd_test
273  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/editd
[5495]274  COMMAND python run_all.py -e ${CMAKE_BINARY_DIR})
[5226]275
[5288]276add_test(
277  NAME base64_test
278  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/base64
[5495]279  COMMAND python base64test.py ${CMAKE_BINARY_DIR}/base64)
[5288]280
[5851]281#add_test(
282#  NAME character_deletion_test
283#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/character_deletion
284#  COMMAND python character_deletion_test.py ${CMAKE_BINARY_DIR}/character_deletion
285#)
[5848]286
[5858]287#add_test(
288#  NAME character_deposit_test
289#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/character_deposit
290#  COMMAND python character_deposit_test.py ${CMAKE_BINARY_DIR}/character_deposit
291#)
292
[5864]293#add_test(
294#  NAME lz4d_ext_dep_test
295#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/lz4d_ext_dep
296#  COMMAND python main.py ${CMAKE_BINARY_DIR}/lz4d_ext_dep
297#)
298
[5496]299SET_PROPERTY(TEST greptest PROPERTY TIMEOUT 400)
300SET_PROPERTY(TEST proptest PROPERTY TIMEOUT 1500)
[5702]301SET_PROPERTY(TEST abc_test PROPERTY TIMEOUT 100)
[5851]302SET_PROPERTY(TEST u8u16_test editd_test base64_test PROPERTY TIMEOUT 40)
[5495]303
304
[5493]305add_custom_target (greptest
306  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
[5722]307  COMMAND python greptest.py "${CMAKE_BINARY_DIR}/icgrep")
[5493]308
309add_custom_target (proptest
310  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
[5722]311  COMMAND python greptest.py -d ${PROJECT_SOURCE_DIR}/../QA -t ${PROJECT_SOURCE_DIR}/../QA/proptest.xml "${CMAKE_BINARY_DIR}/icgrep")
[5493]312
[5211]313add_custom_target (u8u16_test
314  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/u8u16
[5722]315  COMMAND ./run_all "${CMAKE_BINARY_DIR}/u8u16 -segment-size=16 -enable-segment-pipeline-parallel")
[5211]316
[5423]317add_custom_target (lz4d_test
318  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/lz4d
[5722]319  COMMAND ./run_all "${CMAKE_BINARY_DIR}/lz4d")
[5423]320
[5223]321add_custom_target (editd_test
322  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/editd
[5495]323  COMMAND python run_all.py -e ${CMAKE_BINARY_DIR})
[5223]324
[5289]325add_custom_target (base64_test
326  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/base64
[5722]327  COMMAND python base64test.py "${CMAKE_BINARY_DIR}/base64")
[5289]328
[5851]329#add_custom_target(character_deletion_test
330#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/character_deletion
331#  COMMAND python character_deletion_test.py ${CMAKE_BINARY_DIR}/character_deletion
332#)
[5848]333
[5858]334#add_custom_target(character_deposit_test
335#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/character_deposit
336#  COMMAND python character_deposit_test.py ${CMAKE_BINARY_DIR}/character_deposit
337#)
338
[5864]339#add_custom_target(lz4d_ext_dep_test
340#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/lz4d_ext_dep_test
341#  COMMAND python main.py ${CMAKE_BINARY_DIR}/lz4d_ext_dep_test
342#)
343
[5494]344add_custom_target (abc_gen
345  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
346  COMMAND python abc_testgen.py)
347 
[4137]348add_custom_target (abc_test
[5493]349  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
[5722]350  COMMAND ./run_abc "${CMAKE_BINARY_DIR}/icgrep")
[4137]351
[4096]352add_custom_target (check
[4130]353  COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure
[5494]354  DEPENDS icgrep abc_gen)
[4128]355
356add_custom_target (perf_icgrep
[4785]357  COMMAND python2 perf.py icgrep
[4128]358  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../performance
359  DEPENDS icgrep)
360
361add_custom_target (viewer
[4785]362  COMMAND python2 viewer.py
[4128]363  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../performance)
364
[4275]365add_custom_target (text_viewer
[4785]366  COMMAND python2 viewer.py -t
[4275]367  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../performance)
[5469]368
369
Note: See TracBrowser for help on using the repository browser.