[cfe-commits] r124969 - /cfe/trunk/test/CMakeLists.txt
Oscar Fuentes
ofv at wanadoo.es
Sat Feb 5 11:08:56 PST 2011
Author: ofv
Date: Sat Feb 5 13:08:56 2011
New Revision: 124969
URL: http://llvm.org/viewvc/llvm-project?rev=124969&view=rev
Log:
Support `make clang-test' when Clang is compiled outside of LLVM.
This may not work on build platforms that place the binaries on
special folders ($build_dir/bin/Release/) such as the VS IDE and
XCode. For fixing this it is necessary to add a lit.py configuration
option for saying where the Clang binaries are, and apply to that path
the same magit that is used with the path to the LLVM tools binary
directory. Doing this requires a bit of autoconf work.
Modified:
cfe/trunk/test/CMakeLists.txt
Modified: cfe/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CMakeLists.txt?rev=124969&r1=124968&r2=124969&view=diff
==============================================================================
--- cfe/trunk/test/CMakeLists.txt (original)
+++ cfe/trunk/test/CMakeLists.txt Sat Feb 5 13:08:56 2011
@@ -47,7 +47,13 @@
include(FindPythonInterp)
if(PYTHONINTERP_FOUND)
- set(CLANG_TEST_EXTRA_ARGS)
+ if( LLVM_MAIN_SRC_DIR )
+ set(LIT "${LLVM_SOURCE_DIR}/utils/lit/lit.py")
+ else()
+ set(LIT "${PATH_TO_LLVM_BUILD}/bin/llvm-lit")
+ endif()
+
+ set(CLANG_TEST_EXTRA_ARGS "--path=${CLANG_BINARY_DIR}/bin")
option(CLANG_TEST_USE_VG "Run Clang tests under Valgrind" OFF)
if(CLANG_TEST_USE_VG)
@@ -60,7 +66,7 @@
foreach(testdir ${CLANG_TEST_DIRECTORIES})
add_custom_target(clang-test-${testdir}
COMMAND ${PYTHON_EXECUTABLE}
- ${LLVM_SOURCE_DIR}/utils/lit/lit.py
+ ${LIT}
--param clang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
--param build_config=${CMAKE_CFG_INTDIR}
${LIT_ARGS}
@@ -71,7 +77,7 @@
add_custom_target(clang-test
COMMAND ${PYTHON_EXECUTABLE}
- ${LLVM_SOURCE_DIR}/utils/lit/lit.py
+ ${LIT}
--param clang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
--param build_config=${CMAKE_CFG_INTDIR}
${LIT_ARGS}
@@ -80,7 +86,7 @@
add_custom_target(clang-c++tests
COMMAND ${PYTHON_EXECUTABLE}
- ${LLVM_SOURCE_DIR}/utils/lit/lit.py
+ ${LIT}
--param clang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
--param build_config=${CMAKE_CFG_INTDIR}
${LIT_ARGS}
@@ -90,7 +96,7 @@
add_custom_target(check-all
COMMAND ${PYTHON_EXECUTABLE}
- ${LLVM_SOURCE_DIR}/utils/lit/lit.py
+ ${LIT}
--param build_config=${CMAKE_CFG_INTDIR}
--param build_mode=${RUNTIME_BUILD_MODE}
${LIT_ARGS}
More information about the cfe-commits
mailing list