From a9dc4c6a62e0ab604dec843a8a3fff69e421d522 Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Mon, 11 Sep 2017 15:12:04 +0200 Subject: [PATCH] Cleaner way to fix ctest (#144) --- appveyor.yml | 1 - test/CMakeLists.txt | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) 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 () -- 2.30.2