Skip to content

Commit 616af59

Browse files
committed
Fix windows install prefix
1 parent b5fb776 commit 616af59

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

share/rocmcmakebuildtools/cmake/ROCMTest.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ add_dependencies(install-tests tests)
2525
rocm_define_property(TARGET "ROCM_TEST_INSTALLDIR" "Install dir for tests")
2626
macro(rocm_enable_test_package NAME)
2727
message(STATUS "Enable test package ${NAME}")
28-
set_target_properties(tests PROPERTIES ROCM_TEST_INSTALLDIR ${CMAKE_INSTALL_PREFIX}/libexec/installed-tests/${NAME})
28+
set_target_properties(tests PROPERTIES ROCM_TEST_INSTALLDIR ${CMAKE_INSTALL_LIBEXECDIR}/installed-tests/${NAME})
2929
rocm_package_setup_component(tests DEPENDS COMPONENT runtime)
3030
rocm_defer(rocm_test_install_ctest)
3131
endmacro()
@@ -89,7 +89,7 @@ function(rocm_save_test)
8989
set(COMMAND "")
9090
foreach(ARG ${PARSE_COMMAND})
9191
if(TARGET ${ARG})
92-
set(INSTALL_PREFIX "$<${_rocm_test_genex_eval}:$<TARGET_PROPERTY:${ARG},ROCM_INSTALL_DIR>>")
92+
set(INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/$<${_rocm_test_genex_eval}:$<TARGET_PROPERTY:${ARG},ROCM_INSTALL_DIR>>")
9393
string(APPEND COMMAND
9494
" \"${INSTALL_PREFIX}/$<TARGET_FILE_NAME:${ARG}>\"")
9595
else()

test/pass/libprivate.cmake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ install_dir(
66
${TEST_DIR}/libprivate
77
CMAKE_ARGS -DROCM_SYMLINK_LIBS=OFF -DROCM_PREFIX=rocm
88
TARGETS package)
9-
test_expect_file(${PREFIX}/lib/libprivate/include/simpleprivate.h)
10-
test_expect_file(${PREFIX}/lib/libprivate/lib/libsimple_private.a)
9+
if(WIN32)
10+
test_expect_file(${PREFIX}/include/simpleprivate.h)
11+
test_expect_file(${PREFIX}/lib/libsimple_private.a)
12+
else()
13+
test_expect_file(${PREFIX}/lib/libprivate/include/simpleprivate.h)
14+
test_expect_file(${PREFIX}/lib/libprivate/lib/libsimple_private.a)
15+
endif()
1116
install_dir(${TEST_DIR}/libprivate)

test/pass/simple-prefix.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ install_dir(
77
CMAKE_ARGS -DROCM_PREFIX=simple
88
TARGETS package)
99
test_expect_file(${PREFIX}/include/simple.h)
10-
test_expect_file(${PREFIX}/simple/include/simple.h)
10+
if(NOT WIN32)
11+
test_expect_file(${PREFIX}/simple/include/simple.h)
12+
endif()
1113
install_dir(${TEST_DIR}/libbasic)

0 commit comments

Comments
 (0)