blob: 427893313cc6769f4affe4568831e72f7e2b3995 [file]
##===----------------------------------------------------------------------===##
#
# Add ompTest unit tests to check-openmp.
#
##===----------------------------------------------------------------------===##
# Target: ompTest library unit tests
file(GLOB UNITTEST_SOURCES "unittests/*.cpp")
add_executable(omptest-unittests ${UNITTEST_SOURCES})
# Add local and LLVM-provided GoogleTest include directories.
target_include_directories(omptest-unittests PRIVATE
../include
${LLVM_THIRD_PARTY_DIR}/unittest/googletest/include)
target_link_libraries(omptest-unittests PRIVATE omptest)
set_target_properties(omptest-unittests PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
# Add ompTest unit tests to check-openmp
add_openmp_testsuite(check-ompt-omptest "Running OMPT ompTest unit tests"
${CMAKE_CURRENT_BINARY_DIR} DEPENDS omptest-unittests)
# Configure the lit.site.cfg.in file
set(AUTO_GEN_COMMENT "## Autogenerated by OPENMP_TOOLS_OMPTEST_TEST "
"configuration.\n# Do not edit!")
configure_file(lit.site.cfg.in lit.site.cfg @ONLY)