Skip to content

Commit

Permalink
[Windows] cmake: cleanup outdated code (#2349)
Browse files Browse the repository at this point in the history
  • Loading branch information
apwojcik authored Nov 13, 2023
1 parent a812719 commit 546f936
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 22 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,6 @@ enable_clang_tidy(
"\.hpp$"
EXTRA_ARGS
-DMIOPEN_USE_CLANG_TIDY

)
include(CppCheck)
enable_cppcheck(
Expand Down Expand Up @@ -787,5 +786,5 @@ add_subdirectory(test)
add_subdirectory(speedtests)
add_subdirectory(utils)
if(MIOPEN_ENABLE_FIN)
add_subdirectory(fin)
add_subdirectory(fin)
endif()
22 changes: 3 additions & 19 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ configure_file("${PROJECT_SOURCE_DIR}/include/miopen/config.h.in" "${PROJECT_BIN
# configure a header file to pass the CMake version settings to the source, and package the header files in the output archive
configure_file( "${PROJECT_SOURCE_DIR}/include/miopen/version.h.in" "${PROJECT_BINARY_DIR}/include/miopen/version.h" )


if(BUILD_FILE_REORG_BACKWARD_COMPATIBILITY)
#Copy header to Build Dir for generating backward compatibility
configure_file( "${PROJECT_SOURCE_DIR}/include/miopen/miopen.h" "${PROJECT_BINARY_DIR}/include/miopen/miopen.h" )
Expand All @@ -64,16 +63,11 @@ message( STATUS "CMAKE_BUILD_TYPE= ${CMAKE_BUILD_TYPE}" )
# This is incremented when the ABI to the library changes
set( MIOpen_SOVERSION 1.0 )


function(add_kernels FILE_NAME VAR_PREFIX VAR_SUFFIX KERNEL_FILES)
set(INIT_KERNELS_LIST)
set(KERNELS_DECLS)
foreach(KERNEL_FILE ${KERNEL_FILES})
if("${CMAKE_VERSION}" VERSION_LESS 3.0)
configure_file(${KERNEL_FILE} ${KERNEL_FILE}.delete)
else()
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${KERNEL_FILE})
endif()
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${KERNEL_FILE})
get_filename_component(KERNEL_FILENAME ${KERNEL_FILE} NAME)
get_filename_component(BASE_NAME ${KERNEL_FILE} NAME_WE)
string(TOUPPER "${BASE_NAME}" KEY_NAME)
Expand Down Expand Up @@ -692,23 +686,13 @@ endif()

function(target_internal_library TARGET)
target_link_libraries(${TARGET} PRIVATE ${ARGN})
set(PASS_ARGS debug optimized)
set(DEPS)
foreach(DEP ${ARGN})
if(DEP IN_LIST PASS_ARGS)
list(APPEND DEPS ${DEP})
else()
list(APPEND DEPS $<BUILD_INTERFACE:${DEP}>)
endif()
endforeach()
target_link_libraries(${TARGET} INTERFACE ${DEPS})
target_link_libraries(${TARGET} INTERFACE $<BUILD_INTERFACE:${ARGN}>)
endfunction()

target_include_directories(MIOpen PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/include>
)

set(MIOPEN_CK_LINK_FLAGS)
if(MIOPEN_USE_COMPOSABLEKERNEL)
set(MIOPEN_CK_LINK_FLAGS composable_kernel::device_operations hip::host)
endif()
Expand Down Expand Up @@ -840,7 +824,7 @@ endif()
if(NOT WIN32 AND NOT APPLE)
find_library(LIBRT rt)
if(LIBRT)
MESSAGE(STATUS "Librt: " ${LIBRT})
message(STATUS "Librt: " ${LIBRT})
target_internal_library(MIOpen ${LIBRT})
endif()
endif()
Expand Down
1 change: 0 additions & 1 deletion src/composable_kernel/host/host_tensor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ target_include_directories(host_tensor SYSTEM PUBLIC $<BUILD_INTERFACE:${HALF_IN
target_link_libraries(host_tensor PRIVATE hip::device)
target_link_libraries(host_tensor INTERFACE hip::host)

target_compile_features(host_tensor PUBLIC)
set_target_properties(host_tensor PROPERTIES POSITION_INDEPENDENT_CODE ON)

install(TARGETS host_tensor LIBRARY DESTINATION lib)

0 comments on commit 546f936

Please sign in to comment.