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

Last change on this file since 6178 was 6178, checked in by cameron, 5 months ago

RE Validation

File size: 17.8 KB
Line 
1cmake_minimum_required (VERSION 2.8)
2
3project (icgrep)
4
5enable_testing()
6# The version number.
7set (icgrep_VERSION_MAJOR 1)
8set (icgrep_VERSION_MINOR 6)
9
10option(ENABLE_MULTIPLEXING "Compiling the Multiplexing Module")
11option(DISABLE_DUAL_ABI "Disable GCC Dual ABI support" OFF)
12option(CARRYPACK_MANAGER "Use CarryPack Manager to reduce space required for carries. For testing only." OFF)
13option(USE_ADDRESS_SANITIZER "Enables use of address sanitizer in debug mode if available" OFF)
14find_package(LLVM REQUIRED CONFIG)
15
16message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION} in: ${LLVM_DIR}")
17
18set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/cmake") # ensure custom FindXYZ.cmake files are found
19
20set (Parabix_REVISION "svn")
21include(VersionFromVCS)
22add_version_info_from_vcs(Parabix_REVISION)
23message(STATUS "Parabix_REVISION: ${Parabix_REVISION}")
24
25
26# Now set the header and library paths:
27include_directories( ${LLVM_INCLUDE_DIRS} )
28link_directories( ${LLVM_LIBRARY_DIRS} )
29add_definitions( ${LLVM_DEFINITIONS} )
30
31# include(FindCUDA) # https://cmake.org/cmake/help/v3.0/module/FindCUDA.html
32
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
45# Let's suppose we want to build a JIT compiler with support for
46# binary code (no interpreter):
47set(LLVM_ALL_TARGETS X86)
48llvm_map_components_to_libnames(REQ_LLVM_LIBRARIES ${LLVM_ALL_TARGETS} mcjit native IRReader Linker)
49
50# Check if boost has been installed on this system.
51set(Boost_USE_STATIC_LIBS ON)
52set(Boost_USE_MULTITHREADED OFF)
53set(Boost_USE_STATIC_RUNTIME OFF)
54find_package(Boost 1.46 REQUIRED COMPONENTS system filesystem iostreams)
55message(STATUS "Found Boost_LIBRARY_DIR: ${Boost_LIBRARY_DIR}")
56
57include_directories("${Boost_INCLUDE_DIRS}")
58link_directories(${Boost_LIBRARY_DIR})
59
60SET(OBJECT_CACHE_SRC toolchain/object_cache.cpp)
61
62SET(GREP_CORE_SRC kernels/linebreak_kernel.cpp kernels/grep_kernel.cpp kernels/scanmatchgen.cpp )
63
64SET(TOOLCHAIN_SRC toolchain/toolchain.cpp toolchain/pipeline.cpp)
65
66SET(DRIVER_SRC toolchain/driver.cpp toolchain/cpudriver.cpp)
67if(ENABLE_CUDA_COMPILE)
68SET(DRIVER_SRC ${DRIVER_SRC} toolchain/NVPTXDriver.cpp)
69endif()
70
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)
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)
73
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)
75SET(IDISA_SRC ${IDISA_SRC} IR_Gen/idisa_target.cpp)
76if(ENABLE_CUDA_COMPILE)
77SET(IDISA_SRC ${IDISA_SRC} IR_Gen/idisa_nvptx_builder.cpp)
78endif()
79
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)
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()
87SET(PABLO_SRC ${PABLO_SRC} pablo/analysis/pabloverifier.cpp)
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)
90IF(ENABLE_MULTIPLEXING)
91SET(PABLO_SRC ${PABLO_SRC} pablo/optimizers/pablo_automultiplexing.cpp)
92ENDIF()
93
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
96add_library(CodeGen ${TOOLCHAIN_SRC} ${DRIVER_SRC} ${OBJECT_CACHE_SRC} ${KERNEL_SRC} ${IDISA_SRC})
97add_library(PabloADT ${PABLO_SRC})
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
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_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)
103add_library(UCDlib UCD/CaseFolding.cpp utf8_encoder.cpp utf16_encoder.cpp UCD/ucd_compiler.cpp UCD/PropertyObjects.cpp UCD/resolve_properties.cpp)
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)
105add_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)
106
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
111# add the executable
112target_link_libraries (CodeGen ${REQ_LLVM_LIBRARIES})
113target_link_libraries (PabloADT CodeGen)
114target_link_libraries (CCADT PabloADT)
115target_link_libraries (RegExpADT PabloADT CCADT)
116target_link_libraries (UCDlib GrepEngine RegExpCompiler RegExpADT PabloADT CCADT)
117target_link_libraries (RegExpCompiler UCDlib CCADT RegExpADT)
118target_link_libraries (GrepEngine RegExpCompiler CodeGen)
119
120add_executable(icgrep icgrep.cpp util/file_select.cpp grep_interface.cpp)
121add_executable(u8u16 u8u16.cpp)
122add_executable(u32u8 u32u8.cpp kernels/pdep_kernel.cpp)
123add_executable(base64 base64.cpp kernels/radix64.cpp)
124add_executable(wc wc.cpp util/file_select.cpp)
125add_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)
126add_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)
127add_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)
128add_executable(character_deletion character_deletion.cpp kernels/cc_kernel.cpp)
129add_executable(character_deposit character_deposit.cpp kernels/cc_kernel.cpp kernels/pdep_kernel.cpp kernels/bitstream_pdep_kernel.cpp)
130add_executable(lz4_decoder lz4_decoder.cpp)
131add_executable(lz4_grep grep_interface.cpp util/file_select.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)
132add_executable(idisa_test idisa_test.cpp)
133
134
135#Exclude CoRE from default build.
136set_target_properties(core PROPERTIES EXCLUDE_FROM_ALL 1)
137
138target_link_libraries (icgrep GrepEngine UCDlib PabloADT RegExpCompiler CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
139target_link_libraries (u8u16 PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
140target_link_libraries (u32u8 PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
141target_link_libraries (base64 PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
142target_link_libraries (wc GrepEngine UCDlib PabloADT RegExpCompiler  CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
143target_link_libraries (editd PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
144target_link_libraries (lz4d PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
145target_link_libraries (core RegExpCompiler ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES})
146target_link_libraries (character_deletion PabloADT RegExpCompiler CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
147target_link_libraries (character_deposit PabloADT RegExpCompiler CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
148target_link_libraries (lz4_decoder LZ4_Lib PabloADT CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
149target_link_libraries (lz4_grep LZ4_Lib UCDlib PabloADT RegExpCompiler CodeGen CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
150target_link_libraries (idisa_test CodeGen PabloADT ${REQ_LLVM_LIBRARIES} ${Boost_LIBRARIES} ${CUDA_LIB})
151
152
153IF(ENABLE_MULTIPLEXING)
154    message(STATUS "Enabling Multiplexing")
155    find_package(Z3 REQUIRED)
156    include_directories(${Z3_INCLUDE_DIRS})
157    target_link_libraries(PabloADT ${Z3_LIBRARIES})
158    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_MULTIPLEXING")
159ENDIF()
160
161include_directories("${PROJECT_SOURCE_DIR}")
162
163#Check compiler support for 0x / 11
164include(CheckCXXCompilerFlag)
165CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
166if(COMPILER_SUPPORTS_CXX11)
167  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
168else()
169  CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
170  if(COMPILER_SUPPORTS_CXX0X)
171    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
172  else()
173    CHECK_CXX_COMPILER_FLAG("-std=gnu++11" COMPILER_SUPPORTS_GNU11)
174    if(COMPILER_SUPPORTS_GNU11)
175      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
176    else()
177      CHECK_CXX_COMPILER_FLAG("-std=gnu++0x" COMPILER_SUPPORTS_GNU0X)
178      if(COMPILER_SUPPORTS_GNU0X)
179        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
180      endif()
181    endif()
182  endif()
183endif()
184
185#Disable RunTime Type Information
186IF (MSVC) # using Visual Studio C++
187  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-")
188ELSE() # using Clang, GCC, Intel C++, etc
189  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") 
190ENDIF()
191
192#Disable Dual ABI support
193IF(DISABLE_DUAL_ABI)
194SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
195ENDIF()
196
197#Enable all warnings
198SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
199
200UNSET(HAS_EXECINFO CACHE)
201UNSET(HAS_MACH_VM_TYPES CACHE)
202include(CheckIncludeFileCXX)
203CHECK_INCLUDE_FILE_CXX(mach/vm_types.h HAS_MACH_VM_TYPES)
204IF (HAS_MACH_VM_TYPES)
205  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAS_MACH_VM_TYPES")
206ELSE()
207  UNSET(LIBUNWIND_FOUND CACHE)
208  find_package(Libunwind)
209  IF (LIBUNWIND_FOUND)
210    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAS_LIBUNWIND")
211    include_directories(${LIBUNWIND_INCLUDE_DIR})
212    target_link_libraries(CodeGen ${LIBUNWIND_LIBRARIES})
213  ELSE()
214    CHECK_INCLUDE_FILE_CXX(execinfo.h HAS_EXECINFO)
215    IF (HAS_EXECINFO)
216       SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAS_EXECINFO")
217    ENDIF()
218  ENDIF()
219ENDIF()
220
221IF (CARRYPACK_MANAGER)
222SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_CARRYPACK_MANAGER")
223ENDIF()
224
225SET(CMAKE_REQUIRED_FLAGS)
226
227# detect LLVM version and add compiler flags.
228MATH(EXPR LLVM_VERSION_INTEGER "${LLVM_VERSION_MAJOR} * 10000 + ${LLVM_VERSION_MINOR} * 100 + ${LLVM_VERSION_PATCH}")
229SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLLVM_VERSION_INTEGER=${LLVM_VERSION_INTEGER}")
230SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLLVM_VERSION_major=${LLVM_VERSION_MAJOR} -DLLVM_VERSION_MINOR=${LLVM_VERSION_MINOR}")
231message(STATUS "LLVM Version Integer: ${LLVM_VERSION_INTEGER}")
232
233SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPARABIX_VERSION='\"${Parabix_REVISION}\"'")
234IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
235  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
236ENDIF()
237
238SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG")
239
240SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} -O1 -g -fno-omit-frame-pointer -fno-optimize-sibling-calls")
241
242UNSET(HAS_ADDRESS_SANITIZER)
243IF (USE_ADDRESS_SANITIZER)
244CHECK_INCLUDE_FILE_CXX("sanitizer/asan_interface.h" HAS_ADDRESS_SANITIZER)
245IF (HAS_ADDRESS_SANITIZER)
246SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DHAS_ADDRESS_SANITIZER -fsanitize=address")
247ENDIF()
248ENDIF()
249
250add_test(
251  NAME greptest
252  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
253  COMMAND python greptest.py ${CMAKE_BINARY_DIR}/icgrep)
254
255add_test(
256  NAME proptest
257  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
258  COMMAND python greptest.py -d ${PROJECT_SOURCE_DIR}/../QA -t ${PROJECT_SOURCE_DIR}/../QA/proptest.xml ${CMAKE_BINARY_DIR}/icgrep)
259
260add_test(
261  NAME abc_test
262  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
263  COMMAND ./run_abc ${CMAKE_BINARY_DIR}/icgrep)
264
265add_test(
266  NAME u8u16_test
267  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/u8u16
268  COMMAND ./run_all "${CMAKE_BINARY_DIR}/u8u16 -segment-size=16 -enable-segment-pipeline-parallel")
269
270add_test(
271  NAME u32u8_test
272  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/
273  COMMAND ./test_u32u8 "${CMAKE_BINARY_DIR}/u32u8")
274
275#add_test(
276#  NAME lz4d_test
277#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/lz4d
278#  COMMAND ./run_all ${CMAKE_BINARY_DIR}/lz4d)
279
280add_test(
281  NAME editd_test
282  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/editd
283  COMMAND python run_all.py -e ${CMAKE_BINARY_DIR})
284
285add_test(
286  NAME base64_test
287  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/base64
288  COMMAND python base64test.py ${CMAKE_BINARY_DIR}/base64)
289
290add_test(
291  NAME pdep64_test
292  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/IDISA_test
293  COMMAND ${CMAKE_BINARY_DIR}/idisa_test simd_pdep 64 randhex65536a randhex65536b)
294
295#add_test(
296#  NAME character_deletion_test
297#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/character_deletion
298#  COMMAND python character_deletion_test.py ${CMAKE_BINARY_DIR}/character_deletion
299#)
300
301#add_test(
302#  NAME character_deposit_test
303#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/character_deposit
304#  COMMAND python character_deposit_test.py ${CMAKE_BINARY_DIR}/character_deposit
305#)
306
307#add_test(
308#  NAME lz4d_ext_dep_test
309#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/lz4_decoder
310#  COMMAND python main.py ${CMAKE_BINARY_DIR}/lz4_decoder
311#)
312
313SET_PROPERTY(TEST greptest PROPERTY TIMEOUT 400)
314SET_PROPERTY(TEST proptest PROPERTY TIMEOUT 1500)
315SET_PROPERTY(TEST abc_test PROPERTY TIMEOUT 100)
316SET_PROPERTY(TEST u8u16_test editd_test base64_test PROPERTY TIMEOUT 40)
317
318
319add_custom_target (greptest
320  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
321  COMMAND python greptest.py "${CMAKE_BINARY_DIR}/icgrep")
322
323add_custom_target (proptest
324  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
325  COMMAND python greptest.py -d ${PROJECT_SOURCE_DIR}/../QA -t ${PROJECT_SOURCE_DIR}/../QA/proptest.xml "${CMAKE_BINARY_DIR}/icgrep")
326
327add_custom_target (u8u16_test
328  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/u8u16
329  COMMAND ./run_all "${CMAKE_BINARY_DIR}/u8u16 -segment-size=16 -enable-segment-pipeline-parallel")
330
331add_custom_target (u32u8_test
332  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
333  COMMAND ./test_u32u8 "${CMAKE_BINARY_DIR}/u32u8 -EnableAsserts -VerifyIR")
334
335add_custom_target (lz4d_test
336  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/lz4d
337  COMMAND ./run_all "${CMAKE_BINARY_DIR}/lz4d")
338
339add_custom_target (editd_test
340  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/editd
341  COMMAND python run_all.py -e ${CMAKE_BINARY_DIR})
342
343add_custom_target (base64_test
344  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/base64
345  COMMAND python base64test.py "${CMAKE_BINARY_DIR}/base64")
346
347#add_custom_target(character_deletion_test
348#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/character_deletion
349#  COMMAND python character_deletion_test.py ${CMAKE_BINARY_DIR}/character_deletion
350#)
351
352#add_custom_target(character_deposit_test
353#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/character_deposit
354#  COMMAND python character_deposit_test.py ${CMAKE_BINARY_DIR}/character_deposit
355#)
356
357#add_custom_target(lz4d_ext_dep_test
358#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA/lz4_decoder
359#  COMMAND python main.py ${CMAKE_BINARY_DIR}/lz4_decoder
360#)
361
362add_custom_target (abc_gen
363  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
364  COMMAND python abc_testgen.py)
365 
366add_custom_target (abc_test
367  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
368  COMMAND ./run_abc "${CMAKE_BINARY_DIR}/icgrep")
369
370add_custom_target (check
371  COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure
372  DEPENDS icgrep abc_gen)
373
374add_custom_target (perf_icgrep
375  COMMAND python2 perf.py icgrep
376  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../performance
377  DEPENDS icgrep)
378
379add_custom_target (viewer
380  COMMAND python2 viewer.py
381  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../performance)
382
383add_custom_target (text_viewer
384  COMMAND python2 viewer.py -t
385  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../performance)
386
387
Note: See TracBrowser for help on using the repository browser.