Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
f44a9f02
Commit
f44a9f02
authored
7 years ago
by
Robert Kimball
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify the task of adding a new backend to the list of autogen tests
parent
b8461f3f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
CMakeLists.txt
test/CMakeLists.txt
+14
-8
No files found.
test/CMakeLists.txt
View file @
f44a9f02
...
...
@@ -41,11 +41,13 @@ set (SRC
uuid.cpp
)
set
(
BACKEND_NAME
"NGVM"
)
configure_file
(
backend_test.in.cpp backend_test_NGVM.cpp
)
set
(
SRC
${
SRC
}
${
CMAKE_CURRENT_BINARY_DIR
}
/backend_test_NGVM.cpp
)
message
(
STATUS
"SRC set to '
${
SRC
}
'"
)
#================================================================================================
# To auto generate a suite of unit tests for a backend add a line like this
# set(BACKEND_NAMES ${BACKEND_NAMES} "BACKEND_NAME_GOES_HERE")
# and replace BACKEND_NAME_GOES_HERE with your backend name.
# The code for the unit test suite is in test/backend_test.in.cpp
#================================================================================================
set
(
BACKEND_NAMES
${
BACKEND_NAMES
}
"NGVM"
)
if
(
MKLDNN_INCLUDE_DIR
)
include_directories
(
SYSTEM
${
MKLDNN_INCLUDE_DIR
}
)
...
...
@@ -55,11 +57,15 @@ endif()
if
(
LLVM_INCLUDE_DIR
)
include_directories
(
SYSTEM
${
LLVM_INCLUDE_DIR
}
)
set
(
BACKEND_NAME
"CPU"
)
configure_file
(
backend_test.in.cpp backend_test_CPU.cpp
)
set
(
SRC
${
SRC
}
${
CMAKE_CURRENT_BINARY_DIR
}
/backend_test_CPU.cpp
)
set
(
BACKEND_NAMES
${
BACKEND_NAMES
}
"CPU"
)
endif
()
foreach
(
BACKEND_NAME
${
BACKEND_NAMES
}
)
configure_file
(
backend_test.in.cpp backend_test_
${
BACKEND_NAME
}
.cpp
)
set
(
SRC
${
SRC
}
${
CMAKE_CURRENT_BINARY_DIR
}
/backend_test_
${
BACKEND_NAME
}
.cpp
)
message
(
STATUS
"Adding unit test for backend
${
BACKEND_NAME
}
"
)
endforeach
()
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++11"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DCURDIR=
\\\"
${
CMAKE_CURRENT_SOURCE_DIR
}
\\\"
"
)
...
...
This diff is collapsed.
Click to expand it.
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