Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Add include guard for cmake config file.
Browse files Browse the repository at this point in the history
Do not need device-lib targets to be included multiple times.
Some versions of cmake do not like multiple inclusion and throw
error.

Fix for issue:SWDEV-236878

Co-authored-by:Fultz, Paul <[email protected]>

Signed-off-by: Freddy Paul <[email protected]>
Change-Id: Iea132b35d8381846226692d465c47ac10969561d
  • Loading branch information
frepaul committed May 19, 2020
1 parent 86b5762 commit e6d1be0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions AMDDeviceLibsConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
if(COMMAND include_guard)
include_guard(DIRECTORY)
else()
string(MAKE_C_IDENTIFIER "${CMAKE_CURRENT_LIST_FILE}" _PACKAGE_ID)
if(DEFINED ${_GUARD_FILE_${_PACKAGE_ID}})
return()
endif()
set(${_GUARD_FILE_${_PACKAGE_ID}} On)
endif()

@AMD_DEVICE_LIBS_PREFIX_CODE@
@AMD_DEVICE_LIBS_TARGET_CODE@

Expand Down

0 comments on commit e6d1be0

Please sign in to comment.