forked from pytorch/glow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
27 lines (25 loc) · 1.06 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${GLOW_BINARY_DIR}/tests/)
add_subdirectory(Testing)
add_subdirectory(unittests)
add_subdirectory(images)
add_subdirectory(benchmark)
add_subdirectory(models)
# Set the lit configuration variables that are specific to that build.
# This is used to generate the proper set of "REQUIRES" features
# (e.g. opencl, cpu).
set(LIT_INPUT_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/litconfig.py.in")
set(LIT_CONFIG_HEADER
"## Autogenerated from ${LIT_INPUT_CONFIG}\n## Do not edit.\n")
set(LIT_CONFIG_FILE ${CMAKE_CURRENT_BINARY_DIR}/litconfig.py)
configure_file(${LIT_INPUT_CONFIG} ${LIT_CONFIG_FILE} @ONLY)
if (HAS_LLVM_TEST_ENV)
set(LIT_INVOCATION ${LLVM_LIT} -s -v ${CMAKE_CURRENT_SOURCE_DIR}
--param glow_config=${LIT_CONFIG_FILE})
add_custom_target(litTests
COMMAND ${LIT_INVOCATION}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
add_glow_test(NAME litTests
COMMAND ${LIT_INVOCATION}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
DEPENDS text-translator)
endif()