[cfe-dev] windows testing - lit.py failure
Óscar Fuentes
ofv at wanadoo.es
Mon Apr 11 18:59:51 PDT 2011
David Neto <dneto.llvm at gmail.com> writes:
> Ack! I'm withdrawing this patch. Sorry. It turns out the resulting
> compilation line is still quite badly broken.
>
> I've been struggling to get the MSVC 9 + NMake flow going. Only now
> have I been able to run tests in bulk.
>
> I need to investigate some more.
I followed a different approach: fix the problem from the cmake
file. This patch still fails some tests, but if you can figure out what
the problem is with the command line it generates maybe I could extend
it for a definitive fix. Please note that you don't need to know cmake,
just do a `nmake check' and see what's wrong with the commands shown for
the failed tests.
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -37,11 +37,15 @@ if(PYTHONINTERP_FOUND)
foreach(INC_DIR ${INC_DIRS})
set(IDIRS "${IDIRS} -I${INC_DIR}")
endforeach()
- string(REPLACE "<CMAKE_CXX_COMPILER>" "${CMAKE_CXX_COMPILER}" TEST_COMPILE_CXX_CMD ${CMAKE_CXX_COMPILE_OBJECT})
+ string(REPLACE "<CMAKE_CXX_COMPILER>" "\"${CMAKE_CXX_COMPILER}\"" TEST_COMPILE_CXX_CMD ${CMAKE_CXX_COMPILE_OBJECT})
+ string(REPLACE "@" "" TEST_COMPILE_CXX_CMD ${TEST_COMPILE_CXX_CMD})
string(REPLACE "<DEFINES>" "${DEFS}" TEST_COMPILE_CXX_CMD ${TEST_COMPILE_CXX_CMD})
string(REPLACE "<FLAGS>" "${CMAKE_CXX_FLAGS}" TEST_COMPILE_CXX_CMD ${TEST_COMPILE_CXX_CMD})
string(REPLACE "-o" "" TEST_COMPILE_CXX_CMD ${TEST_COMPILE_CXX_CMD})
string(REGEX REPLACE "<[^>]+>" "" TEST_COMPILE_CXX_CMD ${TEST_COMPILE_CXX_CMD})
+ message(STATUS "cmd: ${TEST_COMPILE_CXX_CMD}")
+ string(REPLACE "\n<<" " " TEST_COMPILE_CXX_CMD ${TEST_COMPILE_CXX_CMD})
+ message(STATUS "cmd: ${TEST_COMPILE_CXX_CMD}")
set(TEST_COMPILE_CXX_CMD "${TEST_COMPILE_CXX_CMD} ${IDIRS}")
if(NOT MSVC)
set(TEST_COMPILE_CXX_CMD "${TEST_COMPILE_CXX_CMD} -x c++")
> Again, I apologize.
No problem.
More information about the cfe-dev
mailing list