From 9d03360436e29a602e8dcfdb22f4425d039ce787 Mon Sep 17 00:00:00 2001 From: Matt Williams Date: Fri, 5 Mar 2010 12:24:46 +0000 Subject: [PATCH] Tell CTest the correct location of the test binaries on Windows. --- CMakeLists.txt | 3 +++ tests/CMakeLists.txt | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 07b7ca24..d6c5e026 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,9 @@ IF(WIN32) #work on Windows. See http://www.vtk.org/Bug/bug_view_advanced_page.php?bug_id=8366 SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) + #These are what _should_ be set. If we require 2.8 then test it with these. + #SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + #SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) ENDIF(WIN32) ADD_SUBDIRECTORY(library) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 8cbfa686..1b21bb15 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -7,7 +7,12 @@ MACRO(CREATE_TEST headerfile sourcefile executablename) QT4_WRAP_CPP(test_moc_SRCS ${headerfile}) ADD_EXECUTABLE(${executablename} ${sourcefile} ${test_moc_SRCS}) TARGET_LINK_LIBRARIES(${executablename} PolyVoxCore PolyVoxUtil ${QT_LIBRARIES}) - SET(LATEST_TEST ${CMAKE_CURRENT_BINARY_DIR}/${executablename}) + #HACK. This is needed since everything is built in the base dir in Windows. As of 2.8 we should change this. + IF(WIN32) + SET(LATEST_TEST ${EXECUTABLE_OUTPUT_PATH}/${executablename}) + ELSE(WIN32) + SET(LATEST_TEST ${CMAKE_CURRENT_BINARY_DIR}/${executablename}) + ENDIF(WIN32) ENDMACRO(CREATE_TEST) # Find the QTestLib stuff