mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-04-20 06:49:15 +00:00
enable compilation of INSTANCES_ONLY for Windows (#1082)
* enable compilation of INSTANCES_ONLY for Windows * suppress ROCMChecks warnings on GoogleTests * suppress -Wfloat-equal warning on GoogleTests --------- Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>
This commit is contained in:
28
cmake/getopt.cmake
Normal file
28
cmake/getopt.cmake
Normal file
@@ -0,0 +1,28 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
|
||||
|
||||
add_library(getopt::getopt INTERFACE IMPORTED GLOBAL)
|
||||
|
||||
if(WIN32)
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
getopt
|
||||
GIT_REPOSITORY https://github.com/apwojcik/getopt.git
|
||||
GIT_TAG main
|
||||
SYSTEM
|
||||
)
|
||||
|
||||
set(__build_shared_libs ${BUILD_SHARED_LIBS})
|
||||
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "")
|
||||
|
||||
FetchContent_MakeAvailable(getopt)
|
||||
|
||||
# Restore the old value of BUILD_SHARED_LIBS
|
||||
set(BUILD_SHARED_LIBS ${__build_shared_libs} CACHE BOOL "Type of libraries to build" FORCE)
|
||||
|
||||
FetchContent_GetProperties(getopt)
|
||||
|
||||
target_link_libraries(getopt::getopt INTERFACE wingetopt)
|
||||
target_include_directories(getopt::getopt INTERFACE ${getopt_SOURCE_DIR}/src)
|
||||
endif()
|
||||
Reference in New Issue
Block a user