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

Last change on this file since 6132 was 6132, checked in by xwa163, 13 months ago
  1. More experiment on lz4 grep
  2. Improve performance of lzparabix grep
File size: 19.0 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)
[6048]13option(USE_ADDRESS_SANITIZER "Enables use of address sanitizer in debug mode if available" OFF)
[5178]14find_package(LLVM REQUIRED CONFIG)
[3850]15
[5240]16message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION} in: ${LLVM_DIR}")
[5373]17
[5202]18set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/cmake") # ensure custom FindXYZ.cmake files are found
[3850]19
[5373]20set (Parabix_REVISION "svn")
21include(VersionFromVCS)
22add_version_info_from_vcs(Parabix_REVISION)
23message(STATUS "Parabix_REVISION: ${Parabix_REVISION}")
24
25
[3850]26# Now set the header and library paths:
27include_directories( ${LLVM_INCLUDE_DIRS} )
28link_directories( ${LLVM_LIBRARY_DIRS} )
29add_definitions( ${LLVM_DEFINITIONS} )
30
[5486]31# include(FindCUDA) # https://cmake.org/cmake/help/v3.0/module/FindCUDA.html
32
[5151]33option(ENABLE_CUDA_COMPILE "Compiling with CUDA")
34set(CUDA_LIB "")
35if(ENABLE_CUDA_COMPILE)
36  find_package(CUDA)
37  if(CUDA_FOUND)
38    set(CUDA_INCLUDE ${CUDA_INCLUDE} "/usr/local/cuda-7.5/include")
39    include_directories(${CUDA_INCLUDE})
40    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCUDA_ENABLED")
41    SET(CUDA_LIB "cuda")
42  endif(CUDA_FOUND)
43endif()
44
[3850]45# Let's suppose we want to build a JIT compiler with support for
46# binary code (no interpreter):
[5733]47set(LLVM_ALL_TARGETS X86)
[5151]48llvm_map_components_to_libnames(REQ_LLVM_LIBRARIES ${LLVM_ALL_TARGETS} mcjit native IRReader Linker)
[3850]49
[4196]50# Check if boost has been installed on this system.
[4210]51set(Boost_USE_STATIC_LIBS ON)
52set(Boost_USE_MULTITHREADED OFF)
[5234]53set(Boost_USE_STATIC_RUNTIME OFF)
[4991]54find_package(Boost 1.46 REQUIRED COMPONENTS system filesystem iostreams)
[5252]55message(STATUS "Found Boost_LIBRARY_DIR: ${Boost_LIBRARY_DIR}")
[4212]56
[4991]57include_directories("${Boost_INCLUDE_DIRS}")
58link_directories(${Boost_LIBRARY_DIR})
[4974]59
[5429]60SET(OBJECT_CACHE_SRC toolchain/object_cache.cpp)
[5405]61
[5892]62SET(GREP_CORE_SRC kernels/linebreak_kernel.cpp kernels/grep_kernel.cpp kernels/scanmatchgen.cpp )
[5679]63
[5510]64SET(TOOLCHAIN_SRC toolchain/toolchain.cpp toolchain/pipeline.cpp)
[5429]65
[5734]66SET(DRIVER_SRC toolchain/driver.cpp toolchain/cpudriver.cpp)
67if(ENABLE_CUDA_COMPILE)
68SET(DRIVER_SRC ${DRIVER_SRC} toolchain/NVPTXDriver.cpp)
69endif()
[5464]70
[5985]71SET(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)
[6050]72SET(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 kernels/hex_convert.cpp)
[5267]73
[5734]74SET(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]75SET(IDISA_SRC ${IDISA_SRC} IR_Gen/idisa_target.cpp)
[5734]76if(ENABLE_CUDA_COMPILE)
77SET(IDISA_SRC ${IDISA_SRC} IR_Gen/idisa_nvptx_builder.cpp)
78endif()
[5033]79
[5217]80SET(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]81SET(PABLO_SRC ${PABLO_SRC} pablo/pablo_kernel.cpp pablo/pablo_compiler.cpp)
82IF (CARRYPACK_MANAGER)
83SET(PABLO_SRC ${PABLO_SRC} pablo/carrypack_manager.cpp)
84ELSE()
85SET(PABLO_SRC ${PABLO_SRC} pablo/carry_manager.cpp)
86ENDIF()
[4766]87SET(PABLO_SRC ${PABLO_SRC} pablo/analysis/pabloverifier.cpp)
[5510]88SET(PABLO_SRC ${PABLO_SRC} pablo/optimizers/pablo_simplifier.cpp pablo/optimizers/codemotionpass.cpp pablo/optimizers/distributivepass.cpp pablo/optimizers/schedulingprepass.cpp)
89SET(PABLO_SRC ${PABLO_SRC} pablo/passes/flattenif.cpp)
[4922]90IF(ENABLE_MULTIPLEXING)
[5510]91SET(PABLO_SRC ${PABLO_SRC} pablo/optimizers/pablo_automultiplexing.cpp)
[4583]92ENDIF()
93
[5944]94SET (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)
95
[5464]96add_library(CodeGen ${TOOLCHAIN_SRC} ${DRIVER_SRC} ${OBJECT_CACHE_SRC} ${KERNEL_SRC} ${IDISA_SRC})
[4583]97add_library(PabloADT ${PABLO_SRC})
[5770]98# CCADT is the core library for representing and compiling character classes
99add_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)
100# RegExpADT is the core library for representing, parsing and printing regular expressions
[5944]101add_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)
102add_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]103add_library(UCDlib UCD/CaseFolding.cpp utf8_encoder.cpp utf16_encoder.cpp UCD/ucd_compiler.cpp UCD/PropertyObjects.cpp UCD/resolve_properties.cpp)
[5892]104add_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)
[6132]105add_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 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/fake_stream_generating_kernel.cpp kernels/lz4/aio/lz4_bytestream_aio.cpp kernels/lz4/aio/lz4_swizzled_aio.cpp kernels/lz4/aio/lz4_parallel_bytestream_aio.cpp kernels/lz4/aio/lz4_sequential_aio_base.cpp kernels/lz4/aio/lz4_sequential_aio_base.h kernels/lz4/aio/lz4_bitstream_aio.cpp kernels/lz4/aio/lz4_bitstream_aio.h kernels/lz4/aio/lz4_i4_bytestream_aio.cpp kernels/lz4/aio/lz4_i4_bytestream_aio.h)
[6123]106add_library(LZParabix_Lib lzparabix/LZParabixGenerator.cpp kernels/lzparabix/decoder/LZParabixBlockDecoder.cpp kernels/lzparabix/decoder/LZParabixBlockDecoder.h kernels/lzparabix/decoder/LZParabixAioKernel.cpp kernels/lzparabix/decoder/LZParabixAioKernel.h lzparabix/LZParabixGrepGenerator.cpp lzparabix/LZParabixGrepGenerator.h kernels/fake_stream_generating_kernel.cpp kernels/lzparabix/encoder/LZParabixCompressionKernel.cpp kernels/lzparabix/encoder/LZParabixCompressionKernel.h kernels/lzparabix/decoder/LZParabixLiteralDecoderKernel.cpp kernels/lzparabix/decoder/LZParabixLiteralDecoderKernel.h)
[4198]107
[5405]108# force the compiler to compile the object cache to ensure that the versioning information is up to date
109add_custom_target(RecompileObjectCache ALL touch ${CMAKE_CURRENT_SOURCE_DIR}/${OBJECT_CACHE_SRC})
110add_dependencies(CodeGen RecompileObjectCache)
111
[4684]112# add the executable
[5464]113target_link_libraries (CodeGen ${REQ_LLVM_LIBRARIES})
114target_link_libraries (PabloADT CodeGen)
[4684]115target_link_libraries (CCADT PabloADT)
[5770]116target_link_libraries (RegExpADT PabloADT CCADT)
[5892]117target_link_libraries (UCDlib GrepEngine RegExpCompiler RegExpADT PabloADT CCADT)
[5770]118target_link_libraries (RegExpCompiler UCDlib CCADT RegExpADT)
[5892]119target_link_libraries (GrepEngine RegExpCompiler CodeGen)
[4684]120
[5944]121add_executable(icgrep icgrep.cpp util/file_select.cpp grep_interface.cpp)
[5402]122add_executable(u8u16 u8u16.cpp)
[6071]123add_executable(u32u8 u32u8.cpp kernels/pdep_kernel.cpp)
[5402]124add_executable(base64 base64.cpp kernels/radix64.cpp)
[5944]125add_executable(wc wc.cpp util/file_select.cpp)
[5591]126add_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]127add_executable(lz4d lz4d.cpp lz4FrameDecoder.cpp kernels/cc_kernel.cpp kernels/lz4/lz4_index_decoder.cpp kernels/lz4/lz4_bytestream_decoder.cpp)
[5893]128add_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]129add_executable(character_deletion character_deletion.cpp kernels/cc_kernel.cpp)
[6039]130add_executable(character_deposit character_deposit.cpp kernels/cc_kernel.cpp kernels/pdep_kernel.cpp kernels/bitstream_pdep_kernel.cpp)
[5921]131add_executable(lz4d_ext_dep lz4d_ext_dep.cpp)
[5955]132add_executable(lz4_grep grep_interface.cpp util/file_select.cpp lz4_grep.cpp lz4/LZ4GrepGenerator.cpp)
[6114]133add_executable(lzparabix_decoder lzparabix_decoder.cpp)
134add_executable(lzparabix_grep lzparabix_grep.cpp grep_interface.cpp util/file_select.cpp)
135add_executable(lzparabix_compressor lzparabix_compressor.cpp lzparabix/LZParabixCompressorGenerator.cpp lzparabix/LZParabixCompressorGenerator.h)
[6050]136add_executable(idisa_test idisa_test.cpp)
[5172]137
[5921]138
[5825]139#Exclude CoRE from default build.
140set_target_properties(core PROPERTIES EXCLUDE_FROM_ALL 1)
[5516]141
[5892]142target_link_libraries (icgrep GrepEngine UCDlib PabloADT RegExpCompiler CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[5770]143target_link_libraries (u8u16 PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[6071]144target_link_libraries (u32u8 PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[5770]145target_link_libraries (base64 PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[5944]146target_link_libraries (wc GrepEngine UCDlib PabloADT RegExpCompiler  CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[5770]147target_link_libraries (editd PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
148target_link_libraries (lz4d PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[5518]149target_link_libraries (core RegExpCompiler ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES})
[5848]150target_link_libraries (character_deletion PabloADT RegExpCompiler CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[5857]151target_link_libraries (character_deposit PabloADT RegExpCompiler CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[5921]152target_link_libraries (lz4d_ext_dep LZ4_Lib PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[5955]153target_link_libraries (lz4_grep LZ4_Lib GrepEngine UCDlib PabloADT RegExpCompiler CodeGen CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[6114]154target_link_libraries (lzparabix_decoder LZParabix_Lib PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
155target_link_libraries (lzparabix_grep LZParabix_Lib GrepEngine UCDlib PabloADT RegExpCompiler CodeGen CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
156target_link_libraries (lzparabix_compressor LZParabix_Lib PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[6050]157target_link_libraries (idisa_test CodeGen PabloADT ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[4919]158
[5864]159
[4922]160IF(ENABLE_MULTIPLEXING)
[5156]161    message(STATUS "Enabling Multiplexing")
162    find_package(Z3 REQUIRED)
163    include_directories(${Z3_INCLUDE_DIRS})
164    target_link_libraries(PabloADT ${Z3_LIBRARIES})
165    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_MULTIPLEXING")
[4583]166ENDIF()
167
[4096]168include_directories("${PROJECT_SOURCE_DIR}")
169
[4152]170#Check compiler support for 0x / 11
171include(CheckCXXCompilerFlag)
172CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
173if(COMPILER_SUPPORTS_CXX11)
174  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
175else()
176  CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
177  if(COMPILER_SUPPORTS_CXX0X)
178    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
179  else()
180    CHECK_CXX_COMPILER_FLAG("-std=gnu++11" COMPILER_SUPPORTS_GNU11)
181    if(COMPILER_SUPPORTS_GNU11)
182      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
[5156]183    else()
184      CHECK_CXX_COMPILER_FLAG("-std=gnu++0x" COMPILER_SUPPORTS_GNU0X)
[4152]185      if(COMPILER_SUPPORTS_GNU0X)
186        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
187      endif()
188    endif()
189  endif()
190endif()
[4096]191
[4200]192#Disable RunTime Type Information
[5037]193IF (MSVC) # using Visual Studio C++
[4436]194  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-")
[4200]195ELSE() # using Clang, GCC, Intel C++, etc
[5646]196  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") 
[4200]197ENDIF()
198
[5240]199#Disable Dual ABI support
200IF(DISABLE_DUAL_ABI)
201SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
202ENDIF()
203
[4227]204#Enable all warnings
[4356]205SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
[4200]206
[5493]207UNSET(HAS_EXECINFO CACHE)
208UNSET(HAS_MACH_VM_TYPES CACHE)
[5486]209include(CheckIncludeFileCXX)
[5493]210CHECK_INCLUDE_FILE_CXX(mach/vm_types.h HAS_MACH_VM_TYPES)
211IF (HAS_MACH_VM_TYPES)
212  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAS_MACH_VM_TYPES")
[5489]213ELSE()
[5493]214  UNSET(LIBUNWIND_FOUND CACHE)
215  find_package(Libunwind)
216  IF (LIBUNWIND_FOUND)
217    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAS_LIBUNWIND")
218    include_directories(${LIBUNWIND_INCLUDE_DIR})
219    target_link_libraries(CodeGen ${LIBUNWIND_LIBRARIES})
220  ELSE()
221    CHECK_INCLUDE_FILE_CXX(execinfo.h HAS_EXECINFO)
222    IF (HAS_EXECINFO)
223       SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAS_EXECINFO")
224    ENDIF()
225  ENDIF()
[5486]226ENDIF()
227
[5510]228IF (CARRYPACK_MANAGER)
229SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_CARRYPACK_MANAGER")
230ENDIF()
231
[4480]232SET(CMAKE_REQUIRED_FLAGS)
[4152]233
[4118]234# detect LLVM version and add compiler flags.
[5731]235MATH(EXPR LLVM_VERSION_INTEGER "${LLVM_VERSION_MAJOR} * 10000 + ${LLVM_VERSION_MINOR} * 100 + ${LLVM_VERSION_PATCH}")
236SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLLVM_VERSION_INTEGER=${LLVM_VERSION_INTEGER}")
[5196]237SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLLVM_VERSION_major=${LLVM_VERSION_MAJOR} -DLLVM_VERSION_MINOR=${LLVM_VERSION_MINOR}")
[5734]238message(STATUS "LLVM Version Integer: ${LLVM_VERSION_INTEGER}")
[4118]239
[5599]240SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPARABIX_VERSION='\"${Parabix_REVISION}\"'")
241IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
242  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
243ENDIF()
[5373]244
[5486]245SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG")
246
247SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} -O1 -g -fno-omit-frame-pointer -fno-optimize-sibling-calls")
[5489]248
[6047]249UNSET(HAS_ADDRESS_SANITIZER)
[6048]250IF (USE_ADDRESS_SANITIZER)
[6047]251CHECK_INCLUDE_FILE_CXX("sanitizer/asan_interface.h" HAS_ADDRESS_SANITIZER)
252IF (HAS_ADDRESS_SANITIZER)
253SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DHAS_ADDRESS_SANITIZER -fsanitize=address")
254ENDIF()
[6048]255ENDIF()
[4919]256
[4096]257add_test(
258  NAME greptest
259  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
[5495]260  COMMAND python greptest.py ${CMAKE_BINARY_DIR}/icgrep)
[4096]261
[4137]262add_test(
[4456]263  NAME proptest
264  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
[5495]265  COMMAND python greptest.py -d ${PROJECT_SOURCE_DIR}/../QA -t ${PROJECT_SOURCE_DIR}/../QA/proptest.xml ${CMAKE_BINARY_DIR}/icgrep)
[4456]266
267add_test(
[4137]268  NAME abc_test
269  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
[5495]270  COMMAND ./run_abc ${CMAKE_BINARY_DIR}/icgrep)
[4137]271
[5208]272add_test(
273  NAME u8u16_test
274  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/u8u16
[5495]275  COMMAND ./run_all "${CMAKE_BINARY_DIR}/u8u16 -segment-size=16 -enable-segment-pipeline-parallel")
[5208]276
[6091]277add_test(
278  NAME u32u8_test
279  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/
280  COMMAND ./test_u32u8 "${CMAKE_BINARY_DIR}/u32u8")
281
[5801]282#add_test(
283#  NAME lz4d_test
284#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/lz4d
285#  COMMAND ./run_all ${CMAKE_BINARY_DIR}/lz4d)
[5423]286
287add_test(
[5226]288  NAME editd_test
289  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/editd
[5495]290  COMMAND python run_all.py -e ${CMAKE_BINARY_DIR})
[5226]291
[5288]292add_test(
293  NAME base64_test
294  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/base64
[5495]295  COMMAND python base64test.py ${CMAKE_BINARY_DIR}/base64)
[5288]296
[6054]297add_test(
298  NAME pdep64_test
299  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/IDISA_test
300  COMMAND ${CMAKE_BINARY_DIR}/idisa_test simd_pdep 64 randhex65536a randhex65536b)
301
[5851]302#add_test(
303#  NAME character_deletion_test
304#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/character_deletion
305#  COMMAND python character_deletion_test.py ${CMAKE_BINARY_DIR}/character_deletion
306#)
[5848]307
[5858]308#add_test(
309#  NAME character_deposit_test
310#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/character_deposit
311#  COMMAND python character_deposit_test.py ${CMAKE_BINARY_DIR}/character_deposit
312#)
313
[5864]314#add_test(
315#  NAME lz4d_ext_dep_test
316#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/lz4d_ext_dep
317#  COMMAND python main.py ${CMAKE_BINARY_DIR}/lz4d_ext_dep
318#)
319
[5496]320SET_PROPERTY(TEST greptest PROPERTY TIMEOUT 400)
321SET_PROPERTY(TEST proptest PROPERTY TIMEOUT 1500)
[5702]322SET_PROPERTY(TEST abc_test PROPERTY TIMEOUT 100)
[5851]323SET_PROPERTY(TEST u8u16_test editd_test base64_test PROPERTY TIMEOUT 40)
[5495]324
325
[5493]326add_custom_target (greptest
327  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
[5722]328  COMMAND python greptest.py "${CMAKE_BINARY_DIR}/icgrep")
[5493]329
330add_custom_target (proptest
331  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
[5722]332  COMMAND python greptest.py -d ${PROJECT_SOURCE_DIR}/../QA -t ${PROJECT_SOURCE_DIR}/../QA/proptest.xml "${CMAKE_BINARY_DIR}/icgrep")
[5493]333
[5211]334add_custom_target (u8u16_test
335  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/u8u16
[5722]336  COMMAND ./run_all "${CMAKE_BINARY_DIR}/u8u16 -segment-size=16 -enable-segment-pipeline-parallel")
[5211]337
[6093]338add_custom_target (u32u8_test
339  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
340  COMMAND ./test_u32u8 "${CMAKE_BINARY_DIR}/u32u8 -EnableAsserts -VerifyIR")
341
[5423]342add_custom_target (lz4d_test
343  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/lz4d
[5722]344  COMMAND ./run_all "${CMAKE_BINARY_DIR}/lz4d")
[5423]345
[5223]346add_custom_target (editd_test
347  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/editd
[5495]348  COMMAND python run_all.py -e ${CMAKE_BINARY_DIR})
[5223]349
[5289]350add_custom_target (base64_test
351  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/base64
[5722]352  COMMAND python base64test.py "${CMAKE_BINARY_DIR}/base64")
[5289]353
[5851]354#add_custom_target(character_deletion_test
355#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/character_deletion
356#  COMMAND python character_deletion_test.py ${CMAKE_BINARY_DIR}/character_deletion
357#)
[5848]358
[5858]359#add_custom_target(character_deposit_test
360#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/character_deposit
361#  COMMAND python character_deposit_test.py ${CMAKE_BINARY_DIR}/character_deposit
362#)
363
[5864]364#add_custom_target(lz4d_ext_dep_test
365#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/lz4d_ext_dep_test
366#  COMMAND python main.py ${CMAKE_BINARY_DIR}/lz4d_ext_dep_test
367#)
368
[5494]369add_custom_target (abc_gen
370  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
371  COMMAND python abc_testgen.py)
372 
[4137]373add_custom_target (abc_test
[5493]374  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
[5722]375  COMMAND ./run_abc "${CMAKE_BINARY_DIR}/icgrep")
[4137]376
[4096]377add_custom_target (check
[4130]378  COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure
[5494]379  DEPENDS icgrep abc_gen)
[4128]380
381add_custom_target (perf_icgrep
[4785]382  COMMAND python2 perf.py icgrep
[4128]383  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../performance
384  DEPENDS icgrep)
385
386add_custom_target (viewer
[4785]387  COMMAND python2 viewer.py
[4128]388  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../performance)
389
[4275]390add_custom_target (text_viewer
[4785]391  COMMAND python2 viewer.py -t
[4275]392  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../performance)
[5469]393
394
Note: See TracBrowser for help on using the repository browser.