CMake: add IGDRCL_SOURCE_DIR to prefixes in create_project_source_tree macro

Change-Id: I0fceeab0b42fe58ec92fbaaa4b4704c0b2344647
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski 2019-10-09 14:24:46 +02:00 committed by sys_ocldev
parent fab1601394
commit e4ed7e7f12
7 changed files with 10 additions and 9 deletions

View File

@ -29,13 +29,14 @@ endmacro()
macro(create_project_source_tree target)
if(MSVC)
set(prefixes ${CMAKE_CURRENT_SOURCE_DIR} ${ARGN})
set(prefixes ${CMAKE_CURRENT_SOURCE_DIR} ${ARGN} ${IGDRCL_SOURCE_DIR})
get_target_property(source_list ${target} SOURCES)
foreach(source_file ${source_list})
if(NOT ${source_file} MATCHES "\<*\>")
set(source_file_relative ${source_file})
string(TOLOWER ${source_file} source_file_relative)
foreach(prefix ${prefixes})
if(source_file_relative)
string(TOLOWER ${prefix} prefix)
string(REPLACE "${prefix}" "" source_file_relative ${source_file_relative})
endif()
endforeach()

View File

@ -97,7 +97,7 @@ endif()
add_subdirectories()
create_project_source_tree(ocloc ${IGDRCL_SOURCE_DIR})
create_project_source_tree(ocloc)
set(CLOC_INCLUDES
${ENGINE_NODE_DIR}

View File

@ -175,10 +175,10 @@ if(${GENERATE_EXECUTABLE})
OUTPUT_NAME "${NEO_DLL_NAME_BASE}${IGDRCL_NAME_POSTFIX}${IGDRCL_OPTION__BITS}"
)
set_target_properties(${NEO_DYNAMIC_LIB_NAME} PROPERTIES FOLDER "opencl runtime")
create_project_source_tree_with_exports(${NEO_DYNAMIC_LIB_NAME} "${EXPORTS_FILENAME}" ${IGDRCL_SOURCE_DIR})
create_project_source_tree_with_exports(${NEO_DYNAMIC_LIB_NAME} "${EXPORTS_FILENAME}")
endif(${GENERATE_EXECUTABLE})
create_project_source_tree(${NEO_STATIC_LIB_NAME} ${IGDRCL_SOURCE_DIR})
create_project_source_tree(${NEO_STATIC_LIB_NAME})
if(UNIX AND NOT (TARGET clang-tidy))
add_custom_target(clang-tidy

View File

@ -525,7 +525,7 @@ apply_macro_for_each_gen("TESTED")
add_subdirectories()
add_dependencies(unit_tests mock_gmm)
add_dependencies(igdrcl_tests mock_gmm)
create_project_source_tree(igdrcl_tests ${IGDRCL_SOURCE_DIR}/runtime ${IGDRCL_SOURCE_DIR})
create_project_source_tree(igdrcl_tests ${IGDRCL_SOURCE_DIR}/runtime)
set(UltPchHeader "${CMAKE_CURRENT_SOURCE_DIR}/igdrcl_tests_pch.h")
set(UltPchSource "${CMAKE_CURRENT_SOURCE_DIR}/igdrcl_tests_pch.cpp")

View File

@ -136,5 +136,5 @@ foreach(target_name igdrcl_libult igdrcl_libult_cs igdrcl_libult_env)
set_property(TARGET ${target_name} APPEND_STRING PROPERTY COMPILE_FLAGS ${ASAN_FLAGS} ${TSAN_FLAGS})
target_include_directories(${target_name} PRIVATE $<TARGET_PROPERTY:${NEO_MOCKABLE_LIB_NAME},INTERFACE_INCLUDE_DIRECTORIES>)
target_compile_definitions(${target_name} PRIVATE $<TARGET_PROPERTY:${NEO_MOCKABLE_LIB_NAME},INTERFACE_COMPILE_DEFINITIONS>)
create_project_source_tree(${target_name} ${IGDRCL_SOURCE_DIR})
create_project_source_tree(${target_name})
endforeach()

View File

@ -119,4 +119,4 @@ target_compile_definitions(igdrcl_mocks PRIVATE MOCKABLE_VIRTUAL=virtual $<TARGE
set_target_properties(igdrcl_mocks PROPERTIES POSITION_INDEPENDENT_CODE ON)
set_target_properties(igdrcl_mocks PROPERTIES FOLDER "test mocks")
create_project_source_tree(igdrcl_mocks ${IGDRCL_SOURCE_DIR})
create_project_source_tree(igdrcl_mocks)

View File

@ -146,4 +146,4 @@ else()
endif()
add_subdirectories()
create_project_source_tree(ocloc_tests ${IGDRCL_SOURCE_DIR}/runtime ${IGDRCL_SOURCE_DIR}/unit_tests ${IGDRCL_SOURCE_DIR})
create_project_source_tree(ocloc_tests)