diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ed6aaa..e732aa1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,7 +85,7 @@ IF(NOT MSVC) ENDIF() ENDIF(TORCH_FOUND) - IF( (NOT (${CMAKE_CXX_STANDARD} STREQUAL "14")) AND OpenCV_VERSION_MAJOR EQUAL 4) + IF( NOT CMAKE_CXX_STANDARD AND OpenCV_VERSION_MAJOR EQUAL 4) #Newest versions require std11 include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)