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
60fc850a
Unverified
Commit
60fc850a
authored
Feb 12, 2018
by
Robert Kimball
Committed by
GitHub
Feb 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup header path defines (#483)
parent
e931b2b6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
15 deletions
+19
-15
CMakeLists.txt
src/ngraph/CMakeLists.txt
+14
-5
CMakeLists.txt
src/resource/CMakeLists.txt
+5
-10
No files found.
src/ngraph/CMakeLists.txt
View file @
60fc850a
...
@@ -177,14 +177,23 @@ if (NGRAPH_CPU_ENABLE AND LLVM_INCLUDE_DIR AND
...
@@ -177,14 +177,23 @@ if (NGRAPH_CPU_ENABLE AND LLVM_INCLUDE_DIR AND
# The built-in headers are in a version-specific directory
# The built-in headers are in a version-specific directory
# This must be kept in sync with the LLVM + Clang version in use
# This must be kept in sync with the LLVM + Clang version in use
set_source_files_properties
(
codegen/compiler.cpp PROPERTIES COMPILE_FLAGS
"-fno-rtti"
)
set_source_files_properties
(
codegen/compiler.cpp PROPERTIES COMPILE_FLAGS
"-fno-rtti"
)
set
(
HEADER_SEARCH_DEFINES
"EIGEN_HEADERS_PATH=
\"
${
EIGEN_INCLUDE_DIR
}
\"
"
"MKLDNN_HEADERS_PATH=
\"
${
MKLDNN_INCLUDE_DIR
}
\"
"
"CLANG_BUILTIN_HEADERS_PATH=
\"
${
LLVM_LIB_DIR
}
/clang/5.0.1/include
\"
"
"NGRAPH_HEADERS_PATH=
\"
${
NGRAPH_INCLUDE_PATH
}
\"
"
"INSTALLED_HEADERS_PATH=
\"
${
CMAKE_INSTALL_PREFIX
}
/include
\"
"
)
if
(
NGRAPH_TBB_ENABLE
)
if
(
NGRAPH_TBB_ENABLE
)
set_source_files_properties
(
codegen/compiler.cpp PROPERTIES COMPILE_DEFINITIONS
"EIGEN_HEADERS_PATH=
\"
${
EIGEN_INCLUDE_DIR
}
\"
;MKLDNN_HEADERS_PATH=
\"
${
MKLDNN_INCLUDE_DIR
}
\"
;CLANG_BUILTIN_HEADERS_PATH=
\"
${
LLVM_LIB_DIR
}
/clang/5.0.1/include
\"
;TBB_HEADERS_PATH=
\"
${
TBB_ROOT
}
/include
\"
;NGRAPH_HEADERS_PATH=
\"
${
NGRAPH_INCLUDE_PATH
}
\"
;INSTALLED_HEADERS_PATH=
\"
${
CMAKE_INSTALL_PREFIX
}
/include
\"
;NGRAPH_TBB_ENABLE;"
)
set_source_files_properties
(
runtime/cpu/cpu_external_function.cpp PROPERTIES COMPILE_DEFINITIONS
"NGRAPH_TBB_ENABLE"
)
set_source_files_properties
(
runtime/cpu/cpu_external_function.cpp PROPERTIES COMPILE_DEFINITIONS
"NGRAPH_TBB_ENABLE"
)
else
()
set
(
HEADER_SEARCH_DEFINES
${
HEADER_SEARCH_DEFINES
}
set_source_files_properties
(
codegen/compiler.cpp PROPERTIES COMPILE_DEFINITIONS
"TBB_HEADERS_PATH=
\"
${
TBB_ROOT
}
/include
\"
"
"EIGEN_HEADERS_PATH=
\"
${
EIGEN_INCLUDE_DIR
}
\"
;MKLDNN_HEADERS_PATH=
\"
${
MKLDNN_INCLUDE_DIR
}
\"
;CLANG_BUILTIN_HEADERS_PATH=
\"
${
LLVM_LIB_DIR
}
/clang/5.0.1/include
\"
;NGRAPH_HEADERS_PATH=
\"
${
NGRAPH_INCLUDE_PATH
}
\"
;INSTALLED_HEADERS_PATH=
\"
${
CMAKE_INSTALL_PREFIX
}
/include
\"
;"
)
"NGRAPH_TBB_ENABLE"
)
endif
()
endif
()
set_source_files_properties
(
codegen/compiler.cpp PROPERTIES COMPILE_DEFINITIONS
"
${
HEADER_SEARCH_DEFINES
}
"
)
set
(
NGRAPH_CPU_DEBUGINFO_ENABLE 0 CACHE STRING
"Enable debuginfo in the CPU backend"
)
set
(
NGRAPH_CPU_DEBUGINFO_ENABLE 0 CACHE STRING
"Enable debuginfo in the CPU backend"
)
# GPU backend current requires CPU because they share compiler.cpp,
# GPU backend current requires CPU because they share compiler.cpp,
...
...
src/resource/CMakeLists.txt
View file @
60fc850a
...
@@ -25,7 +25,7 @@ if (NGRAPH_CPU_ENABLE AND NOT APPLE)
...
@@ -25,7 +25,7 @@ if (NGRAPH_CPU_ENABLE AND NOT APPLE)
add_executable
(
resource_generator
${
SRC
}
)
add_executable
(
resource_generator
${
SRC
}
)
add_dependencies
(
resource_generator ext_llvm eigen ext_mkldnn
)
add_dependencies
(
resource_generator ext_llvm eigen ext_mkldnn
)
set
(
HEADER_
PATH
S
set
(
HEADER_
SEARCH_DEFINE
S
"EIGEN_HEADERS_PATH=
\"
${
EIGEN_INCLUDE_DIR
}
\"
"
"EIGEN_HEADERS_PATH=
\"
${
EIGEN_INCLUDE_DIR
}
\"
"
"MKLDNN_HEADERS_PATH=
\"
${
MKLDNN_INCLUDE_DIR
}
\"
"
"MKLDNN_HEADERS_PATH=
\"
${
MKLDNN_INCLUDE_DIR
}
\"
"
"CLANG_BUILTIN_HEADERS_PATH=
\"
${
LLVM_LIB_DIR
}
/clang/5.0.1/include
\"
"
"CLANG_BUILTIN_HEADERS_PATH=
\"
${
LLVM_LIB_DIR
}
/clang/5.0.1/include
\"
"
...
@@ -33,16 +33,11 @@ if (NGRAPH_CPU_ENABLE AND NOT APPLE)
...
@@ -33,16 +33,11 @@ if (NGRAPH_CPU_ENABLE AND NOT APPLE)
)
)
if
(
NGRAPH_TBB_ENABLE
)
if
(
NGRAPH_TBB_ENABLE
)
list
(
APPEND HEADER_PATHS
"TBB_HEADERS_PATH=
\"
${
TBB_ROOT
}
/include
\"
"
)
list
(
APPEND HEADER_SEARCH_DEFINES
"TBB_HEADERS_PATH=
\"
${
TBB_ROOT
}
/include
\"
"
)
set
(
HEADER_SEARCH_DEFINES
${
HEADER_SEARCH_DEFINES
}
"NGRAPH_TBB_ENABLE"
)
endif
()
endif
()
if
(
NGRAPH_TBB_ENABLE
)
message
(
"HEADER_SEARCH_DEFINES
${
HEADER_SEARCH_DEFINES
}
"
)
set
(
NGRAPH_TBB_OPTION
"NGRAPH_TBB_ENABLE"
)
else
()
set
(
NGRAPH_TBB_OPTION
""
)
endif
()
message
(
"HEADER_PATHS
${
HEADER_PATHS
}
"
)
set_source_files_properties
(
main.cpp PROPERTIES COMPILE_DEFINITIONS
"
${
HEADER_
PATHS
}
;
${
NGRAPH_TBB_OPTION
}
"
)
set_source_files_properties
(
main.cpp PROPERTIES COMPILE_DEFINITIONS
"
${
HEADER_
SEARCH_DEFINES
}
"
)
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