Просмотр исходного кода

Merge pull request #662 from mschmieder/fix_testrun_windows

fixed issue where CTest is executed in the wrong directory
Lee Thomason 8 лет назад
Родитель
Сommit
0741941589
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      CMakeLists.txt

+ 1 - 1
CMakeLists.txt

@@ -138,7 +138,7 @@ if(BUILD_TESTING AND BUILD_TESTS)
     COMMENT "Configuring xmltest resources directory: ${CMAKE_BINARY_DIR}/resources"
   )
 
-  add_test(NAME xmltest COMMAND xmltest)
+  add_test(NAME xmltest COMMAND xmltest WORKING_DIRECTORY $<TARGET_FILE_DIR:xmltest>)
 endif()
 
 install(FILES tinyxml2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})