Skip to content

Commit b5155c2

Browse files
Pawel-Cieslakigcbot
authored andcommitted
Factor out IGC library name setting
Create a dedicated CMake utility to set the IGC library name for re-use in Compute Runtime builds.
1 parent 4d8230c commit b5155c2

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

IGC/CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#=========================== begin_copyright_notice ============================
22
#
3-
# Copyright (C) 2017-2021 Intel Corporation
3+
# Copyright (C) 2017-2024 Intel Corporation
44
#
55
# SPDX-License-Identifier: MIT
66
#
@@ -241,11 +241,7 @@ unset(_debugConfigs)
241241
# ========================================= BUILD CMAKE OPTIONS ========================================
242242
# ======================================================================================================
243243

244-
if(DEFINED IGC_OPTION__LIBRARY_NAME)
245-
set(IGC_LIBRARY_NAME "${IGC_OPTION__LIBRARY_NAME}")
246-
else()
247-
set(IGC_LIBRARY_NAME "igc")
248-
endif()
244+
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/igc_library_name.cmake")
249245
set(IGC_LIBRARY_NAME ${IGC_LIBRARY_NAME} PARENT_SCOPE)
250246

251247
set(FCL_ENABLED ON)

IGC/cmake/igc_library_name.cmake

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#=========================== begin_copyright_notice ============================
2+
#
3+
# Copyright (C) 2024 Intel Corporation
4+
#
5+
# SPDX-License-Identifier: MIT
6+
#
7+
#============================ end_copyright_notice =============================
8+
9+
if(DEFINED IGC_OPTION__LIBRARY_NAME)
10+
set(IGC_LIBRARY_NAME "${IGC_OPTION__LIBRARY_NAME}")
11+
else()
12+
set(IGC_LIBRARY_NAME "igc")
13+
endif()

0 commit comments

Comments
 (0)