1 macro(pythonize_bool var)
9 include(FindPythonInterp)
10 if(PYTHONINTERP_FOUND)
11 if(LIBCXX_BUILT_STANDALONE)
12 set(LIT_EXECUTABLE "" CACHE FILEPATH "Path to LLVM's lit.py.")
14 set(LIT_EXECUTABLE "${CMAKE_SOURCE_DIR}/utils/lit/lit.py")
17 set(LIT_ARGS_DEFAULT "-sv")
19 set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar")
21 set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}"
22 CACHE STRING "Default options for lit")
23 set(LIT_ARGS "${LLVM_LIT_ARGS}")
24 separate_arguments(LIT_ARGS)
26 set(LIBCXX_COMPILER ${CMAKE_CXX_COMPILER})
27 set(LIBCXX_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
28 set(LIBCXX_BINARY_DIR ${CMAKE_BINARY_DIR})
29 set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
30 pythonize_bool(LIBCXX_ENABLE_SHARED)
31 pythonize_bool(LIBCXX_HAS_STDCXX0X_FLAG)
33 set(AUTO_GEN_COMMENT "## Autogenerated by libcxx configuration.\n# Do not edit!")
36 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
37 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
40 add_custom_target(check-libcxx
41 COMMAND ${PYTHON_EXECUTABLE}
44 ${CMAKE_CURRENT_BINARY_DIR}
46 COMMENT "Running libcxx tests")
48 message(WARNING "Could not find Python, no check target will be available!")