Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
4c713f45
Commit
4c713f45
authored
Dec 02, 2016
by
Sebastian Woelke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add hwloc to cmake build process
parent
c90a2ea7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
96 additions
and
1 deletion
+96
-1
CMakeLists.txt
CMakeLists.txt
+19
-1
cmake/FindHwloc.cmake
cmake/FindHwloc.cmake
+69
-0
cmake/build_config.hpp.in
cmake/build_config.hpp.in
+4
-0
configure
configure
+4
-0
No files found.
CMakeLists.txt
View file @
4c713f45
...
...
@@ -77,6 +77,10 @@ if(NOT CAF_NO_OPENCL)
set
(
CAF_NO_OPENCL no
)
endif
()
if
(
NOT CAF_NO_HWLOC
)
set
(
CAF_NO_HWLOC no
)
endif
()
if
(
NOT CAF_NO_PYTHON
)
set
(
CAF_NO_PYTHON no
)
endif
()
...
...
@@ -398,7 +402,7 @@ add_custom_target(uninstall
################################################################################
# set inclue paths for subprojects #
# set inclu
d
e paths for subprojects #
################################################################################
# path to caf core & io headers
...
...
@@ -500,6 +504,18 @@ if(NOT CAF_NO_OPENCL)
if
(
OpenCL_FOUND
)
add_optional_caf_lib
(
opencl
)
add_optional_caf_binaries
(
libcaf_opencl/examples
)
else
()
set
(
CAF_NO_OPENCL yes
)
endif
()
endif
()
# load hwloc library if not told otherwise
if
(
NOT CAF_NO_HWLOC
)
find_package
(
Hwloc
)
if
(
Hwloc_FOUND
)
add_optional_caf_lib
(
hwloc
)
else
()
set
(
CAF_NO_HWLOC yes
)
endif
()
endif
()
...
...
@@ -682,6 +698,7 @@ invertYesNo(CAF_NO_EXCEPTIONS CAF_BUILD_WITH_EXCEPTIONS)
invertYesNo
(
CAF_NO_MEM_MANAGEMENT CAF_BUILD_MEM_MANAGEMENT
)
invertYesNo
(
CAF_NO_BENCHMARKS CAF_BUILD_BENCHMARKS
)
invertYesNo
(
CAF_NO_OPENCL CAF_BUILD_OPENCL
)
invertYesNo
(
CAF_NO_HWLOC CAF_BUILD_HWLOC
)
invertYesNo
(
CAF_NO_PYTHON CAF_BUILD_PYTHON
)
# collect all compiler flags
string
(
TOUPPER
"
${
CMAKE_BUILD_TYPE
}
"
UPPER_BUILD_TYPE
)
...
...
@@ -707,6 +724,7 @@ if(NOT CAF_NO_SUMMARY)
"
\n
Build unit tests:
${
CAF_BUILD_UNIT_TESTS
}
"
"
\n
Build benchmarks:
${
CAF_BUILD_BENCHMARKS
}
"
"
\n
Build opencl:
${
CAF_BUILD_OPENCL
}
"
"
\n
Build hwloc:
${
CAF_BUILD_HWLOC
}
"
"
\n
Build Python:
${
CAF_BUILD_PYTHON
}
"
"
\n
"
"
\n
CXX:
${
CMAKE_CXX_COMPILER
}
"
...
...
cmake/FindHwloc.cmake
0 → 100644
View file @
4c713f45
# - Try to find hwloc
# Once done this will define
#
# Hwloc_FOUND - system has OpenCL
# Hwloc_INCLUDE_DIRS - the OpenCL include directory
# Hwloc_LIBRARIES - link these to use OpenCL
# Hwloc_VERSION - version
#
# WIN32 should work, but is untested
if
(
WIN32
)
find_path
(
Hwloc_INCLUDE_DIRS
NAMES
hwloc.h
PATHS
ENV
"PROGRAMFILES(X86)"
ENV HWLOC_ROOT
PATH_SUFFIXES
include
)
find_library
(
Hwloc_LIBRARY
NAMES
libhwloc.lib
PATHS
ENV
"PROGRAMFILES(X86)"
ENV HWLOC_ROOT
PATH_SUFFIXES
lib
)
find_program
(
HWLOC_INFO_EXECUTABLE
NAMES
hwloc-info
PATHS
ENV HWLOC_ROOT
PATH_SUFFIXES
bin
)
if
(
HWLOC_INFO_EXECUTABLE
)
execute_process
(
COMMAND
${
HWLOC_INFO_EXECUTABLE
}
"--version"
OUTPUT_VARIABLE HWLOC_VERSION_LINE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
string
(
REGEX MATCH
"([0-9]+.[0-9]+)$"
Hwloc_VERSION
"
${
HWLOC_VERSION_LINE
}
"
)
unset
(
HWLOC_VERSION_LINE
)
endif
()
set
(
Hwloc_LIBRARIES
${
Hwloc_LIBRARY
}
)
set
(
Hwloc_INCLUDE_DIRS
${
Hwloc_INCLUDE_DIR
}
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
Hwloc
FOUND_VAR Hwloc_FOUND
REQUIRED_VARS Hwloc_LIBRARY Hwloc_INCLUDE_DIR
VERSION_VAR Hwloc_VERSION
)
mark_as_advanced
(
Hwloc_INCLUDE_DIR
Hwloc_LIBRARY
)
else
()
find_package
(
PkgConfig
)
pkg_check_modules
(
Hwloc QUIET hwloc
)
if
(
Hwloc_FOUND
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
Hwloc DEFAULT_MSG Hwloc_LIBRARIES
)
message
(
STATUS
"Found hwloc version
${
Hwloc_VERSION
}
"
)
endif
()
endif
()
cmake/build_config.hpp.in
View file @
4c713f45
...
...
@@ -42,4 +42,8 @@
#define CAF_NO_EXCEPTIONS
#endif
#if @CAF_NO_HWLOC@ != -1
#define CAF_NO_HWLOC
#endif
#endif //CAF_DETAIL_BUILD_CONFIG_HPP
configure
View file @
4c713f45
...
...
@@ -65,6 +65,7 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
--no-curl-examples build without libcurl examples
--no-unit-tests build without unit tests
--no-opencl build without OpenCL module
--no-hwloc build without NUMA related optimizations
--no-benchmarks build without benchmarks
--no-tools build without CAF tools such as caf-run
--no-io build without I/O module
...
...
@@ -339,6 +340,9 @@ while [ $# -ne 0 ]; do
--no-opencl
)
append_cache_entry CAF_NO_OPENCL BOOL
yes
;;
--no-hwloc
)
append_cache_entry CAF_NO_HWLOC BOOL
yes
;;
--build-static
)
append_cache_entry CAF_BUILD_STATIC BOOL
yes
;;
...
...
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