Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions projects/miopen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,28 @@ if(MIOPEN_ENABLE_SQLITE)
endif()
find_package(BZip2 REQUIRED)
find_package(nlohmann_json 3.9.1 REQUIRED)

# Workaround: TheRock's prebuilt nlohmann_json artifact may be missing the
# natvis file (a Visual Studio debug visualizer) referenced by
# INTERFACE_SOURCES. Drop it from the imported target only if the file
# doesn't exist on disk. Once the artifact is fixed upstream, the file
# will be present and the property is left untouched.
if(TARGET nlohmann_json::nlohmann_json)
get_target_property(_njson_srcs nlohmann_json::nlohmann_json INTERFACE_SOURCES)
if(_njson_srcs)
set(_njson_filtered "${_njson_srcs}")
foreach(_src IN LISTS _njson_srcs)
string(GENEX_STRIP "${_src}" _src_plain)
if(_src_plain MATCHES "\\.natvis$" AND NOT EXISTS "${_src_plain}")
message(STATUS "nlohmann_json: dropping missing natvis entry: ${_src_plain}")
list(REMOVE_ITEM _njson_filtered "${_src}")
endif()
endforeach()
set_property(TARGET nlohmann_json::nlohmann_json
PROPERTY INTERFACE_SOURCES "${_njson_filtered}")
endif()
endif()

if(MIOPEN_ENABLE_SQLITE_KERN_CACHE AND NOT MIOPEN_ENABLE_SQLITE)
message(FATAL_ERROR "MIOPEN_ENABLE_SQLITE_KERN_CACHE requires MIOPEN_ENABLE_SQLITE")
endif()
Expand Down
4 changes: 4 additions & 0 deletions projects/miopen/addkernels/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

set(ADD_KERNELS_SOURCE include_inliner.cpp addkernels.cpp)

if(WIN32)
list(APPEND ADD_KERNELS_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/longpath.manifest)
endif()

add_executable(addkernels EXCLUDE_FROM_ALL ${ADD_KERNELS_SOURCE})
target_include_directories(addkernels PRIVATE ${PROJECT_SOURCE_DIR}/src/include)
if(HAS_LIB_STD_FILESYSTEM)
Expand Down
8 changes: 8 additions & 0 deletions projects/miopen/addkernels/longpath.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
</assembly>
Loading