chiark / gitweb /
Cleaner way to fix ctest (#144)
authorJulien Schueller <schueller@phimeca.com>
Mon, 11 Sep 2017 13:12:04 +0000 (15:12 +0200)
committerGitHub <noreply@github.com>
Mon, 11 Sep 2017 13:12:04 +0000 (15:12 +0200)
appveyor.yml
test/CMakeLists.txt

index 2d4a73a91bfb9baa35a21a95ac3c8ee89f20905e..6ded27081e811ff6b004ed3b6c1f3d0eaee19582 100644 (file)
@@ -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
index 90ac1ef12d9ddde79c904e53ff6387833a97182f..7ee60cf0ef5601d083dc1166bac876018dbe5585 100644 (file)
@@ -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 ()