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
30d50ed2
Commit
30d50ed2
authored
Mar 23, 2017
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/python_merge' into develop
parents
21d9058e
513d96f6
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
693 additions
and
0 deletions
+693
-0
.gitmodules
.gitmodules
+3
-0
libcaf_python/CMakeLists.txt
libcaf_python/CMakeLists.txt
+60
-0
libcaf_python/src/main.cpp
libcaf_python/src/main.cpp
+629
-0
libcaf_python/third_party/pybind
libcaf_python/third_party/pybind
+1
-0
No files found.
.gitmodules
View file @
30d50ed2
...
...
@@ -4,3 +4,6 @@
[submodule "libcaf_opencl"]
path = libcaf_opencl
url = ../opencl.git
[submodule "libcaf_python/third_party/pybind"]
path = libcaf_python/third_party/pybind
url = https://github.com/pybind/pybind11.git
libcaf_python/CMakeLists.txt
0 → 100644
View file @
30d50ed2
cmake_minimum_required
(
VERSION 2.8
)
project
(
caf_cash CXX
)
# check whether submodules are available
if
(
NOT EXISTS
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/third_party/pybind/CMakeLists.txt"
)
message
(
WARNING
"pybind submodule not loaded, skip libcaf_python"
)
set
(
CAF_NO_PYTHON yes
)
else
()
if
(
NOT
"
${
CAF_PYTHON_CONFIG_BIN
}
"
STREQUAL
""
)
execute_process
(
COMMAND
"
${
CAF_PYTHON_CONFIG_BIN
}
"
--includes
OUTPUT_VARIABLE PYTHON_INCLUDE_FLAGS
)
string
(
STRIP
"
${
PYTHON_INCLUDE_FLAGS
}
"
PYTHON_INCLUDE_FLAGS
)
execute_process
(
COMMAND
"
${
CAF_PYTHON_CONFIG_BIN
}
"
--ldflags
OUTPUT_VARIABLE PYTHON_LDFLAGS
)
string
(
STRIP
"
${
PYTHON_LDFLAGS
}
"
PYTHON_LDFLAGS
)
if
(
"
${
LD_FLAGS
}
"
STREQUAL
""
)
set
(
LD_FLAGS
"
${
PYTHON_LDFLAGS
}
"
)
else
()
set
(
LD_FLAGS
"
${
LD_FLAGS
}
${
PYTHON_LDFLAGS
}
"
)
endif
()
string
(
REPLACE
" -I"
";-I"
dir_list
${
PYTHON_INCLUDE_FLAGS
}
)
foreach
(
flag
${
dir_list
}
)
# strip -I from each path
string
(
SUBSTRING
"
${
flag
}
"
2 -1 dir
)
include_directories
(
"
${
dir
}
"
)
endforeach
()
else
()
find_package
(
PythonLibs
)
if
(
NOT PYTHONLIBS_FOUND
)
message
(
STATUS
"Unable to find Python, disable Python binding"
)
message
(
STATUS
"Set CAF_PYTHON_CONFIG_BIN or use './configure --with-python-config=...' to use python-conf"
)
set
(
CAF_NO_PYTHON yes
)
else
()
message
(
STATUS
"Found Python
${
PYTHONLIBS_VERSION_STRING
}
"
)
include_directories
(
${
PYTHON_INCLUDE_DIRS
}
)
endif
()
endif
()
endif
()
set
(
CAF_PYTHON_SRCS src/main.cpp
)
set
(
CAF_PYTHON_HDRS
)
# add targets to CMake
if
(
NOT CAF_NO_PYTHON
)
include_directories
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
)
add_executable
(
caf-python
${
CAF_PYTHON_SRCS
}
${
CAF_PYTHON_HDRS
}
)
target_link_libraries
(
caf-python
${
LD_FLAGS
}
${
CAF_LIBRARY_CORE
}
${
CAF_LIBRARY_IO
}
${
CAF_LIBRARY_RIAC
}
${
PTHREAD_LIBRARIES
}
${
LIBEDIT_LIBRARIES
}
${
PYTHON_LIBRARIES
}
)
install
(
PROGRAMS
${
EXECUTABLE_OUTPUT_PATH
}
/caf-python DESTINATION bin
)
else
()
add_custom_target
(
caf-python SOURCES
${
CAF_PYTHON_SRCS
}
${
CAF_PYTHON_HDRS
}
)
endif
()
libcaf_python/src/main.cpp
0 → 100644
View file @
30d50ed2
This diff is collapsed.
Click to expand it.
pybind
@
19d95ef0
Subproject commit 19d95ef09a384d6631308161ead24e5a230c9bf8
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