Specify the project name when adding a test.

On Windows, with the devenv makecommand, this seems to be necessary.
With msbuild it is not needed, nor with nmake, but it is no harm anyway.

This is also what CMake does in its unit tests.

Change-Id: I45f867e699c28a43ee607b47db108021fc7fef8b
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Marcus D. Hanwell <marcus.hanwell@kitware.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
Stephen Kelly 2012-09-03 11:26:12 +02:00 committed by Qt by Nokia
parent 6c3ee80589
commit f5dccc899a

View File

@ -18,6 +18,7 @@ macro(expect_pass _dir)
"${CMAKE_CURRENT_BINARY_DIR}/${_dir}" "${CMAKE_CURRENT_BINARY_DIR}/${_dir}"
--build-generator ${CMAKE_GENERATOR} --build-generator ${CMAKE_GENERATOR}
--build-makeprogram ${CMAKE_MAKE_PROGRAM} --build-makeprogram ${CMAKE_MAKE_PROGRAM}
--build-project ${testname}
--build-options "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" ${BUILD_OPTIONS_LIST} --build-options "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" ${BUILD_OPTIONS_LIST}
) )
endmacro() endmacro()
@ -52,6 +53,7 @@ macro(expect_fail _dir)
"${CMAKE_CURRENT_BINARY_DIR}/failbuild/${_dir}/build" "${CMAKE_CURRENT_BINARY_DIR}/failbuild/${_dir}/build"
--build-generator ${CMAKE_GENERATOR} --build-generator ${CMAKE_GENERATOR}
--build-makeprogram ${CMAKE_MAKE_PROGRAM} --build-makeprogram ${CMAKE_MAKE_PROGRAM}
--build-project ${testname}
--build-options "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" ${BUILD_OPTIONS_LIST} --build-options "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" ${BUILD_OPTIONS_LIST}
) )
endmacro() endmacro()