diff options
Diffstat (limited to 'inference-engine/src/extension/cmake')
-rw-r--r-- | inference-engine/src/extension/cmake/OptimizationFlags.cmake | 4 | ||||
-rw-r--r-- | inference-engine/src/extension/cmake/feature_defs.cmake | 51 |
2 files changed, 12 insertions, 43 deletions
diff --git a/inference-engine/src/extension/cmake/OptimizationFlags.cmake b/inference-engine/src/extension/cmake/OptimizationFlags.cmake index 38a31d681..ce7884797 100644 --- a/inference-engine/src/extension/cmake/OptimizationFlags.cmake +++ b/inference-engine/src/extension/cmake/OptimizationFlags.cmake @@ -1,7 +1,3 @@ -# Copyright (C) 2018 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 -# - # # service functions: # set_target_cpu_flags diff --git a/inference-engine/src/extension/cmake/feature_defs.cmake b/inference-engine/src/extension/cmake/feature_defs.cmake index d578f987b..4c07c2da5 100644 --- a/inference-engine/src/extension/cmake/feature_defs.cmake +++ b/inference-engine/src/extension/cmake/feature_defs.cmake @@ -1,45 +1,18 @@ -# Copyright (C) 2018 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2018 Intel Corporation # +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. cmake_minimum_required (VERSION 2.8) -macro(ext_message TRACE_LEVEL) - if (${TRACE_LEVEL} STREQUAL FATAL_ERROR) - if(InferenceEngine_FIND_REQUIRED) - message(FATAL_ERROR "${ARGN}") - elseif(NOT InferenceEngine_FIND_QUIETLY) - message(WARNING "${ARGN}") - endif() - return() - elseif(NOT InferenceEngine_FIND_QUIETLY) - message(${TRACE_LEVEL} "${ARGN}") - endif () -endmacro() - include(CPUID) include(OptimizationFlags) - -macro(enable_omp) - if(UNIX) # Linux - add_definitions(-fopenmp) - find_library(intel_omp_lib iomp5 - PATHS ${InferenceEngine_INCLUDE_DIRS}/../external/omp/lib - ) - elseif(WIN32) # Windows - if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC) - set(OPENMP_FLAGS "/Qopenmp /openmp") - set(CMAKE_SHARED_LINKER_FLAGS " ${CMAKE_SHARED_LINKER_FLAGS} /nodefaultlib:vcomp") - elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL Intel) - set(OPENMP_FLAGS "/Qopenmp /openmp") - else() - ext_message(WARNING "Unknown compiler ID. OpenMP support is disabled.") - endif() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPENMP_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OPENMP_FLAGS}") - find_library(intel_omp_lib - libiomp5md - PATHS "${InferenceEngine_INCLUDE_DIRS}/../lib/intel64/${CMAKE_BUILD_TYPE}" - ) - endif() -endmacro(enable_omp) |