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
"ts/nni_manager/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "800c675fae715a3206795ac62ffef46cd846c7fc"
Commit
201dd395
authored
Oct 24, 2023
by
Artur Wojcik
Browse files
fix tests compilation without CK on Windows
parent
24175729
Changes
1
Hide 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"
...
@@ -164,28 +164,36 @@ int main() {}\n"
endfunction
()
endfunction
()
function
(
test_headers PREFIX
)
function
(
test_headers PREFIX
)
file
(
GLOB HEADERS CONFIGURE_DEPENDS
${
ARGN
}
)
cmake_parse_arguments
(
PARSE
""
""
"HEADERS;DEPENDS"
${
ARGN
}
)
foreach
(
HEADER
${
PARSE_HEADERS
}
)
foreach
(
HEADER
${
HEADERS
}
)
file
(
RELATIVE_PATH HEADER_REL
${
CMAKE_SOURCE_DIR
}
${
HEADER
}
)
file
(
RELATIVE_PATH HEADER_REL
${
CMAKE_SOURCE_DIR
}
${
HEADER
}
)
string
(
MAKE_C_IDENTIFIER
${
HEADER_REL
}
TEST_NAME
)
string
(
MAKE_C_IDENTIFIER
${
HEADER_REL
}
TEST_NAME
)
get_filename_component
(
BASE_NAME
${
HEADER
}
NAME_WE
)
get_filename_component
(
BASE_NAME
${
HEADER
}
NAME_WE
)
test_header
(
header_
${
TEST_NAME
}
${
PREFIX
}
/
${
BASE_NAME
}
.hpp
)
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
()
endforeach
()
endfunction
()
endfunction
()
test_headers
(
migraphx
${
CMAKE_SOURCE_DIR
}
/src/include/migraphx/*.hpp
)
file
(
GLOB HEADERS CONFIGURE_DEPENDS
${
CMAKE_SOURCE_DIR
}
/src/include/migraphx/*.hpp
)
test_headers
(
migraphx/ref
${
CMAKE_SOURCE_DIR
}
/src/targets/ref/include/migraphx/ref/*.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
)
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
()
endif
()
if
(
MIGRAPHX_ENABLE_CPU
)
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
()
endif
()
if
(
MIGRAPHX_ENABLE_FPGA
)
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
()
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