<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000;"><div>I'm using a MSVC 9.0 Generator with Cmake 2.8.2<br>
<br>How do I add a change so that the command for my RUN_TESTS project changes from the default of:<br><br>"C:\Program Files\CMake 2.8\bin\ctest.exe" --force-new-ctest-process -C $(OutDir)<br>if errorlevel 1 goto VCReportError<br><br>to<br><br>"C:\Program Files\CMake 2.8\bin\ctest.exe" --force-new-ctest-process -VV -C $(OutDir)<br>if errorlevel 1 goto VCReportError<br><br><br>My CMakeLists file has the following sections (I've omitted un-interesting items):<br><br><br>cmake_minimum_required (VERSION 2.6)<br>set(Boost_ADDITIONAL_VERSIONS "1.42" "1.42.0" "1.43" "1.43.0" "1.44" "1.44.0")<br>set(Boost_USE_MULTITHREADED ON)<br>set(Boost_USE_STATIC_LIBS ON)<br><br>project (SomthingCalc)<br>#convienent way to handle gtest so that the 5 gtest locations<br>#list below don't have to be set within cmake<br>#use of this assumes a folder layout such that 'include', 'Debug', and<br>#'Release' are subfolders of IDT_GTEST_ROOT and contain the
neede files<br>set(IDT_GTEST_ROOT "NOTFOUND" CACHE PATH "root for gtest" )<br>if( NOT IDT_GTEST_ROOT EQUAL "NOTFOUND")<br> set( GTEST_INCLUDE_DIR ${IDT_GTEST_ROOT}/include )<br> set( GTEST_LIBRARY ${IDT_GTEST_ROOT}/Release/gtest.lib )<br> set( GTEST_MAIN_LIBRARY ${IDT_GTEST_ROOT}/Release/gtest_main.lib ) <br> set( GTEST_LIBRARY_DEBUG ${IDT_GTEST_ROOT}/Debug/gtest.lib )<br> set( GTEST_MAIN_LIBRARY_DEBUG ${IDT_GTEST_ROOT}/Debug/gtest_main.lib )<br>endif() <br><br>set(BOOST_ROOT "C:/boost_1_43_0" CACHE PATH "root for boost")<br>find_package( Boost 1.41.0 COMPONENTS filesystem system REQUIRED )<br><br>enable_testing() <br>find_package(GTest
REQUIRED) <br>include_directories(${GTEST_INCLUDE_DIRS}) <br><br>#threads needed for gtest in linux<br>if(NOT MSVC)<br> find_package(Threads)<br>endif(NOT MSVC)<br><br>if(Boost_FOUND)<br> include_directories(${Boost_INCLUDE_DIRS})<br><br> #Keith's unit tests that use the regular 'database'<br> add_executable(KeithGtestRegular <br> unittestElements.cpp<br> ...<br> )<br> target_link_libraries(KeithGtestRegular ${GTEST_BOTH_LIBRARIES})<br> target_link_libraries(KeithGtestRegular <br>
${Boost_LIBRARIES}<br> )<br> if (CMAKE_USE_PTHREADS_INIT)<br> target_link_libraries(KeithGtestRegular ${CMAKE_THREAD_LIBS_INIT})<br> endif()<br><br> add_test(RegularGtests KeithGtestRegular "--gtest_output=xml:RegularTests.xml" ) <br><br>endif()<br><br></div>
</div><br>
</body></html>