Use ninja multi-config (#8757)
* Use ninja multu-config
* Reused OV_GENERATOR_MULTI_CONFIG
* Try to use config in api_validator post build task
* Fixes
* Revert "[GPU] Fix multi configuration build of onednn_gpu (#8743)"
This reverts commit a862331732.
* Propogate disable deprecated for _RELEASE flags as well
This commit is contained in:
@@ -230,10 +230,7 @@ function( compile_pyx _name generated_file )
|
||||
set( no_docstrings_arg "--no-docstrings" )
|
||||
endif()
|
||||
|
||||
if( "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR
|
||||
"${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo" )
|
||||
set( cython_debug_arg "--gdb" )
|
||||
endif()
|
||||
set( cython_debug_arg "$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:--gdb>" )
|
||||
|
||||
if( "${PYTHONLIBS_VERSION_STRING}" MATCHES "^3." )
|
||||
set( version_arg "-3" )
|
||||
|
||||
@@ -26,9 +26,8 @@ ie_add_plugin(NAME ${TARGET_NAME}
|
||||
SOURCES ${MAIN_SRC} ${LIBRARY_HEADERS}
|
||||
VERSION_DEFINES_FOR cldnn_engine.cpp)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
target_compile_options(${TARGET_NAME} PRIVATE -Os)
|
||||
endif()
|
||||
target_compile_options(${TARGET_NAME} PRIVATE
|
||||
$<$<CONFIG:Release>:$<IF:$<CXX_COMPILER_ID:MSVC>,/Os,-Os>>)
|
||||
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE clDNN_lib pugixml::static
|
||||
inference_engine_transformations
|
||||
|
||||
@@ -9,9 +9,6 @@ addIeTargetTest(
|
||||
ROOT ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
INCLUDES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
$<TARGET_PROPERTY:inference_engine,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
DEPENDENCIES
|
||||
ir_ov_frontend
|
||||
LINK_LIBRARIES
|
||||
PRIVATE
|
||||
gflags
|
||||
@@ -21,4 +18,8 @@ addIeTargetTest(
|
||||
ADD_CPPLINT
|
||||
)
|
||||
|
||||
if(TARGET ir_ov_frontend)
|
||||
add_dependencies(${TARGET_NAME} ir_ov_frontend)
|
||||
endif()
|
||||
|
||||
ie_faster_build(${TARGET_NAME} UNITY)
|
||||
|
||||
@@ -12,9 +12,6 @@ project("${CLDNN__PROJ_NAME}")
|
||||
# ====================================== HELPER CONSTANT VARIABLES =====================================
|
||||
# ======================================================================================================
|
||||
# ======================================================================================================
|
||||
if (ENABLE_ONEDNN_FOR_GPU)
|
||||
set(ONEDNN_LIBRARY onednn_gpu_tgt)
|
||||
endif()
|
||||
|
||||
if(ENABLE_GPU_DEBUG_CAPS)
|
||||
add_definitions(-DGPU_DEBUG_CONFIG=1)
|
||||
|
||||
@@ -125,9 +125,8 @@ add_library("${CLDNN_BUILD__PROJ}" STATIC
|
||||
${__CLDNN_AllSources}
|
||||
)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
target_compile_options(${CLDNN_BUILD__PROJ} PRIVATE -Os)
|
||||
endif()
|
||||
target_compile_options("${CLDNN_BUILD__PROJ}" PRIVATE
|
||||
$<$<CONFIG:Release>:$<IF:$<CXX_COMPILER_ID:MSVC>,/Os,-Os>>)
|
||||
|
||||
set_property(TARGET "${CLDNN_BUILD__PROJ}" PROPERTY PROJECT_LABEL "${CLDNN_BUILD__PROJ_LABEL}")
|
||||
|
||||
|
||||
@@ -47,9 +47,8 @@ add_library("${CLDNN_BUILD__PROJ}" STATIC
|
||||
${__CLDNN_AllSources}
|
||||
)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
target_compile_options(${CLDNN_BUILD__PROJ} PRIVATE -Os)
|
||||
endif()
|
||||
target_compile_options("${CLDNN_BUILD__PROJ}" PRIVATE
|
||||
$<$<CONFIG:Release>:$<IF:$<CXX_COMPILER_ID:MSVC>,/Os,-Os>>)
|
||||
|
||||
set_property(TARGET "${CLDNN_BUILD__PROJ}" PROPERTY PROJECT_LABEL "${CLDNN_BUILD__PROJ_LABEL}")
|
||||
|
||||
@@ -67,15 +66,7 @@ target_link_libraries("${CLDNN_BUILD__PROJ}" PRIVATE
|
||||
)
|
||||
|
||||
if(ENABLE_ONEDNN_FOR_GPU)
|
||||
get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
if (isMultiConfig)
|
||||
add_dependencies(${CLDNN_BUILD__PROJ} onednn_gpu_build)
|
||||
foreach(dir IN LISTS ONEDNN_INCLUDE_DIRS)
|
||||
target_include_directories("${CLDNN_BUILD__PROJ}" PUBLIC $<BUILD_INTERFACE:${dir}>)
|
||||
endforeach()
|
||||
target_compile_definitions("${CLDNN_BUILD__PROJ}" PUBLIC ENABLE_ONEDNN_FOR_GPU)
|
||||
endif()
|
||||
target_link_libraries("${CLDNN_BUILD__PROJ}" PUBLIC ${ONEDNN_LIBRARY})
|
||||
target_link_libraries("${CLDNN_BUILD__PROJ}" PUBLIC onednn_gpu_tgt)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
|
||||
@@ -111,9 +111,8 @@ add_library("${CLDNN_BUILD__PROJ}" STATIC
|
||||
${__CLDNN_AllSources}
|
||||
)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
target_compile_options(${CLDNN_BUILD__PROJ} PRIVATE -Os)
|
||||
endif()
|
||||
target_compile_options("${CLDNN_BUILD__PROJ}" PRIVATE
|
||||
$<$<CONFIG:Release>:$<IF:$<CXX_COMPILER_ID:MSVC>,/Os,-Os>>)
|
||||
|
||||
set_property(TARGET "${CLDNN_BUILD__PROJ}" PROPERTY PROJECT_LABEL "${CLDNN_BUILD__PROJ_LABEL}")
|
||||
|
||||
@@ -128,15 +127,7 @@ target_link_libraries("${CLDNN_BUILD__PROJ}" PRIVATE
|
||||
)
|
||||
|
||||
if(ENABLE_ONEDNN_FOR_GPU)
|
||||
get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
if (isMultiConfig)
|
||||
add_dependencies(${CLDNN_BUILD__PROJ} onednn_gpu_build)
|
||||
foreach(dir IN LISTS ONEDNN_INCLUDE_DIRS)
|
||||
target_include_directories("${CLDNN_BUILD__PROJ}" PUBLIC $<BUILD_INTERFACE:${dir}>)
|
||||
endforeach()
|
||||
target_compile_definitions("${CLDNN_BUILD__PROJ}" PUBLIC ENABLE_ONEDNN_FOR_GPU)
|
||||
endif()
|
||||
target_link_libraries("${CLDNN_BUILD__PROJ}" PUBLIC ${ONEDNN_LIBRARY})
|
||||
target_link_libraries("${CLDNN_BUILD__PROJ}" PUBLIC onednn_gpu_tgt)
|
||||
endif()
|
||||
|
||||
if(COMMAND add_cpplint_target)
|
||||
|
||||
Reference in New Issue
Block a user