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
a1a9928c
Commit
a1a9928c
authored
Feb 28, 2020
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix handling of OS-specific threading dependency
parent
5a36e2a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
19 deletions
+22
-19
CMakeLists.txt
CMakeLists.txt
+22
-19
No files found.
CMakeLists.txt
View file @
a1a9928c
...
@@ -231,8 +231,7 @@ endif()
...
@@ -231,8 +231,7 @@ endif()
# compiler setup #
# compiler setup #
################################################################################
################################################################################
# leave compiler flags alone when building as subdirectory
# leave most compiler flags alone when building as subdirectory
if
(
NOT caf_is_subproject
)
if
(
NOT caf_is_subproject
)
# check for g++ >= 4.8 or clang++ > = 3.2
# check for g++ >= 4.8 or clang++ > = 3.2
if
(
NOT WIN32 AND NOT CAF_NO_COMPILER_CHECK AND NOT CMAKE_CROSSCOMPILING
)
if
(
NOT WIN32 AND NOT CAF_NO_COMPILER_CHECK AND NOT CMAKE_CROSSCOMPILING
)
...
@@ -380,19 +379,6 @@ if (NOT caf_is_subproject)
...
@@ -380,19 +379,6 @@ if (NOT caf_is_subproject)
if
(
NOT APPLE AND NOT WIN32
)
if
(
NOT APPLE AND NOT WIN32
)
build_string
(
"EXTRA_FLAGS"
"-pthread"
)
build_string
(
"EXTRA_FLAGS"
"-pthread"
)
endif
()
endif
()
# -fPIC generates warnings on MinGW and Cygwin plus extra setup steps needed on MinGW
if
(
MINGW
)
add_definitions
(
-D_WIN32_WINNT=0x0600
)
add_definitions
(
-DWIN32
)
include
(
GenerateExportHeader
)
list
(
APPEND CAF_EXTRA_LDFLAGS -lws2_32 -liphlpapi -lpsapi
)
# build static to avoid runtime dependencies to GCC libraries
build_string
(
"EXTRA_FLAGS"
"-static"
)
elseif
(
CYGWIN
)
build_string
(
"EXTRA_FLAGS"
"-U__STRICT_ANSI__"
)
else
()
build_string
(
"EXTRA_FLAGS"
"-fPIC"
)
endif
()
if
(
WIN32
)
if
(
WIN32
)
list
(
APPEND CAF_EXTRA_LDFLAGS ws2_32 iphlpapi
)
list
(
APPEND CAF_EXTRA_LDFLAGS ws2_32 iphlpapi
)
endif
()
endif
()
...
@@ -433,10 +419,27 @@ if (NOT caf_is_subproject)
...
@@ -433,10 +419,27 @@ if (NOT caf_is_subproject)
if
(
NOT CMAKE_BUILD_TYPE
)
if
(
NOT CMAKE_BUILD_TYPE
)
set
(
CMAKE_BUILD_TYPE RelWithDebInfo
)
set
(
CMAKE_BUILD_TYPE RelWithDebInfo
)
endif
()
endif
()
# needed by subprojects
endif
()
if
(
DEFINED CMAKE_LD_LIBS
)
list
(
APPEND
${
CMAKE_LD_LIBS
}
)
# Make sure to link to platform-specific threading dependency (e.g. pthread).
endif
()
if
(
NOT TARGET Threads::Threads
)
find_package
(
Threads REQUIRED
)
endif
()
list
(
APPEND CAF_EXTRA_LDFLAGS Threads::Threads
)
# Have CMake set -fPIC when necessary.
set
(
CMAKE_POSITION_INDEPENDENT_CODE ON
)
# Adjust setup for MinGW and Cygwin.
if
(
MINGW
)
add_definitions
(
-D_WIN32_WINNT=0x0600
)
add_definitions
(
-DWIN32
)
include
(
GenerateExportHeader
)
list
(
APPEND CAF_EXTRA_LDFLAGS -lws2_32 -liphlpapi -lpsapi
)
# Build static to avoid runtime dependencies to GCC libraries.
build_string
(
"EXTRA_FLAGS"
"-static"
)
elseif
(
CYGWIN
)
build_string
(
"EXTRA_FLAGS"
"-U__STRICT_ANSI__"
)
endif
()
endif
()
################################################################################
################################################################################
...
...
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