From: Julien Schueller Date: Mon, 11 Sep 2017 13:12:04 +0000 (+0200) Subject: Cleaner way to fix ctest (#144) X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a9dc4c6a62e0ab604dec843a8a3fff69e421d522;p=nlopt.git Cleaner way to fix ctest (#144) --- diff --git a/appveyor.yml b/appveyor.yml index 2d4a73a..6ded270 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,5 +19,4 @@ build_script: - cd c:\projects\nlopt - cmake -G "%CMAKE_PLATFORM%" -DWITH_CXX=ON -DCMAKE_INSTALL_PREFIX="C:\projects\nlopt\install" . - cmake --build . --config %Configuration% --target install - - xcopy Release\nlopt_cxx.dll test\Release - ctest -C %Configuration% --output-on-failure --timeout 100 diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 90ac1ef..7ee60cf 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -26,6 +26,9 @@ foreach (algo_index RANGE 29)# 42 endif () if (enable_) add_test (NAME testopt_algo${algo_index}_obj${obj_index} COMMAND testopt -a ${algo_index} -o ${obj_index}) + if (WIN32) + set_tests_properties (testopt_algo${algo_index}_obj${obj_index} PROPERTIES ENVIRONMENT "PATH=${PROJECT_BINARY_DIR}\\${CMAKE_BUILD_TYPE};$ENV{PATH}") # to load dll + endif () endif () endforeach () endforeach ()