improve CI compatibility with updated opencv@2 and opencv@3 on mac, fix variable not expanded for vcpkg

pull/2952/head
Stefano Sinigardi 6 years ago
parent b8962b22eb
commit 73cc42c96d
  1. 5
      .gitignore
  2. 16
      .travis.yml
  3. 2
      DarknetConfig.cmake.in

5
.gitignore vendored

@ -34,5 +34,10 @@ Thumbs.db
.vs/ .vs/
.vscode/ .vscode/
# Managed by CMake
src/version.h
# Build artifacts
lib/ lib/
share/ share/
include/darknet/

@ -18,7 +18,7 @@ matrix:
compiler: gcc compiler: gcc
name: macOS - native gcc (llvm backend) - opencv@2 name: macOS - native gcc (llvm backend) - opencv@2
env: env:
- OpenCV_DIR="/usr/local/Cellar/opencv@2/2.4.13.7_2/" - OpenCV_DIR="/usr/local/opt/opencv@2/"
- additional_defines="-DOpenCV_DIR=${OpenCV_DIR}" - additional_defines="-DOpenCV_DIR=${OpenCV_DIR}"
- MATRIX_EVAL="brew install opencv@2" - MATRIX_EVAL="brew install opencv@2"
@ -26,7 +26,7 @@ matrix:
compiler: gcc compiler: gcc
name: macOS - native gcc (llvm backend) - opencv@3 name: macOS - native gcc (llvm backend) - opencv@3
env: env:
- OpenCV_DIR="/usr/local/Cellar/opencv@3/3.4.5/" - OpenCV_DIR="/usr/local/opt/opencv@3/"
- additional_defines="-DOpenCV_DIR=${OpenCV_DIR}" - additional_defines="-DOpenCV_DIR=${OpenCV_DIR}"
- MATRIX_EVAL="brew install opencv@3" - MATRIX_EVAL="brew install opencv@3"
@ -48,7 +48,7 @@ matrix:
compiler: clang compiler: clang
name: macOS - native clang - opencv@2 name: macOS - native clang - opencv@2
env: env:
- OpenCV_DIR="/usr/local/Cellar/opencv@2/2.4.13.7_2/" - OpenCV_DIR="/usr/local/opt/opencv@2/"
- additional_defines="-DOpenCV_DIR=${OpenCV_DIR}" - additional_defines="-DOpenCV_DIR=${OpenCV_DIR}"
- MATRIX_EVAL="brew install opencv@2" - MATRIX_EVAL="brew install opencv@2"
@ -56,7 +56,7 @@ matrix:
compiler: clang compiler: clang
name: macOS - native clang - opencv@3 name: macOS - native clang - opencv@3
env: env:
- OpenCV_DIR="/usr/local/Cellar/opencv@3/3.4.5/" - OpenCV_DIR="/usr/local/opt/opencv@3/"
- additional_defines="-DOpenCV_DIR=${OpenCV_DIR}" - additional_defines="-DOpenCV_DIR=${OpenCV_DIR}"
- MATRIX_EVAL="brew install opencv@3" - MATRIX_EVAL="brew install opencv@3"
@ -892,10 +892,10 @@ install:
- if [ -d "$HOME/vcpkg/.git" ] ; then echo vcpkg cached ; else rm -rf vcpkg ; git clone https://github.com/Microsoft/vcpkg ; fi - if [ -d "$HOME/vcpkg/.git" ] ; then echo vcpkg cached ; else rm -rf vcpkg ; git clone https://github.com/Microsoft/vcpkg ; fi
- cd vcpkg - cd vcpkg
- git pull - git pull
- if [[ USE_VCPKG = true ]] ; then ./bootstrap-vcpkg.sh ; fi - if [ "${USE_VCPKG}" = true ] ; then ./bootstrap-vcpkg.sh ; fi
- if [[ USE_VCPKG = true ]] ; then travis_wait ./vcpkg install stb pthreads ; fi - if [ "${USE_VCPKG}" = true ] ; then travis_wait ./vcpkg install stb pthreads ; fi
- if [[ USE_VCPKG = true ]] && [[ ! -z "${CUDACXX}" ]] ; then travis_wait ./vcpkg install opencv[ffmpeg,cuda] ; fi - if [ "${USE_VCPKG}" = true ] && [[ ! -z "${CUDACXX}" ]] ; then travis_wait ./vcpkg install opencv[ffmpeg,cuda] ; fi
- if [[ USE_VCPKG = true ]] && [[ -z "${CUDACXX}" ]] ; then travis_wait ./vcpkg install opencv[ffmpeg] ; fi - if [ "${USE_VCPKG}" = true ] && [[ -z "${CUDACXX}" ]] ; then travis_wait ./vcpkg install opencv[ffmpeg] ; fi
- popd - popd
before_script: before_script:

@ -29,6 +29,8 @@ find_dependency(Threads)
if(MSVC) if(MSVC)
find_dependency(PThreads_windows) find_dependency(PThreads_windows)
#add_definitions(-D_CRT_SECURE_NO_WARNINGS)
#set(CMAKE_CXX_FLAGS "/wd4018 /wd4244 /wd4267 /wd4305 ${CMAKE_CXX_FLAGS}")
endif() endif()
if(@ENABLE_OPENMP@) if(@ENABLE_OPENMP@)

Loading…
Cancel
Save