From 0be338d3cce82386d141b7205bb6bc8252fdad42 Mon Sep 17 00:00:00 2001 From: xzou Date: Wed, 11 Mar 2020 19:15:59 +0800 Subject: [PATCH] fix compile error without openmp on macos --- CMakeLists.txt | 3 +++ example/benchmark.cpp | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f3dc68973..d97124b18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,9 @@ IF(EXISTS "${CMAKE_SOURCE_DIR}/.git") ) endif() SET(BUILD_VERSION ${GIT_VERSION}) + IF(NOT BUILD_VERSION) + SET(BUILD_VERSION "v0.0.1") + ENDIF() ENDIF() ENDIF() message("BUILD_VERSION:${BUILD_VERSION}") diff --git a/example/benchmark.cpp b/example/benchmark.cpp index f35018fa6..dc9206979 100644 --- a/example/benchmark.cpp +++ b/example/benchmark.cpp @@ -1,8 +1,11 @@ #include #include -#include #include "facedetectcnn.h" +#ifdef _OPENMP +#include +#endif + using namespace cv; using namespace std;