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

Last change on this file since 6184 was 6184, checked in by nmedfort, 9 months ago

Initial version of PipelineKernel? + revised StreamSet? model.

File size: 18.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)
[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
[6184]64SET(TOOLCHAIN_SRC toolchain/toolchain.cpp toolchain/object_cache_manager.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
[6184]71SET(KERNEL_SRC kernels/attributes.cpp kernels/binding.cpp kernels/relationship.cpp kernels/processing_rate.cpp)
72SET(KERNEL_SRC ${KERNEL_SRC} kernels/kernel.cpp kernels/streamset.cpp kernels/multiblock_kernel.cpp kernels/block_kernel.cpp)
73SET(KERNEL_SRC ${KERNEL_SRC} kernels/pipeline/pipeline_kernel.cpp kernels/pipeline/pipeline_builder.cpp)
[6050]74SET(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)
[6184]75SET(KERNEL_SRC ${KERNEL_SRC} kernels/kernel_builder.cpp)
[5267]76
[5734]77SET(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]78SET(IDISA_SRC ${IDISA_SRC} IR_Gen/idisa_target.cpp)
[5734]79if(ENABLE_CUDA_COMPILE)
80SET(IDISA_SRC ${IDISA_SRC} IR_Gen/idisa_nvptx_builder.cpp)
81endif()
[5033]82
[5217]83SET(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]84SET(PABLO_SRC ${PABLO_SRC} pablo/pablo_kernel.cpp pablo/pablo_compiler.cpp)
85IF (CARRYPACK_MANAGER)
86SET(PABLO_SRC ${PABLO_SRC} pablo/carrypack_manager.cpp)
87ELSE()
88SET(PABLO_SRC ${PABLO_SRC} pablo/carry_manager.cpp)
89ENDIF()
[4766]90SET(PABLO_SRC ${PABLO_SRC} pablo/analysis/pabloverifier.cpp)
[5510]91SET(PABLO_SRC ${PABLO_SRC} pablo/optimizers/pablo_simplifier.cpp pablo/optimizers/codemotionpass.cpp pablo/optimizers/distributivepass.cpp pablo/optimizers/schedulingprepass.cpp)
92SET(PABLO_SRC ${PABLO_SRC} pablo/passes/flattenif.cpp)
[4922]93IF(ENABLE_MULTIPLEXING)
[5510]94SET(PABLO_SRC ${PABLO_SRC} pablo/optimizers/pablo_automultiplexing.cpp)
[4583]95ENDIF()
96
[5944]97SET (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)
98
[5464]99add_library(CodeGen ${TOOLCHAIN_SRC} ${DRIVER_SRC} ${OBJECT_CACHE_SRC} ${KERNEL_SRC} ${IDISA_SRC})
[4583]100add_library(PabloADT ${PABLO_SRC})
[5770]101# CCADT is the core library for representing and compiling character classes
102add_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)
103# RegExpADT is the core library for representing, parsing and printing regular expressions
[5944]104add_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)
[6182]105add_library(RegExpCompiler ${RE_PARSERS_SRC} re/casing.cpp re/to_utf8.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 re/validation.cpp re/Unicode/decomposition.cpp re/Unicode/equivalence.cpp)
106add_library(UCDlib UCD/Equivalence.cpp UCD/CaseFolding.cpp utf8_encoder.cpp utf16_encoder.cpp UCD/ucd_compiler.cpp UCD/PropertyObjects.cpp UCD/resolve_properties.cpp)
[5892]107add_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)
[6184]108add_library(FileSelect util/file_select.cpp)
[6152]109add_library(LZ4_Lib lz4/lz4_frame_decoder.cpp kernels/cc_kernel.cpp kernels/pdep_kernel.cpp lz4/lz4_decompression_generator.cpp kernels/lz4/lz4_block_decoder.cpp kernels/bitstream_pdep_kernel.cpp kernels/bitstream_gather_pdep_kernel.cpp kernels/swizzled_multiple_pdep_kernel.cpp kernels/fake_stream_generating_kernel.cpp kernels/lz4/decompression/lz4_bytestream_decompression.cpp kernels/lz4/decompression/lz4_swizzled_decompression.cpp kernels/lz4/decompression/lz4_sequential_decompression_base.cpp kernels/lz4/decompression/lz4_bitstream_decompression.cpp kernels/lz4/decompression/lz4_twist_decompression.cpp kernels/lz4/twist_kernel.cpp kernels/lz4/untwist_kernel.cpp lz4/lz4_base_generator.cpp kernels/lz4/lz4_match_detector.cpp kernels/lz4/lz4_match_detector.h kernels/lz4/lz4_not_kernel.cpp kernels/lz4/lz4_not_kernel.h)
[4198]110
[5405]111# force the compiler to compile the object cache to ensure that the versioning information is up to date
112add_custom_target(RecompileObjectCache ALL touch ${CMAKE_CURRENT_SOURCE_DIR}/${OBJECT_CACHE_SRC})
113add_dependencies(CodeGen RecompileObjectCache)
114
[4684]115# add the executable
[5464]116target_link_libraries (CodeGen ${REQ_LLVM_LIBRARIES})
117target_link_libraries (PabloADT CodeGen)
[4684]118target_link_libraries (CCADT PabloADT)
[5770]119target_link_libraries (RegExpADT PabloADT CCADT)
[6184]120target_link_libraries (UCDlib RegExpADT PabloADT CCADT) # GrepEngine RegExpCompiler
[5770]121target_link_libraries (RegExpCompiler UCDlib CCADT RegExpADT)
[5892]122target_link_libraries (GrepEngine RegExpCompiler CodeGen)
[6184]123target_link_libraries (FileSelect GrepEngine)
[4684]124
[6184]125add_executable(icgrep icgrep.cpp grep_interface.cpp)
[5402]126add_executable(u8u16 u8u16.cpp)
[6071]127add_executable(u32u8 u32u8.cpp kernels/pdep_kernel.cpp)
[5402]128add_executable(base64 base64.cpp kernels/radix64.cpp)
[6184]129add_executable(wc wc.cpp)
[5591]130add_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)
[6184]131# add_executable(lz4d lz4d.cpp lz4/lz4_frame_decoder.cpp kernels/cc_kernel.cpp kernels/lz4/lz4_index_decoder.cpp kernels/lz4/lz4_bytestream_decoder.cpp)
[5893]132add_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)
[6184]133# add_executable(character_deletion character_deletion.cpp kernels/cc_kernel.cpp)
134# add_executable(character_deposit character_deposit.cpp kernels/cc_kernel.cpp kernels/pdep_kernel.cpp kernels/bitstream_pdep_kernel.cpp)
[6136]135add_executable(lz4_decoder lz4_decoder.cpp)
[6184]136add_executable(lz4_grep grep_interface.cpp lz4_grep.cpp lz4/grep/lz4_grep_base_generator.cpp lz4/grep/lz4_grep_bytestream_generator.cpp lz4/grep/lz4_grep_bytestream_generator.h lz4/grep/lz4_grep_bitstream_generator.cpp lz4/grep/lz4_grep_bitstream_generator.h lz4/grep/lz4_grep_swizzle_generator.cpp lz4/grep/lz4_grep_swizzle_generator.h)
[6050]137add_executable(idisa_test idisa_test.cpp)
[5172]138
[5921]139
[5825]140#Exclude CoRE from default build.
141set_target_properties(core PROPERTIES EXCLUDE_FROM_ALL 1)
[5516]142
[6184]143target_link_libraries (icgrep GrepEngine UCDlib PabloADT RegExpCompiler CCADT CodeGen FileSelect ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[5770]144target_link_libraries (u8u16 PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[6071]145target_link_libraries (u32u8 PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[5770]146target_link_libraries (base64 PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[6184]147target_link_libraries (wc UCDlib PabloADT RegExpCompiler CCADT CodeGen FileSelect ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[5770]148target_link_libraries (editd PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[6184]149# target_link_libraries (lz4d PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[5518]150target_link_libraries (core RegExpCompiler ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES})
[6184]151# target_link_libraries (character_deletion PabloADT RegExpCompiler CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
152# target_link_libraries (character_deposit PabloADT RegExpCompiler CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[6136]153target_link_libraries (lz4_decoder LZ4_Lib PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[6184]154target_link_libraries (lz4_grep LZ4_Lib UCDlib PabloADT RegExpCompiler CodeGen CCADT CodeGen FileSelect ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[6050]155target_link_libraries (idisa_test CodeGen PabloADT ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
[4919]156
[5864]157
[4922]158IF(ENABLE_MULTIPLEXING)
[5156]159    message(STATUS "Enabling Multiplexing")
160    find_package(Z3 REQUIRED)
161    include_directories(${Z3_INCLUDE_DIRS})
162    target_link_libraries(PabloADT ${Z3_LIBRARIES})
163    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_MULTIPLEXING")
[4583]164ENDIF()
165
[4096]166include_directories("${PROJECT_SOURCE_DIR}")
167
[4152]168#Check compiler support for 0x / 11
169include(CheckCXXCompilerFlag)
170CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
171if(COMPILER_SUPPORTS_CXX11)
172  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
173else()
174  CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
175  if(COMPILER_SUPPORTS_CXX0X)
176    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
177  else()
178    CHECK_CXX_COMPILER_FLAG("-std=gnu++11" COMPILER_SUPPORTS_GNU11)
179    if(COMPILER_SUPPORTS_GNU11)
180      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
[5156]181    else()
182      CHECK_CXX_COMPILER_FLAG("-std=gnu++0x" COMPILER_SUPPORTS_GNU0X)
[4152]183      if(COMPILER_SUPPORTS_GNU0X)
184        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
185      endif()
186    endif()
187  endif()
188endif()
[4096]189
[4200]190#Disable RunTime Type Information
[5037]191IF (MSVC) # using Visual Studio C++
[4436]192  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-")
[4200]193ELSE() # using Clang, GCC, Intel C++, etc
[5646]194  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") 
[4200]195ENDIF()
196
[5240]197#Disable Dual ABI support
198IF(DISABLE_DUAL_ABI)
199SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
200ENDIF()
201
[4227]202#Enable all warnings
[4356]203SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
[4200]204
[5493]205UNSET(HAS_EXECINFO CACHE)
206UNSET(HAS_MACH_VM_TYPES CACHE)
[5486]207include(CheckIncludeFileCXX)
[5493]208CHECK_INCLUDE_FILE_CXX(mach/vm_types.h HAS_MACH_VM_TYPES)
209IF (HAS_MACH_VM_TYPES)
210  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAS_MACH_VM_TYPES")
[5489]211ELSE()
[5493]212  UNSET(LIBUNWIND_FOUND CACHE)
213  find_package(Libunwind)
214  IF (LIBUNWIND_FOUND)
215    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAS_LIBUNWIND")
216    include_directories(${LIBUNWIND_INCLUDE_DIR})
217    target_link_libraries(CodeGen ${LIBUNWIND_LIBRARIES})
218  ELSE()
219    CHECK_INCLUDE_FILE_CXX(execinfo.h HAS_EXECINFO)
220    IF (HAS_EXECINFO)
221       SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAS_EXECINFO")
222    ENDIF()
223  ENDIF()
[5486]224ENDIF()
225
[5510]226IF (CARRYPACK_MANAGER)
227SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_CARRYPACK_MANAGER")
228ENDIF()
229
[4480]230SET(CMAKE_REQUIRED_FLAGS)
[4152]231
[4118]232# detect LLVM version and add compiler flags.
[5731]233MATH(EXPR LLVM_VERSION_INTEGER "${LLVM_VERSION_MAJOR} * 10000 + ${LLVM_VERSION_MINOR} * 100 + ${LLVM_VERSION_PATCH}")
234SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLLVM_VERSION_INTEGER=${LLVM_VERSION_INTEGER}")
[5196]235SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLLVM_VERSION_major=${LLVM_VERSION_MAJOR} -DLLVM_VERSION_MINOR=${LLVM_VERSION_MINOR}")
[5734]236message(STATUS "LLVM Version Integer: ${LLVM_VERSION_INTEGER}")
[4118]237
[5599]238SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPARABIX_VERSION='\"${Parabix_REVISION}\"'")
239IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
240  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
241ENDIF()
[5373]242
[5486]243SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG")
244
[6184]245# no pie disables the generation of position-independent executables, which is a default security feature of newer compiles
246# that prevents addr2line from being able to resolve which line corresponds to the code at run time. This in turn prevents
247# CreateAssert from being able to provide the compilation call stack for each JIT'ed assertion error.
[5489]248
[6184]249SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} -O1 -g -fno-omit-frame-pointer -fno-optimize-sibling-calls -no-pie")
250
[6047]251UNSET(HAS_ADDRESS_SANITIZER)
[6048]252IF (USE_ADDRESS_SANITIZER)
[6047]253CHECK_INCLUDE_FILE_CXX("sanitizer/asan_interface.h" HAS_ADDRESS_SANITIZER)
254IF (HAS_ADDRESS_SANITIZER)
255SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DHAS_ADDRESS_SANITIZER -fsanitize=address")
256ENDIF()
[6048]257ENDIF()
[4919]258
[4096]259add_test(
260  NAME greptest
261  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
[5495]262  COMMAND python greptest.py ${CMAKE_BINARY_DIR}/icgrep)
[4096]263
[4137]264add_test(
[4456]265  NAME proptest
266  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
[5495]267  COMMAND python greptest.py -d ${PROJECT_SOURCE_DIR}/../QA -t ${PROJECT_SOURCE_DIR}/../QA/proptest.xml ${CMAKE_BINARY_DIR}/icgrep)
[4456]268
269add_test(
[4137]270  NAME abc_test
271  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
[5495]272  COMMAND ./run_abc ${CMAKE_BINARY_DIR}/icgrep)
[4137]273
[5208]274add_test(
275  NAME u8u16_test
276  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/u8u16
[6184]277  COMMAND ./run_all "${CMAKE_BINARY_DIR}/u8u16 -enable-segment-pipeline-parallel")
[5208]278
[6091]279add_test(
280  NAME u32u8_test
281  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/
282  COMMAND ./test_u32u8 "${CMAKE_BINARY_DIR}/u32u8")
283
[5801]284#add_test(
285#  NAME lz4d_test
286#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/lz4d
287#  COMMAND ./run_all ${CMAKE_BINARY_DIR}/lz4d)
[5423]288
289add_test(
[5226]290  NAME editd_test
291  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/editd
[5495]292  COMMAND python run_all.py -e ${CMAKE_BINARY_DIR})
[5226]293
[5288]294add_test(
295  NAME base64_test
296  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/base64
[5495]297  COMMAND python base64test.py ${CMAKE_BINARY_DIR}/base64)
[5288]298
[6054]299add_test(
300  NAME pdep64_test
301  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/IDISA_test
302  COMMAND ${CMAKE_BINARY_DIR}/idisa_test simd_pdep 64 randhex65536a randhex65536b)
303
[5851]304#add_test(
305#  NAME character_deletion_test
306#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/character_deletion
307#  COMMAND python character_deletion_test.py ${CMAKE_BINARY_DIR}/character_deletion
308#)
[5848]309
[5858]310#add_test(
311#  NAME character_deposit_test
312#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/character_deposit
313#  COMMAND python character_deposit_test.py ${CMAKE_BINARY_DIR}/character_deposit
314#)
315
[5864]316#add_test(
317#  NAME lz4d_ext_dep_test
[6157]318#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/lz4_decoder
319#  COMMAND python main.py ${CMAKE_BINARY_DIR}/lz4_decoder
[5864]320#)
321
[5496]322SET_PROPERTY(TEST greptest PROPERTY TIMEOUT 400)
323SET_PROPERTY(TEST proptest PROPERTY TIMEOUT 1500)
[5702]324SET_PROPERTY(TEST abc_test PROPERTY TIMEOUT 100)
[5851]325SET_PROPERTY(TEST u8u16_test editd_test base64_test PROPERTY TIMEOUT 40)
[5495]326
327
[5493]328add_custom_target (greptest
329  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
[5722]330  COMMAND python greptest.py "${CMAKE_BINARY_DIR}/icgrep")
[5493]331
332add_custom_target (proptest
333  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
[5722]334  COMMAND python greptest.py -d ${PROJECT_SOURCE_DIR}/../QA -t ${PROJECT_SOURCE_DIR}/../QA/proptest.xml "${CMAKE_BINARY_DIR}/icgrep")
[5493]335
[5211]336add_custom_target (u8u16_test
337  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/u8u16
[6184]338  COMMAND ./run_all "${CMAKE_BINARY_DIR}/u8u16 -enable-segment-pipeline-parallel")
[5211]339
[6093]340add_custom_target (u32u8_test
341  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
342  COMMAND ./test_u32u8 "${CMAKE_BINARY_DIR}/u32u8 -EnableAsserts -VerifyIR")
343
[5423]344add_custom_target (lz4d_test
345  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/lz4d
[5722]346  COMMAND ./run_all "${CMAKE_BINARY_DIR}/lz4d")
[5423]347
[5223]348add_custom_target (editd_test
349  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/editd
[5495]350  COMMAND python run_all.py -e ${CMAKE_BINARY_DIR})
[5223]351
[5289]352add_custom_target (base64_test
353  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/base64
[5722]354  COMMAND python base64test.py "${CMAKE_BINARY_DIR}/base64")
[5289]355
[5851]356#add_custom_target(character_deletion_test
357#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/character_deletion
358#  COMMAND python character_deletion_test.py ${CMAKE_BINARY_DIR}/character_deletion
359#)
[5848]360
[5858]361#add_custom_target(character_deposit_test
362#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/character_deposit
363#  COMMAND python character_deposit_test.py ${CMAKE_BINARY_DIR}/character_deposit
364#)
365
[5864]366#add_custom_target(lz4d_ext_dep_test
[6157]367#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/lz4_decoder
[6156]368#  COMMAND python main.py ${CMAKE_BINARY_DIR}/lz4_decoder
[5864]369#)
370
[5494]371add_custom_target (abc_gen
372  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
373  COMMAND python abc_testgen.py)
374 
[4137]375add_custom_target (abc_test
[5493]376  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
[5722]377  COMMAND ./run_abc "${CMAKE_BINARY_DIR}/icgrep")
[4137]378
[4096]379add_custom_target (check
[4130]380  COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure
[5494]381  DEPENDS icgrep abc_gen)
[4128]382
383add_custom_target (perf_icgrep
[4785]384  COMMAND python2 perf.py icgrep
[4128]385  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../performance
386  DEPENDS icgrep)
387
388add_custom_target (viewer
[4785]389  COMMAND python2 viewer.py
[4128]390  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../performance)
391
[4275]392add_custom_target (text_viewer
[4785]393  COMMAND python2 viewer.py -t
[4275]394  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../performance)
[5469]395
396
Note: See TracBrowser for help on using the repository browser.