Skip to content

Commit

Permalink
cmake: fix cmake cache args in opencv (#5959)
Browse files Browse the repository at this point in the history
Co-authored-by: oneflow-ci-bot <69100618+oneflow-ci-bot@users.noreply.github.com>
  • Loading branch information
PragmaTwice and oneflow-ci-bot committed Aug 19, 2021
1 parent 533018a commit e9ea441
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmake/third_party/opencv.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ endforeach()
if (THIRD_PARTY)

if (CMAKE_C_COMPILER_LAUNCHER STREQUAL "ccache")
set(OPENCV_C_COMPILER_LAUNCHER_DEF "-DENABLE_CCACHE=ON")
set(OPENCV_C_COMPILER_LAUNCHER_DEF "-DENABLE_CCACHE:BOOL=ON")
else()
set(OPENCV_C_COMPILER_LAUNCHER_DEF "-DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}")
set(OPENCV_C_COMPILER_LAUNCHER_DEF "-DCMAKE_C_COMPILER_LAUNCHER:STRING=${CMAKE_C_COMPILER_LAUNCHER}")
endif()

if (CMAKE_CXX_COMPILER_LAUNCHER STREQUAL "ccache")
set(OPENCV_CXX_COMPILER_LAUNCHER_DEF "-DENABLE_CCACHE=ON")
set(OPENCV_CXX_COMPILER_LAUNCHER_DEF "-DENABLE_CCACHE:BOOL=ON")
else()
set(OPENCV_CXX_COMPILER_LAUNCHER_DEF "-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}")
set(OPENCV_CXX_COMPILER_LAUNCHER_DEF "-DCMAKE_CXX_COMPILER_LAUNCHER:STRING=${CMAKE_CXX_COMPILER_LAUNCHER}")
endif()

ExternalProject_Add(opencv
Expand Down

0 comments on commit e9ea441

Please sign in to comment.