Skip to content

Commit

Permalink
Travis: Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Dec 1, 2020
1 parent bc5f39e commit c4d5683
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ matrix:
- pip install mkdocs python-markdown-math --user
- PATH=$PATH:~/.local/bin mkdocs build
- mkdir build && pushd build
- cmake -DCMAKE_INSTALL_PREFIX=~/.local -DNLOPT_MATLAB=OFF -DNLOPT_FORTRAN=ON -DCMAKE_C_FLAGS='-std=c89 -pedantic -D_POSIX_C_SOURCE=200112L -Wall -Wextra -Werror' -DCMAKE_CXX_FLAGS='-Wall -Wextra' ..
- cmake -DCMAKE_INSTALL_PREFIX=~/.local -DNLOPT_MATLAB=OFF -DNLOPT_FORTRAN=ON -DCMAKE_C_FLAGS='-std=c89 -pedantic -D_POSIX_C_SOURCE=200809L -Wall -Wextra -Werror' -DCMAKE_CXX_FLAGS='-Wall -Wextra' ..
- make install -j2 && ctest -j2 --output-on-failure
- rm -rf * ~/.local
- cmake -DCMAKE_INSTALL_PREFIX=~/.local -DNLOPT_PYTHON=OFF -DNLOPT_OCTAVE=OFF -DNLOPT_GUILE=OFF -DNLOPT_MATLAB=OFF -DNLOPT_FORTRAN=ON -DCMAKE_TOOLCHAIN_FILE=$PWD/../cmake/toolchain-x86_64-w64-mingw32.cmake ..
- make install -j2

- os: osx
install:
- brew update
- brew install swig octave guile || echo "nope"
#- brew update
- HOMEBREW_NO_AUTO_UPDATE=1 brew install swig octave guile || echo "nope"
script:
- mkdir build && pushd build
- cmake -DCMAKE_INSTALL_PREFIX=~/.local -DPYTHON_EXECUTABLE=/usr/bin/python -DNLOPT_FORTRAN=ON ..
Expand Down
3 changes: 2 additions & 1 deletion test/t_tutorial.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
#include <iomanip>
#include <nlopt.hpp>

double myvfunc(const std::vector<double> &x, std::vector<double> &grad, void *my_func_data)
double myvfunc(const std::vector<double> &x, std::vector<double> &grad, void *data)
{
(void)data;
if (!grad.empty()) {
grad[0] = 0.0;
grad[1] = 0.5 / sqrt(x[1]);
Expand Down

0 comments on commit c4d5683

Please sign in to comment.