Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
actor-incubator
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
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-incubator
Commits
e1fbf15c
Unverified
Commit
e1fbf15c
authored
Jan 08, 2020
by
Dominik Charousset
Committed by
GitHub
Jan 08, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #52
Fix XCode CMake generator issue
parents
5106b9f9
0570a448
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
18 deletions
+21
-18
CMakeLists.txt
CMakeLists.txt
+5
-16
cmake/dummy.cpp
cmake/dummy.cpp
+10
-0
libcaf_bb/CMakeLists.txt
libcaf_bb/CMakeLists.txt
+3
-1
libcaf_net/CMakeLists.txt
libcaf_net/CMakeLists.txt
+3
-1
No files found.
CMakeLists.txt
View file @
e1fbf15c
...
...
@@ -15,6 +15,11 @@ include(CheckCSourceRuns) # Check whether compiler produces binaries
include
(
GNUInstallDirs
)
# Sets default install paths
include
(
GenerateExportHeader
)
# Auto-generates dllexport macros
# -- project-specific CMake settings -------------------------------------------
set
(
CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
)
# -- check whether we are running as CMake subdirectory ------------------------
get_directory_property
(
_parent PARENT_DIRECTORY
)
...
...
@@ -206,22 +211,6 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
"initialize the build configuration."
)
endif
()
# Set module path appropriately.
set
(
CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
)
# Set binary output path if not defined by user.
if
(
EXECUTABLE_OUTPUT_PATH STREQUAL
""
)
set
(
EXECUTABLE_OUTPUT_PATH
"
${
CMAKE_CURRENT_BINARY_DIR
}
/bin"
)
endif
()
# Set library output path if not defined by user, but always set library output
# path to binary output path for Xcode projects.
if
(
CMAKE_GENERATOR STREQUAL
"Xcode"
)
set
(
LIBRARY_OUTPUT_PATH
"
${
EXECUTABLE_OUTPUT_PATH
}
"
)
elseif
(
LIBRARY_OUTPUT_PATH STREQUAL
""
)
set
(
LIBRARY_OUTPUT_PATH
"
${
CMAKE_CURRENT_BINARY_DIR
}
/lib"
)
endif
()
# -- get dependencies ----------------------------------------------------------
find_package
(
CAF COMPONENTS core io test
)
...
...
cmake/dummy.cpp
0 → 100644
View file @
e1fbf15c
// Some CMake generators (in particular XCode) choke on library targets that
// only consist of a TARGET_OBJECTS generator expression. Adding this otherwise
// useless file to the library target makes sure the generated project files
// have at least one regular source file.
namespace
{
[[
maybe_unused
]]
int
dummy
;
}
// namespace
libcaf_bb/CMakeLists.txt
View file @
e1fbf15c
...
...
@@ -22,7 +22,9 @@ set(CAF_BB_TEST_SOURCES
#
# add_library(libcaf_bb_obj OBJECT ${CAF_BB_SOURCES} ${CAF_BB_HEADERS})
#
# add_library(libcaf_bb $<TARGET_OBJECTS:libcaf_bb_obj>)
# add_library(libcaf_bb
# "${PROJECT_SOURCE_DIR}/cmake/dummy.cpp"
# $<TARGET_OBJECTS:libcaf_bb_obj>)
#
# add_library(caf::bb ALIAS libcaf_bb)
#
...
...
libcaf_net/CMakeLists.txt
View file @
e1fbf15c
...
...
@@ -80,7 +80,9 @@ set(CAF_NET_TEST_SOURCES
add_library
(
libcaf_net_obj OBJECT
${
CAF_NET_SOURCES
}
${
CAF_NET_HEADERS
}
)
add_library
(
libcaf_net $<TARGET_OBJECTS:libcaf_net_obj>
)
add_library
(
libcaf_net
"
${
PROJECT_SOURCE_DIR
}
/cmake/dummy.cpp"
$<TARGET_OBJECTS:libcaf_net_obj>
)
add_library
(
caf::net ALIAS libcaf_net
)
...
...
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