CLDNN cmake simplification (#6384)
* CLDNN cmake simpplification * bfbgf
This commit is contained in:
@@ -187,6 +187,9 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
# Enable CMAKE_<LANG>_COMPILER_ID AppleClang
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0025 NEW)
|
||||
|
||||
set(CMAKE_WARN_DEPRECATED OFF)
|
||||
set(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION ON)
|
||||
|
||||
# LTO
|
||||
|
||||
if(ENABLE_LTO)
|
||||
|
||||
@@ -1,396 +0,0 @@
|
||||
# Copyright (c) 2016 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.
|
||||
|
||||
|
||||
# =============================== Compiler options (abstract configuration) ============================
|
||||
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "^Intel$")
|
||||
set(CMAKE_COMPILER_IS_INTEL ON)
|
||||
else()
|
||||
set(CMAKE_COMPILER_IS_INTEL OFF)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
if(CMAKE_COMPILER_IS_INTEL)
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "${CLDNN__MIN_COMPILER_VERSION__ICC}")
|
||||
message(FATAL_ERROR "[clDNN] required version of Intel C++ compiler is ${CLDNN__MIN_COMPILER_VERSION__ICC}. Please update compiler.")
|
||||
endif()
|
||||
else()
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "${CLDNN__MIN_COMPILER_VERSION__MSVC}")
|
||||
message(FATAL_ERROR "[clDNN] Minimum required version of Microsoft Visual C++ compiler is ${CLDNN__MIN_COMPILER_VERSION__MSVC}. Please update compiler.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
intel_flag_register_settings(
|
||||
CompilerOptions
|
||||
|
||||
GROUP NAME CallingConvention "/G[drzv]"
|
||||
GROUP NAME CompileAs "/T[CP]"
|
||||
GROUP NAME DebugInfoFormat "/Z[7iI]"
|
||||
GROUP NAME Exceptions "/EHa" "/EHsc?"
|
||||
GROUP NAME FaviorSizeSpeed "/O[st]"
|
||||
GROUP NAME Optimization "/O[d12xist]"
|
||||
GROUP NAME RuntimeLibrary "/M[TD]d?"
|
||||
GROUP NAME Rtti "/GR-?"
|
||||
GROUP NAME TreatWarnAsError "/WX-?"
|
||||
GROUP NAME DisableExtensions "/Za"
|
||||
GROUP NAME WarnLevels "/W[0-4]"
|
||||
|
||||
ALIAS CallingConvCdecl "/Gd"
|
||||
ALIAS CallingConvFastcall "/Gr"
|
||||
ALIAS CallingConvStdcall "/Gz"
|
||||
ALIAS CallingConvVectorcall "/Gv"
|
||||
ALIAS CompileAsC "/TC"
|
||||
ALIAS CompileAsCpp "/TP"
|
||||
ALIAS CompileAsDefault CompileAs REMOVE_GROUP
|
||||
ALIAS DebugInfoDisabled DebugInfoFormat REMOVE_GROUP
|
||||
ALIAS DebugInfoProgramDatabase "/Zi"
|
||||
ALIAS ExceptionsDisabled Exceptions REMOVE_GROUP
|
||||
ALIAS ExceptionsEnabled "/EHsc"
|
||||
ALIAS FaviorSize "/Os"
|
||||
ALIAS FaviorSpeed "/Ot"
|
||||
ALIAS MultiProcessorCompilation "/MP"
|
||||
ALIAS OptimizeDisabled "/Od"
|
||||
ALIAS OptimizeSize "/O2" "/Oi" "/Os"
|
||||
ALIAS OptimizeSpeed "/O2"
|
||||
ALIAS OptimizeFull "/Ox"
|
||||
ALIAS RtMultiThreadedStatic "/MT"
|
||||
ALIAS RtMultiThreadedShared "/MD"
|
||||
ALIAS RtMultiThreadedStaticDebug "/MTd"
|
||||
ALIAS RtMultiThreadedSharedDebug "/MDd"
|
||||
ALIAS RttiDisabled "/GR-"
|
||||
ALIAS RttiEnabled "/GR"
|
||||
ALIAS TreatWarnAsErrorDisabled "/WX-"
|
||||
ALIAS TreatWarnAsErrorEnabled "/WX"
|
||||
ALIAS WarnLevel0 "/W0"
|
||||
ALIAS WarnLevel1 "/W1"
|
||||
ALIAS WarnLevel2 "/W2"
|
||||
ALIAS WarnLevel3 "/W3"
|
||||
ALIAS WarnLevel4 "/W4"
|
||||
ALIAS ExtensionsDisabled "/Za"
|
||||
ALIAS ExtensionsEnabled DisableExtensions REMOVE_GROUP
|
||||
ALIAS StandardCxx11
|
||||
ALIAS StandardCxx14
|
||||
ALIAS StandardC99
|
||||
ALIAS StandardNone
|
||||
ALIAS FastMath
|
||||
ALIAS NoFastMath
|
||||
|
||||
ALIAS DeadCodeEliminate
|
||||
ALIAS DeadCodePreserve
|
||||
ALIAS StackProtector
|
||||
)
|
||||
elseif(CMAKE_COMPILER_IS_INTEL)
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "${CLDNN__MIN_COMPILER_VERSION__ICC}")
|
||||
message(FATAL_ERROR "[clDNN] required version of Intel C++ compiler is 17.0. Please update compiler.")
|
||||
endif()
|
||||
|
||||
intel_flag_register_settings(
|
||||
CompilerOptions
|
||||
|
||||
GROUP NAME DebugInfoFormat "-g[0-3]?"
|
||||
GROUP NAME Exceptions "-f(no-)?non-call-exceptions"
|
||||
GROUP NAME Optimization "-O[0-3sg]?"
|
||||
GROUP NAME Rtti "-f(no-)?rtti"
|
||||
GROUP NAME TreatWarnAsError "-Werror|-pedantic-errors"
|
||||
GROUP NAME Standard "-std=[^ ]+"
|
||||
GROUP NAME WarnLevels "-W(all|extra|pedantic)|-w|-pedantic"
|
||||
GROUP NAME FastMathOpts "-f(no-)?fast-math"
|
||||
|
||||
ALIAS CallingConvCdecl
|
||||
ALIAS CallingConvFastcall
|
||||
ALIAS CallingConvStdcall
|
||||
ALIAS CallingConvVectorcall
|
||||
ALIAS CompileAsC
|
||||
ALIAS CompileAsCpp
|
||||
ALIAS CompileAsDefault
|
||||
ALIAS DebugInfoDisabled "-g0"
|
||||
ALIAS DebugInfoProgramDatabase "-g"
|
||||
ALIAS ExceptionsDisabled "-fno-non-call-exceptions"
|
||||
ALIAS ExceptionsEnabled "-fnon-call-exceptions"
|
||||
ALIAS FaviorSize "-Os"
|
||||
ALIAS FaviorSpeed "-O3"
|
||||
ALIAS MultiProcessorCompilation
|
||||
ALIAS OptimizeDisabled "-O0"
|
||||
ALIAS OptimizeSize "-Os"
|
||||
ALIAS OptimizeSpeed "-O2"
|
||||
ALIAS OptimizeFull "-03"
|
||||
ALIAS RtMultiThreadedStatic
|
||||
ALIAS RtMultiThreadedShared
|
||||
ALIAS RtMultiThreadedStaticDebug
|
||||
ALIAS RtMultiThreadedSharedDebug
|
||||
ALIAS RttiDisabled "-fno-rtti"
|
||||
ALIAS RttiEnabled "-frtti"
|
||||
ALIAS TreatWarnAsErrorDisabled TreatWarnAsError REMOVE_GROUP
|
||||
ALIAS TreatWarnAsErrorEnabled "-Werror" "-pedantic-errors"
|
||||
ALIAS WarnLevel0 "-w"
|
||||
ALIAS WarnLevel1 WarnLevels REMOVE_GROUP
|
||||
ALIAS WarnLevel2 "-Wall"
|
||||
ALIAS WarnLevel3 "-Wall" "-pedantic"
|
||||
ALIAS WarnLevel4 "-Wall" "-Wextra" "-pedantic"
|
||||
ALIAS ExtensionsDisabled
|
||||
ALIAS ExtensionsEnabled
|
||||
ALIAS StandardCxx11 "-std=c++11"
|
||||
ALIAS StandardCxx14 "-std=c++14"
|
||||
ALIAS StandardC99 "-std=c99"
|
||||
ALIAS StandardNone Standard REMOVE_GROUP
|
||||
ALIAS FastMath
|
||||
ALIAS NoFastMath FastMathOpts REMOVE_GROUP
|
||||
|
||||
ALIAS DeadCodeEliminate
|
||||
ALIAS DeadCodePreserve
|
||||
ALIAS StackProtector
|
||||
)
|
||||
|
||||
if(CLDNN__COMPILE_LINK_ALLOW_UNSAFE_SIZE_OPT)
|
||||
intel_flag_register_settings(
|
||||
CompilerOptions
|
||||
|
||||
GROUP NAME EmitDataSec "-fdata-sections"
|
||||
GROUP NAME EmitFuncSec "-ffunction-sections"
|
||||
|
||||
ALIAS DeadCodeEliminate "-fdata-sections" "-ffunction-sections"
|
||||
ALIAS DeadCodePreserve EmitDataSec EmitFuncSec REMOVE_GROUP
|
||||
)
|
||||
endif()
|
||||
elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "${CLDNN__MIN_COMPILER_VERSION__GCC}")
|
||||
message(FATAL_ERROR "[clDNN] Minimum required version of GCC/G++ compiler is ${CLDNN__MIN_COMPILER_VERSION__GCC}. Please update compiler.")
|
||||
endif()
|
||||
|
||||
intel_flag_register_settings(
|
||||
CompilerOptions
|
||||
|
||||
GROUP NAME DebugInfoFormat "-g[0-3]?"
|
||||
GROUP NAME Exceptions "-f(no-)?exceptions"
|
||||
GROUP NAME Optimization "-O[0-3sg]?"
|
||||
GROUP NAME Rtti "-f(no-)?rtti"
|
||||
GROUP NAME TreatWarnAsError "-Werror|-pedantic-errors"
|
||||
GROUP NAME Standard "-std=[^ ]+"
|
||||
GROUP NAME WarnLevels "-W(all|extra|pedantic)|-w|-pedantic"
|
||||
GROUP NAME FastMathOpts "-f(no-)?fast-math"
|
||||
|
||||
ALIAS CallingConvCdecl
|
||||
ALIAS CallingConvFastcall
|
||||
ALIAS CallingConvStdcall
|
||||
ALIAS CallingConvVectorcall
|
||||
ALIAS CompileAsC
|
||||
ALIAS CompileAsCpp
|
||||
ALIAS CompileAsDefault
|
||||
ALIAS DebugInfoDisabled "-g0"
|
||||
ALIAS DebugInfoProgramDatabase "-g"
|
||||
ALIAS ExceptionsDisabled "-fno-exceptions"
|
||||
ALIAS ExceptionsEnabled "-fexceptions"
|
||||
ALIAS FaviorSize "-Os"
|
||||
ALIAS FaviorSpeed "-O3"
|
||||
ALIAS MultiProcessorCompilation
|
||||
ALIAS OptimizeDisabled "-O0"
|
||||
ALIAS OptimizeSize "-Os"
|
||||
ALIAS OptimizeSpeed "-O2"
|
||||
ALIAS OptimizeFull "-03"
|
||||
ALIAS RtMultiThreadedStatic
|
||||
ALIAS RtMultiThreadedShared
|
||||
ALIAS RtMultiThreadedStaticDebug
|
||||
ALIAS RtMultiThreadedSharedDebug
|
||||
ALIAS RttiDisabled "-fno-rtti"
|
||||
ALIAS RttiEnabled "-frtti"
|
||||
ALIAS TreatWarnAsErrorDisabled TreatWarnAsError REMOVE_GROUP
|
||||
ALIAS TreatWarnAsErrorEnabled "-Werror" "-pedantic-errors"
|
||||
ALIAS WarnLevel0 "-w"
|
||||
ALIAS WarnLevel1 WarnLevels REMOVE_GROUP
|
||||
ALIAS WarnLevel2 "-Wall"
|
||||
ALIAS WarnLevel3 "-Wall" "-pedantic"
|
||||
ALIAS WarnLevel4 "-Wall" "-Wextra" "-pedantic"
|
||||
ALIAS ExtensionsDisabled
|
||||
ALIAS ExtensionsEnabled
|
||||
ALIAS StandardCxx11 "-std=c++11"
|
||||
ALIAS StandardCxx14 "-std=c++14"
|
||||
ALIAS StandardC99 "-std=c99"
|
||||
ALIAS StandardNone Standard REMOVE_GROUP
|
||||
ALIAS FastMath "-ffast-math"
|
||||
ALIAS NoFastMath FastMathOpts REMOVE_GROUP
|
||||
|
||||
ALIAS DeadCodeEliminate
|
||||
ALIAS DeadCodePreserve
|
||||
)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9")
|
||||
intel_flag_register_settings(
|
||||
CompilerOptions
|
||||
ALIAS StackProtector "-fstack-protector"
|
||||
)
|
||||
else()
|
||||
intel_flag_register_settings(
|
||||
CompilerOptions
|
||||
ALIAS StackProtector "-fstack-protector-strong"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CLDNN__COMPILE_LINK_ALLOW_UNSAFE_SIZE_OPT)
|
||||
intel_flag_register_settings(
|
||||
CompilerOptions
|
||||
|
||||
GROUP NAME EmitDataSec "-fdata-sections"
|
||||
GROUP NAME EmitFuncSec "-ffunction-sections"
|
||||
|
||||
ALIAS DeadCodeEliminate "-fdata-sections" "-ffunction-sections"
|
||||
ALIAS DeadCodePreserve EmitDataSec EmitFuncSec REMOVE_GROUP
|
||||
)
|
||||
endif()
|
||||
elseif((CMAKE_C_COMPILER_ID MATCHES "^Clang$") OR (CMAKE_CXX_COMPILER_ID MATCHES "^Clang$"))
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "${CLDNN__MIN_COMPILER_VERSION__CLANG}")
|
||||
message(FATAL_ERROR "[clDNN] Minimum required version of clang compiler is ${CLDNN__MIN_COMPILER_VERSION__CLANG}. Please update compiler.")
|
||||
endif()
|
||||
|
||||
intel_flag_register_settings(
|
||||
CompilerOptions
|
||||
|
||||
GROUP NAME DebugInfoFormat "-g(dwardf-[2-4]?)?"
|
||||
GROUP NAME Exceptions "-f(no-)?exceptions"
|
||||
GROUP NAME Optimization "-O([0-4]?|fast|s|z)?"
|
||||
GROUP NAME Rtti "-f(no-)?rtti"
|
||||
GROUP NAME TreatWarnAsError "-Werror"
|
||||
GROUP NAME Standard "-std=[^ ]+"
|
||||
GROUP NAME WarnLevels "-W(all|extra|pedantic)|-w|-pedantic"
|
||||
GROUP NAME FastMathOpts "-f(no-)?fast-math"
|
||||
|
||||
ALIAS CallingConvCdecl
|
||||
ALIAS CallingConvFastcall
|
||||
ALIAS CallingConvStdcall
|
||||
ALIAS CallingConvVectorcall
|
||||
ALIAS CompileAsC
|
||||
ALIAS CompileAsCpp
|
||||
ALIAS CompileAsDefault
|
||||
ALIAS DebugInfoDisabled DebugInfoFormat REMOVE_GROUP
|
||||
ALIAS DebugInfoProgramDatabase "-g"
|
||||
ALIAS ExceptionsDisabled Exceptions REMOVE_GROUP
|
||||
ALIAS ExceptionsEnabled "-fexceptions"
|
||||
ALIAS FaviorSize "-Os"
|
||||
ALIAS FaviorSpeed "-O4"
|
||||
ALIAS MultiProcessorCompilation
|
||||
ALIAS OptimizeDisabled "-O0"
|
||||
ALIAS OptimizeSize "-Os"
|
||||
ALIAS OptimizeSpeed "-O2"
|
||||
ALIAS OptimizeFull "-04"
|
||||
ALIAS RtMultiThreadedStatic
|
||||
ALIAS RtMultiThreadedShared
|
||||
ALIAS RtMultiThreadedStaticDebug
|
||||
ALIAS RtMultiThreadedSharedDebug
|
||||
ALIAS RttiDisabled "-fno-rtti"
|
||||
ALIAS RttiEnabled Rtti REMOVE_GROUP
|
||||
ALIAS TreatWarnAsErrorDisabled TreatWarnAsError REMOVE_GROUP
|
||||
ALIAS TreatWarnAsErrorEnabled "-Werror"
|
||||
ALIAS WarnLevel0 "-w"
|
||||
ALIAS WarnLevel1 WarnLevels REMOVE_GROUP
|
||||
ALIAS WarnLevel2 "-Wall"
|
||||
ALIAS WarnLevel3 "-Wall" "-pedantic"
|
||||
ALIAS WarnLevel4 "-Wall" "-Wextra" "-pedantic"
|
||||
ALIAS ExtensionsDisabled
|
||||
ALIAS ExtensionsEnabled
|
||||
ALIAS StandardCxx11 "-std=c++11"
|
||||
ALIAS StandardCxx14 "-std=c++14"
|
||||
ALIAS StandardC99 "-std=c99"
|
||||
ALIAS StandardNone Standard REMOVE_GROUP
|
||||
ALIAS FastMath "-ffast-math"
|
||||
ALIAS NoFastMath FastMathOpts REMOVE_GROUP
|
||||
|
||||
ALIAS DeadCodeEliminate
|
||||
ALIAS DeadCodePreserve
|
||||
ALIAS StackProtector
|
||||
)
|
||||
|
||||
if(CLDNN__COMPILE_LINK_ALLOW_UNSAFE_SIZE_OPT)
|
||||
if(NOT APPLE)
|
||||
intel_flag_register_settings(
|
||||
CompilerOptions
|
||||
|
||||
GROUP NAME EmitDataSec "-fdata-sections"
|
||||
GROUP NAME EmitFuncSec "-ffunction-sections"
|
||||
|
||||
ALIAS DeadCodeEliminate "-fdata-sections" "-ffunction-sections"
|
||||
ALIAS DeadCodePreserve EmitDataSec EmitFuncSec REMOVE_GROUP
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "[clDNN] Unknown compiler. Please define support for it or use different compiler.")
|
||||
endif()
|
||||
|
||||
# =============================== Linker options (abstract configuration) ==============================
|
||||
|
||||
if(MSVC)
|
||||
intel_flag_register_settings(
|
||||
LinkerOptions
|
||||
|
||||
GROUP NAME DebugInfo "/[dD][eE][bB][uU][gG]"
|
||||
GROUP NAME DeadCode "/[oO][pP][tT]:([nN][oO])?[rR][eE][fF]"
|
||||
GROUP NAME IdenticalCodeData "/[oO][pP][tT]:([nN][oO])?[iI][cC][fF](=[0-9]+)?"
|
||||
GROUP NAME Incremental "/[iI][nN][cC][rR][eE][mM][eE][nN][tT][aA][lL](:[nN][oO])?"
|
||||
|
||||
ALIAS DebugInfoDisabled DebugInfo REMOVE_GROUP
|
||||
ALIAS DebugInfoProgramDatabase "/DEBUG"
|
||||
ALIAS DeadCodeEliminate "/OPT:REF"
|
||||
ALIAS DeadCodePreserve "/OPT:NOREF"
|
||||
ALIAS IdenticalCodeDataFold "/OPT:ICF"
|
||||
ALIAS IdenticalCodeDataNoFold "/OPT:NOICF"
|
||||
ALIAS IncrementalEnabled "/INCREMENTAL"
|
||||
ALIAS IncrementalDisabled "/INCREMENTAL:NO"
|
||||
)
|
||||
else()
|
||||
intel_flag_register_settings(
|
||||
LinkerOptions
|
||||
|
||||
ALIAS DebugInfoDisabled
|
||||
ALIAS DebugInfoProgramDatabase
|
||||
ALIAS DeadCodeEliminate
|
||||
ALIAS DeadCodePreserve
|
||||
ALIAS IdenticalCodeDataFold
|
||||
ALIAS IdenticalCodeDataNoFold
|
||||
ALIAS IncrementalEnabled
|
||||
ALIAS IncrementalDisabled
|
||||
)
|
||||
|
||||
if(CLDNN__COMPILE_LINK_ALLOW_UNSAFE_SIZE_OPT)
|
||||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
intel_flag_register_settings(
|
||||
LinkerOptions
|
||||
|
||||
GROUP NAME GcSections "-Wl,--gc-sections"
|
||||
|
||||
ALIAS DeadCodeEliminate "-Wl,--gc-sections"
|
||||
ALIAS DeadCodePreserve GcSections REMOVE_GROUP
|
||||
)
|
||||
elseif((CMAKE_C_COMPILER_ID MATCHES "^Clang$") OR (CMAKE_CXX_COMPILER_ID MATCHES "^Clang$"))
|
||||
if(APPLE)
|
||||
intel_flag_register_settings(
|
||||
LinkerOptions
|
||||
|
||||
GROUP NAME DeadStrip "-Wl,-dead_strip"
|
||||
|
||||
ALIAS DeadCodeEliminate "-Wl,-dead_strip"
|
||||
ALIAS DeadCodePreserve DeadStrip REMOVE_GROUP
|
||||
)
|
||||
else()
|
||||
intel_flag_register_settings(
|
||||
LinkerOptions
|
||||
|
||||
GROUP NAME GcSections "-Wl,--gc-sections"
|
||||
|
||||
ALIAS DeadCodeEliminate "-Wl,--gc-sections"
|
||||
ALIAS DeadCodePreserve GcSections REMOVE_GROUP
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
357
inference-engine/thirdparty/clDNN/CMakeLists.txt
vendored
357
inference-engine/thirdparty/clDNN/CMakeLists.txt
vendored
@@ -5,10 +5,6 @@
|
||||
cmake_minimum_required (VERSION 3.1)
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
# Register Intel helper modules.
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/utils/build/cmake/modules")
|
||||
include(IntelHelpers)
|
||||
|
||||
# ======================================================================================================
|
||||
# ==================================== BUILD CONFIGURATIONS (part 1) ===================================
|
||||
# ======================================================================================================
|
||||
@@ -83,72 +79,22 @@ set(CLDNN__KERNEL_SELECTOR_DIR "${CMAKE_CURRENT_SOURCE_DIR}/kernel_selecto
|
||||
# Path which points to directory with runtime
|
||||
set(CLDNN__RUNTIME_DIR "${CMAKE_CURRENT_SOURCE_DIR}/runtime")
|
||||
|
||||
# Build targets settings.
|
||||
|
||||
# Prefix for all targets in internal pass.
|
||||
set(CLDNN_BUILD__PROJ_NAME_PREFIX "")
|
||||
|
||||
# Code generation settings.
|
||||
|
||||
# Path which points to root directory where code generated elements are created.
|
||||
set(CLDNN__CODEGEN_BASEDIR "${CMAKE_CURRENT_BINARY_DIR}/codegen")
|
||||
# Path which points to root directory where code generated elements are created
|
||||
# (specific to build configuration).
|
||||
set(CLDNN__CODEGEN_DIR "${CLDNN__CODEGEN_BASEDIR}/${CLDNN__TARGET_CFG_VAR}")
|
||||
set(CLDNN__CODEGEN_DIR "${CLDNN__CODEGEN_BASEDIR}")
|
||||
|
||||
# Path which points to automatically included directory with code generated elements
|
||||
# (to support "copy-if-different" optimization).
|
||||
set(CLDNN__CODEGEN_INCDIR "${CLDNN__CODEGEN_DIR}/include")
|
||||
|
||||
# ======================================================================================================
|
||||
# ======================================================================================================
|
||||
# ======================================================================================================
|
||||
|
||||
# Detecting, setting and validating target architecture for compilation.
|
||||
|
||||
set(__CLDNN_RequestedArch "")
|
||||
|
||||
intel_arch_detect(__CLDNN_DetectedArch_Target __CLDNN_DetectedArch_Host __CLDNN_RequestedArch)
|
||||
intel_arch_validate(__CLDNN_DetectedArchValid_Target "${__CLDNN_DetectedArch_Target}")
|
||||
unset(__CLDNN_DetectedArch_Host)
|
||||
unset(__CLDNN_RequestedArch)
|
||||
|
||||
if(DEFINED CLDNN__ARCHITECTURE_TARGET)
|
||||
intel_arch_normalize(__CLDNN_Arch_Target "${CLDNN__ARCHITECTURE_TARGET}")
|
||||
elseif(__CLDNN_DetectedArchValid_Target)
|
||||
set(__CLDNN_Arch_Target "${__CLDNN_DetectedArch_Target}")
|
||||
message("[clDNN] CLDNN__ARCHITECTURE_TARGET: Target architecture is not specified. Trying to deduce it from context.")
|
||||
else()
|
||||
message(FATAL_ERROR "[clDNN] CLDNN__ARCHITECTURE_TARGET: Target architecture is not specified and cannot be deduced from context.
|
||||
Please specify one, e.g. Windows32, Linux64, Android32, Darwin32, ..."
|
||||
)
|
||||
endif()
|
||||
set(CLDNN__ARCHITECTURE_TARGET "${__CLDNN_Arch_Target}")
|
||||
unset(__CLDNN_Arch_Target)
|
||||
unset(__CLDNN_DetectedArchValid_Target)
|
||||
|
||||
intel_arch_validate(__CLDNN_ArchValid_Target "${CLDNN__ARCHITECTURE_TARGET}")
|
||||
if(NOT __CLDNN_ArchValid_Target)
|
||||
message(FATAL_ERROR "[clDNN] CLDNN__ARCHITECTURE_TARGET: Target architecture \"${CLDNN__ARCHITECTURE_TARGET}\" is invalid.
|
||||
Please specify correct one, e.g. Windows32, Linux64, Android32, Darwin32, ..."
|
||||
)
|
||||
endif()
|
||||
unset(__CLDNN_ArchValid_Target)
|
||||
|
||||
# ======================================================================================================
|
||||
# ============================================ CMAKE OPTIONS ===========================================
|
||||
# ======================================================================================================
|
||||
|
||||
# Target architecture for compilation.
|
||||
set(CLDNN__ARCHITECTURE_TARGET "${CLDNN__ARCHITECTURE_TARGET}" CACHE STRING "Target architecture for compilation." FORCE)
|
||||
if(MSVC)
|
||||
set_property(CACHE CLDNN__ARCHITECTURE_TARGET PROPERTY STRINGS "Windows32" "Windows64")
|
||||
elseif(DEFINED XCODE_VERSION)
|
||||
set_property(CACHE CLDNN__ARCHITECTURE_TARGET PROPERTY STRINGS "Darwin32" "Darwin64")
|
||||
endif()
|
||||
|
||||
# ======================================================================================================
|
||||
|
||||
# Include and build: Core of clDNN framework.
|
||||
set(CLDNN__INCLUDE_CORE ON CACHE BOOL "Include and build: clDNN core.")
|
||||
mark_as_advanced(CLDNN__INCLUDE_CORE)
|
||||
@@ -167,27 +113,6 @@ mark_as_advanced(CLDNN__INCLUDE_TESTS)
|
||||
|
||||
# ======================================================================================================
|
||||
|
||||
# Compile / Link: Use static C++ Runtime library.
|
||||
set(CLDNN__COMPILE_LINK_USE_STATIC_RUNTIME OFF CACHE BOOL "Compile / Link: Use static version of C++ Runtime library instead of shared one.")
|
||||
mark_as_advanced(CLDNN__COMPILE_LINK_USE_STATIC_RUNTIME)
|
||||
|
||||
# ======================================================================================================
|
||||
|
||||
# Compile / Link: Allow unsafe binary size optimizations.
|
||||
set(CLDNN__COMPILE_LINK_ALLOW_UNSAFE_SIZE_OPT ON CACHE BOOL "Compile / Link: Allow unsafe binary size optimizations.")
|
||||
mark_as_advanced(CLDNN__COMPILE_LINK_ALLOW_UNSAFE_SIZE_OPT)
|
||||
|
||||
# ======================================================================================================
|
||||
# ======================================================================================================
|
||||
|
||||
# Minimum versions of compilers.
|
||||
set(CLDNN__MIN_COMPILER_VERSION__MSVC "19.0")
|
||||
set(CLDNN__MIN_COMPILER_VERSION__CLANG "3.5")
|
||||
set(CLDNN__MIN_COMPILER_VERSION__ICC "17.0")
|
||||
set(CLDNN__MIN_COMPILER_VERSION__GCC "4.8")
|
||||
|
||||
# ======================================================================================================
|
||||
|
||||
# Check for python 3 interpreter (required tool).
|
||||
find_package(PythonInterp 3 QUIET)
|
||||
if(NOT PYTHONINTERP_FOUND)
|
||||
@@ -196,12 +121,6 @@ if(NOT PYTHONINTERP_FOUND)
|
||||
)
|
||||
endif()
|
||||
|
||||
# ======================================================================================================
|
||||
|
||||
# Setting helper variables for component paths.
|
||||
intel_arch_get_cpu(__CLDNN_TargetCpu "${CLDNN__ARCHITECTURE_TARGET}")
|
||||
string(TOLOWER "${__CLDNN_TargetCpu}" __CLDNN_TargetCpu)
|
||||
|
||||
# ======================================================================================================
|
||||
set(CLDNN_UTILS__RAPIDJSON_INCDIRS "utils/rapidjson" CACHE INTERNAL "Paths to interface headers for rapidjson.")
|
||||
|
||||
@@ -211,280 +130,13 @@ set(CLDNN_UTILS__RAPIDJSON_INCDIRS "utils/rapidjson" CACHE INTERNAL "Paths to in
|
||||
|
||||
# =================================== Main targets names and labels ====================================
|
||||
|
||||
set(CLDNN_BUILD__PROJ__clDNN "${CLDNN_BUILD__PROJ_NAME_PREFIX}clDNN_lib")
|
||||
set(CLDNN_BUILD__PROJ__clDNN "clDNN_lib")
|
||||
set(CLDNN_BUILD__PROJ_LABEL__clDNN "clDNN")
|
||||
|
||||
# ================================================ Outputs =============================================
|
||||
|
||||
# Main targets' output names.
|
||||
intel_arch_get_cpu(CLDNN__OUT_CPU_SUFFIX "${CLDNN__ARCHITECTURE_TARGET}")
|
||||
|
||||
set(CLDNN_BUILD__PROJ_OUTPUT_NAME__clDNN "clDNN${CLDNN__OUT_CPU_SUFFIX}")
|
||||
|
||||
|
||||
# RPATH for executables (Linux, Android, Mac)
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
|
||||
|
||||
# ============================== Abstraction of compiler and linker options ============================
|
||||
|
||||
include("${CMAKE_CURRENT_SOURCE_DIR}/CMakeCompilerLinkerOpts.txt" NO_POLICY_SCOPE)
|
||||
|
||||
# ======================================= Generic compiler options =====================================
|
||||
# Selecting C++ Runtime.
|
||||
if(CLDNN__COMPILE_LINK_USE_STATIC_RUNTIME)
|
||||
set(__CLDNN_RtType "RtMultiThreadedStatic")
|
||||
set(__CLDNN_RtTypeDebug "RtMultiThreadedStaticDebug")
|
||||
else()
|
||||
set(__CLDNN_RtType "RtMultiThreadedShared")
|
||||
set(__CLDNN_RtTypeDebug "RtMultiThreadedSharedDebug")
|
||||
endif()
|
||||
|
||||
foreach(__CLDNN_CompilerFlagName IN ITEMS "CMAKE_CXX_FLAGS" "CMAKE_C_FLAGS")
|
||||
# Change some generic settings of compiler.
|
||||
# NOTE: Debug info generation is enabled for all build configuration, because it is separate on Windows
|
||||
# and we will use "strip" command on Linux and Android (to separate it).
|
||||
intel_config_flag_apply_settings(
|
||||
CompilerOptions
|
||||
"${__CLDNN_CompilerFlagName}"
|
||||
ALL_PATTERN ""
|
||||
SET
|
||||
CompileAsDefault
|
||||
ExceptionsEnabled
|
||||
MultiProcessorCompilation
|
||||
DeadCodeEliminate
|
||||
ExtensionsEnabled
|
||||
TreatWarnAsErrorEnabled
|
||||
WarnLevel4
|
||||
NoFastMath
|
||||
StackProtector
|
||||
)
|
||||
intel_config_flag_apply_settings(
|
||||
CompilerOptions
|
||||
"${__CLDNN_CompilerFlagName}"
|
||||
ALL_PATTERN_NOINHERIT ""
|
||||
SET
|
||||
OptimizeSize
|
||||
"${__CLDNN_RtType}"
|
||||
)
|
||||
intel_config_flag_apply_settings(
|
||||
CompilerOptions
|
||||
"${__CLDNN_CompilerFlagName}"
|
||||
PATTERN "^Debug"
|
||||
SET
|
||||
OptimizeDisabled
|
||||
"${__CLDNN_RtTypeDebug}"
|
||||
)
|
||||
|
||||
# Adding needed settings specific to MSVC.
|
||||
if(MSVC)
|
||||
if(CMAKE_COMPILER_IS_INTEL)
|
||||
intel_config_flag_apply_settings(
|
||||
CompilerOptions
|
||||
"${__CLDNN_CompilerFlagName}"
|
||||
ALL_PATTERN ""
|
||||
SET_RAW
|
||||
"/wd177"
|
||||
"/wd367"
|
||||
"/wd411"
|
||||
"/wd2415"
|
||||
"/wd3280"
|
||||
"/wd3346"
|
||||
"/wd11074"
|
||||
"/wd11076"
|
||||
)
|
||||
else()
|
||||
if(__CLDNN_TargetCpu STREQUAL "32")
|
||||
intel_config_flag_apply_settings(
|
||||
CompilerOptions
|
||||
"${__CLDNN_CompilerFlagName}"
|
||||
ALL_PATTERN ""
|
||||
SET_RAW
|
||||
"/arch:SSE2"
|
||||
"/sdl"
|
||||
)
|
||||
else()
|
||||
intel_config_flag_apply_settings(
|
||||
CompilerOptions
|
||||
"${__CLDNN_CompilerFlagName}"
|
||||
ALL_PATTERN ""
|
||||
SET_RAW
|
||||
"/sdl"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
elseif(CMAKE_COMPILER_IS_INTEL)
|
||||
if(UNIX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -diag-warning=68,654,1125")
|
||||
endif()
|
||||
# Adding needed settings specific to GCC.
|
||||
# NOTE: Following options can be needed in the future (although some not recommended: NR):
|
||||
# [NR] -fno-short-enums
|
||||
# [NR] -fno-tree-pre
|
||||
# -fno-omit-frame-pointer
|
||||
# -Wa,--noexecstack
|
||||
# -fkeep-inline-functions
|
||||
elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
intel_config_flag_apply_settings(
|
||||
CompilerOptions
|
||||
"${__CLDNN_CompilerFlagName}"
|
||||
ALL_PATTERN ""
|
||||
SET_RAW
|
||||
-pipe
|
||||
-fmessage-length=0
|
||||
-fno-strict-aliasing
|
||||
-W
|
||||
-Wno-unknown-pragmas
|
||||
-Wwrite-strings
|
||||
-Wswitch
|
||||
-Wformat
|
||||
-Wformat-security
|
||||
-Wno-error=missing-field-initializers
|
||||
-Wno-error=unused-parameter
|
||||
-Wno-error=unused-function
|
||||
-Wno-error=pedantic
|
||||
-march=corei7
|
||||
-mstackrealign
|
||||
-msse
|
||||
-msse2
|
||||
-msse3
|
||||
-mssse3
|
||||
-msse4
|
||||
-msse4.1
|
||||
-msse4.2
|
||||
-fvisibility=hidden
|
||||
-finline
|
||||
-finline-functions
|
||||
-finline-limit=300
|
||||
-funswitch-loops
|
||||
-fPIE
|
||||
-fPIC
|
||||
-Wl,--no-undefined
|
||||
)
|
||||
elseif((CMAKE_C_COMPILER_ID MATCHES "^Clang$") OR (CMAKE_CXX_COMPILER_ID MATCHES "^Clang$"))
|
||||
intel_config_flag_apply_settings(
|
||||
CompilerOptions
|
||||
"${__CLDNN_CompilerFlagName}"
|
||||
ALL_PATTERN ""
|
||||
SET_RAW
|
||||
-pipe
|
||||
-fvisibility=hidden
|
||||
-fvisibility-inlines-hidden
|
||||
-Wall
|
||||
-Wno-covered-switch-default
|
||||
-Wextra
|
||||
-Wno-unused-parameter
|
||||
-Wno-gnu
|
||||
-pedantic
|
||||
-finline
|
||||
-msse4.2
|
||||
-fPIE
|
||||
-fPIC
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# C++ only options.
|
||||
intel_config_flag_apply_settings(
|
||||
CompilerOptions
|
||||
CMAKE_CXX_FLAGS
|
||||
ALL_PATTERN ""
|
||||
SET
|
||||
RttiEnabled
|
||||
StandardCxx11
|
||||
)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
intel_config_flag_apply_settings(
|
||||
CompilerOptions
|
||||
CMAKE_CXX_FLAGS
|
||||
ALL_PATTERN ""
|
||||
SET_RAW
|
||||
-fno-operator-names
|
||||
-fpermissive
|
||||
-fvisibility-inlines-hidden
|
||||
)
|
||||
endif()
|
||||
|
||||
# NOTE: When compiling with Clang, use the flags below for C++ files. These flags cannot be enabled when compiling
|
||||
# C files.
|
||||
if((CMAKE_C_COMPILER_ID MATCHES "^Clang$") OR (CMAKE_CXX_COMPILER_ID MATCHES "^Clang$"))
|
||||
intel_config_flag_apply_settings(
|
||||
CompilerOptions
|
||||
CMAKE_CXX_FLAGS
|
||||
ALL_PATTERN ""
|
||||
SET_RAW
|
||||
-stdlib=libc++
|
||||
)
|
||||
endif()
|
||||
|
||||
unset(__CLDNN_RtType)
|
||||
unset(__CLDNN_RtTypeDebug)
|
||||
unset(__CLDNN_CompilerFlagName)
|
||||
|
||||
# ======================================== Generic linker options ======================================
|
||||
|
||||
# Additional libraries that needs to be linked to shared objects/executables.
|
||||
set(CLDNN__SYSTEM_LINK_LIBRARIES)
|
||||
|
||||
foreach(__CLDNN_LinkerFlagName IN ITEMS "CMAKE_EXE_LINKER_FLAGS" "CMAKE_SHARED_LINKER_FLAGS")
|
||||
# Change some generic settings of linker.
|
||||
# NOTE: Debug info generation is enabled for all build configuration, because it is separate on Windows
|
||||
# and we will use "strip" command on Linux and Android (to separate it).
|
||||
intel_config_flag_apply_settings(
|
||||
LinkerOptions
|
||||
"${__CLDNN_LinkerFlagName}"
|
||||
ALL_PATTERN ""
|
||||
SET
|
||||
DeadCodeEliminate
|
||||
IdenticalCodeDataFold
|
||||
IncrementalDisabled
|
||||
)
|
||||
endforeach()
|
||||
|
||||
# Force static linking of common libraries on Android for shared objects.
|
||||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
intel_config_flag_apply_settings(
|
||||
LinkerOptions
|
||||
CMAKE_EXE_LINKER_FLAGS
|
||||
ALL_PATTERN ""
|
||||
SET_RAW
|
||||
-pie
|
||||
-Wl,-z,noexecstack,-z,relro,-z,now
|
||||
)
|
||||
intel_config_flag_apply_settings(
|
||||
LinkerOptions
|
||||
CMAKE_SHARED_LINKER_FLAGS
|
||||
ALL_PATTERN ""
|
||||
SET_RAW
|
||||
-Wl,-z,noexecstack,-z,relro,-z,now
|
||||
)
|
||||
list(APPEND CLDNN__SYSTEM_LINK_LIBRARIES "dl")
|
||||
endif()
|
||||
|
||||
if((CMAKE_C_COMPILER_ID MATCHES "^Clang$") OR (CMAKE_CXX_COMPILER_ID MATCHES "^Clang$"))
|
||||
intel_config_flag_apply_settings(
|
||||
LinkerOptions
|
||||
CMAKE_SHARED_LINKER_FLAGS
|
||||
ALL_PATTERN ""
|
||||
SET_RAW
|
||||
-shared
|
||||
-Wl,-undefined,dynamic_lookup
|
||||
-Wl,-headerpad_max_install_names
|
||||
)
|
||||
|
||||
list(APPEND CLDNN__SYSTEM_LINK_LIBRARIES "c++" "c++abi" "dl")
|
||||
if(NOT ANDROID)
|
||||
list(APPEND CLDNN__SYSTEM_LINK_LIBRARIES "supc++")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
unset(__CLDNN_LinkerFlagName)
|
||||
|
||||
# ======================================================================================================
|
||||
|
||||
# Clean-up of helper variables for component paths.
|
||||
unset(__CLDNN_TargetCpu)
|
||||
|
||||
# ===================================== Include/Link directories =======================================
|
||||
|
||||
include_directories(
|
||||
@@ -504,8 +156,3 @@ endif()
|
||||
if(CLDNN__INCLUDE_KERNEL_SELECTOR)
|
||||
add_subdirectory(kernel_selector)
|
||||
endif()
|
||||
|
||||
|
||||
# ======================================================================================================
|
||||
# ======================================================================================================
|
||||
# ======================================================================================================
|
||||
|
||||
@@ -8,16 +8,6 @@ set(CLDNN_BUILD__PROJ "cldnn_kernel_selector")
|
||||
set(CLDNN_BUILD__PROJ_LABEL "${CLDNN_BUILD__PROJ}")
|
||||
set(CLDNN_BUILD__PROJ_OUTPUT_NAME "${CLDNN_BUILD__PROJ}${CLDNN__OUT_CPU_SUFFIX}")
|
||||
|
||||
# ========================================== Compiler options ==========================================
|
||||
|
||||
intel_config_flag_apply_settings(
|
||||
CompilerOptions
|
||||
CMAKE_CXX_FLAGS
|
||||
ALL_PATTERN ""
|
||||
SET
|
||||
RttiEnabled
|
||||
)
|
||||
|
||||
# ================================== Compiler preprocessor definitions =================================
|
||||
|
||||
if (CLDNN__ENABLE_PERSISTENT_CACHE)
|
||||
@@ -156,7 +146,6 @@ if(WIN32)
|
||||
elseif((NOT ANDROID) AND (UNIX))
|
||||
target_link_libraries("${CLDNN_BUILD__PROJ}" pthread)
|
||||
endif()
|
||||
target_link_libraries("${CLDNN_BUILD__PROJ}" ${CLDNN__SYSTEM_LINK_LIBRARIES})
|
||||
|
||||
# =================================== Custom pre- and post-steps =======================================
|
||||
add_custom_command(OUTPUT "${__CLDNN_CGDirectory__cg_cache}/${__CLDNN_File__cg_cache__prim_db}"
|
||||
|
||||
@@ -8,16 +8,6 @@ set(CLDNN_BUILD__PROJ "cldnn_runtime")
|
||||
set(CLDNN_BUILD__PROJ_LABEL "${CLDNN_BUILD__PROJ}")
|
||||
set(CLDNN_BUILD__PROJ_OUTPUT_NAME "${CLDNN_BUILD__PROJ}${CLDNN__OUT_CPU_SUFFIX}")
|
||||
|
||||
# ========================================== Compiler options ==========================================
|
||||
|
||||
intel_config_flag_apply_settings(
|
||||
CompilerOptions
|
||||
CMAKE_CXX_FLAGS
|
||||
ALL_PATTERN ""
|
||||
SET
|
||||
RttiEnabled
|
||||
)
|
||||
|
||||
# ========================================= Source/Header files ========================================
|
||||
|
||||
set(__CLDNN_Directory__main "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
@@ -78,6 +68,5 @@ if(WIN32)
|
||||
elseif((NOT ANDROID) AND (UNIX))
|
||||
target_link_libraries("${CLDNN_BUILD__PROJ}" PRIVATE pthread)
|
||||
endif()
|
||||
target_link_libraries("${CLDNN_BUILD__PROJ}" PRIVATE ${CLDNN__SYSTEM_LINK_LIBRARIES})
|
||||
|
||||
# ======================================================================================================
|
||||
|
||||
@@ -18,14 +18,6 @@ if (OPENMP_FOUND)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
intel_config_flag_apply_settings(
|
||||
CompilerOptions
|
||||
CMAKE_CXX_FLAGS
|
||||
ALL_PATTERN ""
|
||||
SET
|
||||
RttiEnabled
|
||||
)
|
||||
|
||||
# ================================== Compiler preprocessor definitions =================================
|
||||
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
@@ -168,6 +160,9 @@ if(WIN32)
|
||||
elseif((NOT ANDROID) AND (UNIX))
|
||||
target_link_libraries("${CLDNN_BUILD__PROJ}" PRIVATE pthread)
|
||||
endif()
|
||||
target_link_libraries("${CLDNN_BUILD__PROJ}" PRIVATE ${CLDNN__SYSTEM_LINK_LIBRARIES})
|
||||
|
||||
# ======================================================================================================
|
||||
|
||||
ie_sse42_optimization_flags(sse4_2_flags)
|
||||
set_source_files_properties(gpu/detection_output_cpu.cpp half.cpp
|
||||
PROPERTIES COMPILE_FLAGS "${sse4_2_flags}")
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "condition_inst.h"
|
||||
#include "network_impl.h"
|
||||
#include "implementation_map.h"
|
||||
#include "math_utils.h"
|
||||
#include "register_gpu.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "loop_inst.h"
|
||||
#include "network_impl.h"
|
||||
#include "implementation_map.h"
|
||||
#include "math_utils.h"
|
||||
#include "register_gpu.hpp"
|
||||
#include "mutable_data_inst.h"
|
||||
#include "input_layout_inst.h"
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "cldnn/runtime/engine.hpp"
|
||||
#include "implementation_map.h"
|
||||
#include "network_impl.h"
|
||||
#include "math_utils.h"
|
||||
#include "cldnn/runtime/error_handler.hpp"
|
||||
#include "register_gpu.hpp"
|
||||
|
||||
|
||||
@@ -4,24 +4,10 @@
|
||||
|
||||
# ========================================= Name / Output settings =====================================
|
||||
|
||||
set(CLDNN_BUILD__PROJ "clDNN_unit_tests")
|
||||
set(CLDNN_BUILD__PROJ "clDNN_unit_tests64")
|
||||
set(CLDNN_BUILD__PROJ_LABEL "${CLDNN_BUILD__PROJ}")
|
||||
set(CLDNN_BUILD__PROJ_OUTPUT_NAME "${CLDNN_BUILD__PROJ}${CLDNN__OUT_CPU_SUFFIX}")
|
||||
|
||||
# =========================================== Compiler options =========================================
|
||||
intel_config_flag_apply_settings(CompilerOptions CMAKE_CXX_FLAGS ALL_PATTERN ""
|
||||
SET
|
||||
WarnLevel3
|
||||
StandardCxx11
|
||||
)
|
||||
if (NOT MSVC)
|
||||
intel_config_flag_apply_settings(CompilerOptions CMAKE_CXX_FLAGS ALL_PATTERN ""
|
||||
SET_RAW
|
||||
"-Wno-error=conversion-null"
|
||||
"-Wno-error=type-limits"
|
||||
)
|
||||
endif ()
|
||||
|
||||
# ========================================= Source/Header files ========================================
|
||||
|
||||
set(__CLDNN_Label__main "")
|
||||
@@ -120,6 +106,9 @@ if(WIN32)
|
||||
elseif((NOT ANDROID) AND (UNIX))
|
||||
target_link_libraries("${CLDNN_BUILD__PROJ}" PRIVATE pthread)
|
||||
endif()
|
||||
target_link_libraries("${CLDNN_BUILD__PROJ}" PRIVATE ${CLDNN__SYSTEM_LINK_LIBRARIES})
|
||||
|
||||
# ======================================================================================================
|
||||
|
||||
ie_sse42_optimization_flags(sse4_2_flags)
|
||||
set_source_files_properties(${__CLDNN_AllSources}
|
||||
PROPERTIES COMPILE_FLAGS "${sse4_2_flags}")
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user