Merge pull request #26383 from mshabunin:fix-samples-cpp-17

build: raise min cmake version to 3.13 in other places
This commit is contained in:
Alexander Smorkalov 2024-10-31 09:34:28 +03:00 committed by GitHub
commit a95658f106
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
23 changed files with 24 additions and 32 deletions

View File

@ -15,15 +15,7 @@ endif()
include(cmake/OpenCVMinDepVersions.cmake)
if(CMAKE_SYSTEM_NAME MATCHES WindowsPhone OR CMAKE_SYSTEM_NAME MATCHES WindowsStore)
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
#Required to resolve linker error issues due to incompatibility with CMake v3.0+ policies.
#CMake fails to find _fseeko() which leads to subsequent linker error.
#See details here: http://www.cmake.org/Wiki/CMake/Policies
cmake_policy(VERSION 2.8)
else()
cmake_minimum_required(VERSION "${MIN_VER_CMAKE}" FATAL_ERROR)
endif()
cmake_minimum_required(VERSION "${MIN_VER_CMAKE}" FATAL_ERROR)
#
# Configure CMake policies

View File

@ -110,7 +110,7 @@ endif()
# =============================================================================
else() # DEFINED CMAKE_HELPER_SCRIPT
cmake_minimum_required(VERSION 2.8.12.2)
cmake_minimum_required(VERSION 3.13)
cmake_policy(SET CMP0012 NEW)
include("${CMAKE_HELPER_SCRIPT}")
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVUtils.cmake")

View File

@ -61,7 +61,7 @@ int main(int argc, char** argv )
Now you have to create your CMakeLists.txt file. It should look like this:
@code{.cmake}
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.13)
project( DisplayImage )
find_package( OpenCV REQUIRED )
include_directories( ${OpenCV_INCLUDE_DIRS} )

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.13)
project(opencv_core_parallel_openmp CXX)
get_filename_component(OpenCV_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../../.." ABSOLUTE)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.13)
project(opencv_core_parallel_tbb CXX)
get_filename_component(OpenCV_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../../.." ABSOLUTE)

View File

@ -1,7 +1,7 @@
# FIXME: Rework standalone build in more generic maner
# (Restructure directories, add common pass, etc)
if(NOT DEFINED OPENCV_INITIAL_PASS)
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.13)
project(gapi_standalone)
include("cmake/standalone.cmake")
return()

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.13)
project(opencv_highgui_gtk)
get_filename_component(OpenCV_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../../.." ABSOLUTE)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.6)
cmake_minimum_required(VERSION 3.13)
project(opencv_jni_shared)

View File

@ -25,7 +25,7 @@ add_subdirectory(python3)
else() # standalone build
cmake_minimum_required(VERSION 2.8.12.2)
cmake_minimum_required(VERSION 3.13)
project(OpenCVPython CXX C)
include("./standalone.cmake")

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.13)
get_filename_component(OpenCV_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../.." ABSOLUTE)
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVPluginStandalone.cmake")

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.13)
get_filename_component(OpenCV_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../.." ABSOLUTE)
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVPluginStandalone.cmake")

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.6)
cmake_minimum_required(VERSION 3.13)
project("opencv")

View File

@ -7,7 +7,7 @@ import logging as log
log.basicConfig(format='%(message)s', level=log.DEBUG)
CMAKE_TEMPLATE='''\
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
CMAKE_MINIMUM_REQUIRED(VERSION 3.13)
# Enable C++17
set(CMAKE_CXX_STANDARD 17)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.13)
# load settings in case of "try compile"
set(TOOLCHAIN_CONFIG_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/toolchain.config.cmake")

View File

@ -1,5 +1,5 @@
# cmake needs this line
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.13)
if(NOT DEFINED EXAMPLE_NAME)
message(FATAL_ERROR "Invalid build script: missing EXAMPLE_NAME")

View File

@ -59,7 +59,7 @@ else()
# Standalone mode
#
#===================================================================================================
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.13)
project(samples C CXX)
option(BUILD_EXAMPLES "Build samples" ON)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.6)
cmake_minimum_required(VERSION 3.13)
set(target mixed_sample)
project(${target} CXX)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.6)
cmake_minimum_required(VERSION 3.13)
set(target JNIpart)
project(${target} CXX)

View File

@ -1,5 +1,5 @@
# cmake needs this line
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.13)
# Define project name
project(opencv_example_project)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.9)
cmake_minimum_required(VERSION 3.13)
find_package(OpenCV REQUIRED COMPONENTS opencv_core)

View File

@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
CMAKE_MINIMUM_REQUIRED(VERSION 3.13)
FIND_PACKAGE(CUDA REQUIRED)
INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS})
@ -7,4 +7,4 @@ FIND_PACKAGE(OpenCV REQUIRED COMPONENTS core)
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
CUDA_ADD_EXECUTABLE(opencv_thrust main.cu)
TARGET_LINK_LIBRARIES(opencv_thrust ${OpenCV_LIBS})
TARGET_LINK_LIBRARIES(opencv_thrust ${OpenCV_LIBS})

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12.2 FATAL_ERROR)
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
set(PROJECT_NAME "c_hal")
set(HAL_LIB_NAME "c_hal")

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12.2 FATAL_ERROR)
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
set(PROJECT_NAME "slow_hal")
set(HAL_LIB_NAME "slow_hal")