Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
201dd395
Commit
201dd395
authored
Oct 24, 2023
by
Artur Wojcik
Browse files
fix tests compilation without CK on Windows
parent
24175729
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
test/CMakeLists.txt
test/CMakeLists.txt
+17
-9
No files found.
test/CMakeLists.txt
View file @
201dd395
...
...
@@ -164,28 +164,36 @@ int main() {}\n"
endfunction
()
function
(
test_headers PREFIX
)
file
(
GLOB HEADERS CONFIGURE_DEPENDS
${
ARGN
}
)
foreach
(
HEADER
${
HEADERS
}
)
cmake_parse_arguments
(
PARSE
""
""
"HEADERS;DEPENDS"
${
ARGN
}
)
foreach
(
HEADER
${
PARSE_HEADERS
}
)
file
(
RELATIVE_PATH HEADER_REL
${
CMAKE_SOURCE_DIR
}
${
HEADER
}
)
string
(
MAKE_C_IDENTIFIER
${
HEADER_REL
}
TEST_NAME
)
get_filename_component
(
BASE_NAME
${
HEADER
}
NAME_WE
)
test_header
(
header_
${
TEST_NAME
}
${
PREFIX
}
/
${
BASE_NAME
}
.hpp
)
target_link_libraries
(
header_
${
TEST_NAME
}
migraphx migraphx_onnx migraphx_tf migraphx_all_targets
)
target_link_libraries
(
header_
${
TEST_NAME
}
migraphx migraphx_onnx migraphx_tf migraphx_all_targets
${
PARSE_DEPENDS
}
)
endforeach
()
endfunction
()
test_headers
(
migraphx
${
CMAKE_SOURCE_DIR
}
/src/include/migraphx/*.hpp
)
test_headers
(
migraphx/ref
${
CMAKE_SOURCE_DIR
}
/src/targets/ref/include/migraphx/ref/*.hpp
)
file
(
GLOB HEADERS CONFIGURE_DEPENDS
${
CMAKE_SOURCE_DIR
}
/src/include/migraphx/*.hpp
)
test_headers
(
migraphx HEADERS
${
HEADERS
}
)
file
(
GLOB HEADERS CONFIGURE_DEPENDS
${
CMAKE_SOURCE_DIR
}
/src/targets/ref/include/migraphx/ref/*.hpp
)
test_headers
(
migraphx/ref HEADERS
${
HEADERS
}
)
if
(
MIGRAPHX_ENABLE_GPU
)
test_headers
(
migraphx/gpu HEADERS
${
CMAKE_SOURCE_DIR
}
/src/targets/gpu/include/migraphx/gpu/*.hpp DEPENDS migraphx_gpu
)
file
(
GLOB HEADERS CONFIGURE_DEPENDS
${
CMAKE_SOURCE_DIR
}
/src/targets/gpu/include/migraphx/gpu/*.hpp
)
if
(
NOT MIGRAPHX_USE_COMPOSABLEKERNEL
)
list
(
REMOVE_ITEM HEADERS
${
CMAKE_SOURCE_DIR
}
/src/targets/gpu/include/migraphx/gpu/ck.hpp
)
endif
()
test_headers
(
migraphx/gpu HEADERS
${
HEADERS
}
DEPENDS migraphx_gpu
)
endif
()
if
(
MIGRAPHX_ENABLE_CPU
)
test_headers
(
migraphx/cpu HEADERS
${
CMAKE_SOURCE_DIR
}
/src/targets/cpu/include/migraphx/cpu/*.hpp migraphx_cpu
)
file
(
GLOB HEADERS CONFIGURE_DEPENDS
${
CMAKE_SOURCE_DIR
}
/src/targets/gpu/include/migraphx/cpu/*.hpp
)
test_headers
(
migraphx/cpu
${
HEADERS
}
DEPENDS migraphx_cpu
)
endif
()
if
(
MIGRAPHX_ENABLE_FPGA
)
test_headers
(
migraphx/fpga HEADERS
${
CMAKE_SOURCE_DIR
}
/src/targets/fpga/include/migraphx/fpga/*.hpp migraphx_fpga
)
file
(
GLOB HEADERS CONFIGURE_DEPENDS
${
CMAKE_SOURCE_DIR
}
/src/targets/gpu/include/migraphx/fpga/*.hpp
)
test_headers
(
migraphx/fpga HEADERS
${
HEADERS
}
DEPENDS migraphx_fpga
)
endif
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment