darling-libcxx/test/CMakeLists.txt
Eric Fiselier 1070916643 [libcxx] Add --show-unsupported and --show-xfail to check-libcxx's default LIT args.
Summary:
In order to gather more information about testsuite results these flags should be added to LIT's default args.
These new switches were recently added to LIT. It been more than two weeks since both switches were added.
I think its time we add these to our LIT flags.


Reviewers: mclow.lists, danalbert

Reviewed By: danalbert

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D5037

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216315 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-23 04:33:20 +00:00

49 lines
1.4 KiB
CMake

macro(pythonize_bool var)
if (${var})
set(${var} True)
else()
set(${var} False)
endif()
endmacro()
include(FindPythonInterp)
if(PYTHONINTERP_FOUND)
if(LIBCXX_BUILT_STANDALONE)
set(LIT_EXECUTABLE "" CACHE FILEPATH "Path to LLVM's lit.py.")
else()
set(LIT_EXECUTABLE "${CMAKE_SOURCE_DIR}/utils/lit/lit.py")
endif()
set(LIT_ARGS_DEFAULT "-sv --show-unsupported --show-xfail")
if (MSVC OR XCODE)
set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar")
endif()
set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}"
CACHE STRING "Default options for lit")
set(LIT_ARGS "${LLVM_LIT_ARGS}")
separate_arguments(LIT_ARGS)
set(LIBCXX_COMPILER ${CMAKE_CXX_COMPILER})
set(LIBCXX_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
set(LIBCXX_BINARY_DIR ${CMAKE_BINARY_DIR})
set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
pythonize_bool(LIBCXX_ENABLE_SHARED)
set(AUTO_GEN_COMMENT "## Autogenerated by libcxx configuration.\n# Do not edit!")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
@ONLY)
add_custom_target(check-libcxx
COMMAND ${PYTHON_EXECUTABLE}
${LIT_EXECUTABLE}
${LIT_ARGS}
${CMAKE_CURRENT_BINARY_DIR}
DEPENDS cxx
COMMENT "Running libcxx tests")
else()
message(WARNING "Could not find Python, no check target will be available!")
endif()