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
eb6b9b0a
Commit
eb6b9b0a
authored
Jun 20, 2023
by
Artur Wojcik
Browse files
cmake_src
parent
ceb4509e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
15 deletions
+24
-15
src/CMakeLists.txt
src/CMakeLists.txt
+24
-15
No files found.
src/CMakeLists.txt
View file @
eb6b9b0a
...
@@ -41,7 +41,6 @@ add_library(migraphx
...
@@ -41,7 +41,6 @@ add_library(migraphx
cpp_generator.cpp
cpp_generator.cpp
dead_code_elimination.cpp
dead_code_elimination.cpp
dom_info.cpp
dom_info.cpp
dynamic_loader.cpp
eliminate_allocation.cpp
eliminate_allocation.cpp
eliminate_common_subexpression.cpp
eliminate_common_subexpression.cpp
eliminate_concat.cpp
eliminate_concat.cpp
...
@@ -101,6 +100,12 @@ add_library(migraphx
...
@@ -101,6 +100,12 @@ add_library(migraphx
value.cpp
value.cpp
verify_args.cpp
verify_args.cpp
)
)
if
(
WIN32
)
target_sources
(
migraphx PRIVATE dynamic_loader_win32.cpp
)
target_compile_definitions
(
migraphx PUBLIC -D_USE_MATH_DEFINES
)
else
()
target_sources
(
migraphx PRIVATE dynamic_loader.cpp
)
endif
()
configure_file
(
version.h.in include/migraphx/version.h
)
configure_file
(
version.h.in include/migraphx/version.h
)
rocm_set_soversion
(
migraphx
${
MIGRAPHX_SO_VERSION
}
)
rocm_set_soversion
(
migraphx
${
MIGRAPHX_SO_VERSION
}
)
function
(
register_migraphx_ops
)
function
(
register_migraphx_ops
)
...
@@ -239,28 +244,34 @@ rocm_install_targets(
...
@@ -239,28 +244,34 @@ rocm_install_targets(
${
CMAKE_CURRENT_BINARY_DIR
}
/include
${
CMAKE_CURRENT_BINARY_DIR
}
/include
)
)
if
(
NOT WIN32
)
check_cxx_linker_flag
(
-lstdc++fs HAS_LIB_STD_FILESYSTEM
)
check_cxx_linker_flag
(
-lstdc++fs HAS_LIB_STD_FILESYSTEM
)
if
(
HAS_LIB_STD_FILESYSTEM
)
if
(
HAS_LIB_STD_FILESYSTEM
)
target_link_libraries
(
migraphx PRIVATE -lstdc++fs
)
target_link_libraries
(
migraphx PRIVATE -lstdc++fs
)
endif
()
target_link_libraries
(
migraphx PRIVATE -ldl
)
endif
()
endif
()
target_link_libraries
(
migraphx PRIVATE -ldl
)
target_include_directories
(
migraphx SYSTEM PUBLIC $<BUILD_INTERFACE:
${
HALF_INCLUDE_DIR
}
>
)
target_include_directories
(
migraphx SYSTEM PUBLIC $<BUILD_INTERFACE:
${
HALF_INCLUDE_DIR
}
>
)
target_link_libraries
(
migraphx PUBLIC Threads::Threads
)
target_link_libraries
(
migraphx PUBLIC Threads::Threads
)
find_package
(
nlohmann_json 3.8.0 REQUIRED
)
if
(
NOT WIN32
)
find_package
(
nlohmann_json 3.8.0 REQUIRED
)
endif
()
target_link_libraries
(
migraphx PRIVATE nlohmann_json::nlohmann_json
)
target_link_libraries
(
migraphx PRIVATE nlohmann_json::nlohmann_json
)
migraphx_generate_export_header
(
migraphx
)
migraphx_generate_export_header
(
migraphx
)
find_package
(
PkgConfig
)
if
(
NOT WIN32
)
pkg_check_modules
(
SQLITE3 REQUIRED IMPORTED_TARGET sqlite3
)
find_package
(
PkgConfig
)
pkg_check_modules
(
SQLITE3 REQUIRED IMPORTED_TARGET sqlite3
)
endif
()
target_link_libraries
(
migraphx PRIVATE PkgConfig::SQLITE3
)
target_link_libraries
(
migraphx PRIVATE PkgConfig::SQLITE3
)
find_package
(
msgpackc-cxx QUIET
)
if
(
NOT WIN32
)
if
(
NOT msgpackc-cxx_FOUND
)
find_package
(
msgpackc-cxx QUIET
)
find_package
(
msgpack REQUIRED
)
if
(
NOT msgpackc-cxx_FOUND
)
find_package
(
msgpack REQUIRED
)
endif
()
endif
()
endif
()
target_link_libraries
(
migraphx PRIVATE msgpackc-cxx
)
target_link_libraries
(
migraphx PRIVATE msgpackc-cxx
)
# Make this available to the tests
# Make this available to the tests
...
@@ -271,8 +282,6 @@ add_library(migraphx_all_targets INTERFACE)
...
@@ -271,8 +282,6 @@ add_library(migraphx_all_targets INTERFACE)
include
(
CMakeDependentOption
)
include
(
CMakeDependentOption
)
cmake_dependent_option
(
MIGRAPHX_ENABLE_PYTHON
"Enable python bindings"
ON
"WIN32"
OFF
)
cmake_dependent_option
(
MIGRAPHX_ENABLE_PYTHON
"Enable python bindings"
ON
"WIN32"
OFF
)
set
(
PACKAGE_DEPENDS
)
add_subdirectory
(
api
)
add_subdirectory
(
api
)
add_subdirectory
(
driver
)
add_subdirectory
(
driver
)
add_subdirectory
(
onnx
)
add_subdirectory
(
onnx
)
...
...
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