use externally provided names of compiler shared libraries
Intel Graphics Compiler is preparing change to unify compiler naming. They will expose two variables which we should use when loading compiler libraries. Change-Id: If6edcb7541452b3cd429a8b4f7c26f6d43169035 Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
parent
b42e19110b
commit
12843c5eba
|
@ -201,9 +201,16 @@ if(NOT IGC__IGC_TARGETS)
|
|||
message(STATUS "IGC source dir is: ${IGC_DIR}")
|
||||
|
||||
set(IGC_OPTION__LIBRARY_NAME "igdccl")
|
||||
set(FCL_OPTION__LIBRARY_NAME "igdfcl")
|
||||
set(IGC_OPTION__OUTPUT_DIR "${IGDRCL_BUILD_DIR}/igc")
|
||||
set(IGC_OPTION__INCLUDE_IGC_COMPILER_TOOLS OFF)
|
||||
add_subdirectory("${IGC_DIR}" "${IGDRCL_BUILD_DIR}/igc" EXCLUDE_FROM_ALL)
|
||||
if(NOT IGC_LIBRARY_NAME)
|
||||
set(IGC_LIBRARY_NAME "${IGC_OPTION__LIBRARY_NAME}")
|
||||
endif()
|
||||
if(NOT FCL_LIBRARY_NAME)
|
||||
set(FCL_LIBRARY_NAME "${FCL_OPTION__LIBRARY_NAME}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(IGDRCL__IGC_TARGETS "${IGC__IGC_TARGETS}")
|
||||
|
@ -531,3 +538,4 @@ set(_CRT_SECURE_NO_WARNINGS 1)
|
|||
include(package.cmake)
|
||||
|
||||
configure_file(config.h.in ${IGDRCL_BUILD_DIR}/config.h)
|
||||
configure_file(compiler.config.h.in ${IGDRCL_BUILD_DIR}/compiler.config.h)
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright (c) 2018, Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef COMPILER_SETUP_H
|
||||
#define COMPILER_SETUP_H
|
||||
|
||||
#cmakedefine IGC_LIBRARY_NAME "${CMAKE_SHARED_LIBRARY_PREFIX}${IGC_LIBRARY_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
|
||||
#cmakedefine FCL_LIBRARY_NAME "${CMAKE_SHARED_LIBRARY_PREFIX}${FCL_LIBRARY_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
|
||||
|
||||
#endif /* COMPILER_SETUP_H */
|
|
@ -20,15 +20,15 @@
|
|||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "compiler.config.h"
|
||||
#include "runtime/os_interface/os_library.h"
|
||||
|
||||
namespace Os {
|
||||
#if defined(__linux__)
|
||||
// Compiler library names
|
||||
const char *frontEndDllName = "libigdfcl.so";
|
||||
const char *igcDllName = "libigdccl.so";
|
||||
const char *frontEndDllName = FCL_LIBRARY_NAME;
|
||||
const char *igcDllName = IGC_LIBRARY_NAME;
|
||||
const char *libvaDllName = "libva.so.2";
|
||||
#endif //__linux__
|
||||
|
||||
const char *sysFsPciPath = "/sys/bus/pci/devices/";
|
||||
const char *tbxLibName = "libtbxAccess.so";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue