diff --git a/CMakeLists.txt b/CMakeLists.txt index 80249cccced..694df3fc5b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # -cmake_minimum_required(VERSION 3.13 FATAL_ERROR) +cmake_minimum_required(VERSION 3.13) project(OpenVINO) diff --git a/cmake/developer_package/IEDevScriptsConfig.cmake b/cmake/developer_package/IEDevScriptsConfig.cmake index 52eba81c1f5..5eb30629bc0 100644 --- a/cmake/developer_package/IEDevScriptsConfig.cmake +++ b/cmake/developer_package/IEDevScriptsConfig.cmake @@ -181,7 +181,8 @@ endif() # Use solution folders set_property(GLOBAL PROPERTY USE_FOLDERS ON) -set(CMAKE_POLICY_DEFAULT_CMP0054 NEW) +# Enable CMAKE__COMPILER_ID AppleClang +set(CMAKE_POLICY_DEFAULT_CMP0025 NEW) # LTO diff --git a/cmake/developer_package/compile_flags/os_flags.cmake b/cmake/developer_package/compile_flags/os_flags.cmake index 9803e7439fd..8e3a5606ab7 100644 --- a/cmake/developer_package/compile_flags/os_flags.cmake +++ b/cmake/developer_package/compile_flags/os_flags.cmake @@ -205,6 +205,7 @@ if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") ie_add_compiler_flags(-fsigned-char) endif() +# Honor visibility properties for all target types set(CMAKE_POLICY_DEFAULT_CMP0063 NEW) set(CMAKE_CXX_VISIBILITY_PRESET hidden) set(CMAKE_C_VISIBILITY_PRESET hidden) diff --git a/cmake/developer_package/models.cmake b/cmake/developer_package/models.cmake index 69dc569048f..031112044b3 100644 --- a/cmake/developer_package/models.cmake +++ b/cmake/developer_package/models.cmake @@ -2,8 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 # -cmake_policy(SET CMP0054 NEW) - find_package(Git REQUIRED) set(MODELS_LST "") diff --git a/docs/template_plugin/CMakeLists.txt b/docs/template_plugin/CMakeLists.txt index 9dc58d8f994..f18c1076c68 100644 --- a/docs/template_plugin/CMakeLists.txt +++ b/docs/template_plugin/CMakeLists.txt @@ -3,7 +3,7 @@ # # [cmake:main] -cmake_minimum_required(VERSION 3.13 FATAL_ERROR) +cmake_minimum_required(VERSION 3.13) project(InferenceEngineTemplatePlugin) diff --git a/inference-engine/samples/CMakeLists.txt b/inference-engine/samples/CMakeLists.txt index b08c1ae7815..6dc1638a73b 100644 --- a/inference-engine/samples/CMakeLists.txt +++ b/inference-engine/samples/CMakeLists.txt @@ -4,16 +4,11 @@ cmake_minimum_required (VERSION 3.10) +# Enable CMAKE__COMPILER_ID AppleClang +cmake_policy(SET CMP0025 NEW) + project(Samples) -if(POLICY CMP0054) - cmake_policy(SET CMP0054 NEW) -endif() - -if(POLICY CMP0063) - cmake_policy(SET CMP0063 NEW) -endif() - if (CMAKE_BUILD_TYPE STREQUAL "") message(STATUS "CMAKE_BUILD_TYPE not defined, 'Release' will be used") set(CMAKE_BUILD_TYPE "Release") @@ -21,7 +16,7 @@ endif() set_property(GLOBAL PROPERTY USE_FOLDERS ON) -if (NOT(BIN_FOLDER)) +if (NOT BIN_FOLDER) string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} ARCH) if(ARCH STREQUAL "x86_64" OR ARCH STREQUAL "amd64") # Windows detects Intel's 64-bit CPU as AMD64 set(ARCH intel64) diff --git a/inference-engine/thirdparty/clDNN/CMakeLists.txt b/inference-engine/thirdparty/clDNN/CMakeLists.txt index 53f6100b118..7f6d2945cf3 100644 --- a/inference-engine/thirdparty/clDNN/CMakeLists.txt +++ b/inference-engine/thirdparty/clDNN/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required (VERSION 3.1 FATAL_ERROR) +cmake_minimum_required (VERSION 3.1) include(CheckCXXCompilerFlag) # Register Intel helper modules. diff --git a/ngraph/CMakeLists.txt b/ngraph/CMakeLists.txt index e9db9d565bc..03828f294b4 100644 --- a/ngraph/CMakeLists.txt +++ b/ngraph/CMakeLists.txt @@ -53,8 +53,6 @@ set(NGRAPH_INCLUDE_PATH if (APPLE) # Enable MACOS_RPATH by default. cmake_policy(SET CMP0042 NEW) - # Enable CMAKE__COMPILER_ID AppleClang - cmake_policy(SET CMP0025 NEW) endif() project (ngraph) diff --git a/tests/fuzz/CMakeLists.txt b/tests/fuzz/CMakeLists.txt index f4075c16e86..97f1829c39e 100644 --- a/tests/fuzz/CMakeLists.txt +++ b/tests/fuzz/CMakeLists.txt @@ -4,7 +4,7 @@ project(openvino_fuzzing) -cmake_minimum_required(VERSION 3.13 FATAL_ERROR) +cmake_minimum_required(VERSION 3.13) if (CMAKE_BUILD_TYPE STREQUAL "") message(STATUS "CMAKE_BUILD_TYPE not defined, 'Release' will be used") diff --git a/tests/stress_tests/CMakeLists.txt b/tests/stress_tests/CMakeLists.txt index 721ee87ede7..f21b3e6e7f1 100644 --- a/tests/stress_tests/CMakeLists.txt +++ b/tests/stress_tests/CMakeLists.txt @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # -cmake_minimum_required(VERSION 3.13 FATAL_ERROR) +cmake_minimum_required(VERSION 3.13) if (CMAKE_BUILD_TYPE STREQUAL "") message(STATUS "CMAKE_BUILD_TYPE not defined, 'Release' will be used") diff --git a/tests/time_tests/CMakeLists.txt b/tests/time_tests/CMakeLists.txt index 0a208187aaf..57ee88d8b41 100644 --- a/tests/time_tests/CMakeLists.txt +++ b/tests/time_tests/CMakeLists.txt @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # -cmake_minimum_required(VERSION 3.13 FATAL_ERROR) +cmake_minimum_required(VERSION 3.13) set (CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the build type")