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
097df535
Unverified
Commit
097df535
authored
Aug 21, 2019
by
Dominik Charousset
Committed by
GitHub
Aug 21, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #886
Make it easier to build CAF as a CMake subproject
parents
0d110fbe
8888f924
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
CMakeLists.txt
CMakeLists.txt
+19
-6
No files found.
CMakeLists.txt
View file @
097df535
...
@@ -4,6 +4,14 @@ project(caf C CXX)
...
@@ -4,6 +4,14 @@ project(caf C CXX)
include
(
CheckCSourceCompiles
)
include
(
CheckCSourceCompiles
)
include
(
CheckCSourceRuns
)
include
(
CheckCSourceRuns
)
get_directory_property
(
_parent PARENT_DIRECTORY
)
if
(
_parent
)
set
(
caf_is_subproject ON
)
else
()
set
(
caf_is_subproject OFF
)
endif
()
unset
(
_parent
)
# Be nice to VIM users and Clang tools.
# Be nice to VIM users and Clang tools.
set
(
CMAKE_EXPORT_COMPILE_COMMANDS 1
)
set
(
CMAKE_EXPORT_COMPILE_COMMANDS 1
)
...
@@ -50,7 +58,9 @@ else()
...
@@ -50,7 +58,9 @@ else()
endif
()
endif
()
# add helper target that simplifies re-running configure
# add helper target that simplifies re-running configure
add_custom_target
(
configure COMMAND
${
CMAKE_CURRENT_BINARY_DIR
}
/config.status
)
if
(
NOT caf_is_subproject
)
add_custom_target
(
configure COMMAND
${
CMAKE_CURRENT_BINARY_DIR
}
/config.status
)
endif
()
################################################################################
################################################################################
# utility functions #
# utility functions #
...
@@ -404,12 +414,15 @@ install(DIRECTORY libcaf_test/caf/ DESTINATION include/caf
...
@@ -404,12 +414,15 @@ install(DIRECTORY libcaf_test/caf/ DESTINATION include/caf
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake/cmake_uninstall.cmake.in"
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake/cmake_uninstall.cmake.in"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/cmake_uninstall.cmake"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/cmake_uninstall.cmake"
IMMEDIATE @ONLY
)
IMMEDIATE @ONLY
)
# add uninstall target
# add uninstall target if it does not exist yet
add_custom_target
(
uninstall
if
(
NOT TARGET uninstall
)
add_custom_target
(
uninstall
)
endif
()
add_custom_command
(
TARGET uninstall
PRE_BUILD
COMMAND
"
${
CMAKE_COMMAND
}
"
-P
COMMAND
"
${
CMAKE_COMMAND
}
"
-P
"
${
CMAKE_CURRENT_BINARY_DIR
}
/cmake_uninstall.cmake"
)
"
${
CMAKE_CURRENT_BINARY_DIR
}
/cmake_uninstall.cmake"
)
################################################################################
################################################################################
# set inclue paths for subprojects #
# set inclue paths for subprojects #
################################################################################
################################################################################
...
...
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