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
382ea5c2
Commit
382ea5c2
authored
Jan 08, 2020
by
Jakob Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add dummy file to library targets
parent
5106b9f9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
16 deletions
+30
-16
CMakeLists.txt
CMakeLists.txt
+14
-14
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 @
382ea5c2
...
@@ -15,6 +15,11 @@ include(CheckCSourceRuns) # Check whether compiler produces binaries
...
@@ -15,6 +15,11 @@ include(CheckCSourceRuns) # Check whether compiler produces binaries
include
(
GNUInstallDirs
)
# Sets default install paths
include
(
GNUInstallDirs
)
# Sets default install paths
include
(
GenerateExportHeader
)
# Auto-generates dllexport macros
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 ------------------------
# -- check whether we are running as CMake subdirectory ------------------------
get_directory_property
(
_parent PARENT_DIRECTORY
)
get_directory_property
(
_parent PARENT_DIRECTORY
)
...
@@ -206,20 +211,15 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
...
@@ -206,20 +211,15 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
"initialize the build configuration."
)
"initialize the build configuration."
)
endif
()
endif
()
# Set module path appropriately.
if
(
NOT XCODE
)
set
(
CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
)
# set binary output path if not defined by user
if
(
NOT EXECUTABLE_OUTPUT_PATH
)
# Set binary output path if not defined by user.
if
(
EXECUTABLE_OUTPUT_PATH STREQUAL
""
)
set
(
EXECUTABLE_OUTPUT_PATH
"
${
CMAKE_CURRENT_BINARY_DIR
}
/bin"
)
set
(
EXECUTABLE_OUTPUT_PATH
"
${
CMAKE_CURRENT_BINARY_DIR
}
/bin"
)
endif
()
endif
()
# set library output path if not defined by user
# Set library output path if not defined by user, but always set library output
if
(
NOT LIBRARY_OUTPUT_PATH
)
# 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"
)
set
(
LIBRARY_OUTPUT_PATH
"
${
CMAKE_CURRENT_BINARY_DIR
}
/lib"
)
endif
()
endif
()
endif
()
# -- get dependencies ----------------------------------------------------------
# -- get dependencies ----------------------------------------------------------
...
...
cmake/dummy.cpp
0 → 100644
View file @
382ea5c2
// 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 @
382ea5c2
...
@@ -22,7 +22,9 @@ set(CAF_BB_TEST_SOURCES
...
@@ -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_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)
# add_library(caf::bb ALIAS libcaf_bb)
#
#
...
...
libcaf_net/CMakeLists.txt
View file @
382ea5c2
...
@@ -80,7 +80,9 @@ set(CAF_NET_TEST_SOURCES
...
@@ -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_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
)
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