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
b6d7d76e
Commit
b6d7d76e
authored
Jul 10, 2012
by
Matthias Vallentin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable CXXFLAGS overriding on the command line.
parent
d45b8c6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
17 deletions
+32
-17
CMakeLists.txt
CMakeLists.txt
+32
-17
No files found.
CMakeLists.txt
View file @
b6d7d76e
...
...
@@ -10,34 +10,49 @@ endif ()
set
(
CMAKE_MODULE_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
)
set
(
CMAKE_CXX_FLAGS
"-std=c++11 -Wextra -Wall -pedantic"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-O0 -g"
)
set
(
CMAKE_CXX_FLAGS_MINSIZEREL
"-Os"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"-O4"
)
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"-O2 -g"
)
if
(
ENABLE_DEBUG
)
set
(
CMAKE_BUILD_TYPE Debug
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DCPPA_DEBUG"
)
# Check if the user provided CXXFLAGS on the command line.
if
(
CMAKE_CXX_FLAGS
)
set
(
CXXFLAGS_PROVIDED true
)
ENDIF
()
if
(
CXXFLAGS_PROVIDED
)
set
(
CMAKE_CXX_FLAGS_DEBUG
""
)
set
(
CMAKE_CXX_FLAGS_MINSIZEREL
""
)
set
(
CMAKE_CXX_FLAGS_RELEASE
""
)
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
""
)
else
()
set
(
CMAKE_BUILD_TYPE RelWithDebInfo
)
set
(
CMAKE_CXX_FLAGS
"-std=c++11 -Wextra -Wall -pedantic"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-O0 -g"
)
set
(
CMAKE_CXX_FLAGS_MINSIZEREL
"-Os"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"-O4"
)
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"-O2 -g"
)
endif
()
if
(
DISABLE_CONTEXT_SWITCHING
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DCPPA_DISABLE_CONTEXT_SWITCHING"
)
endif
()
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"GNU"
)
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"GNU"
)
execute_process
(
COMMAND
${
CMAKE_CXX_COMPILER
}
-dumpversion
OUTPUT_VARIABLE GCC_VERSION
)
if
(
NOT
(
GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7
))
message
(
FATAL_ERROR
"
${
PROJECT_NAME
}
requires g++ 4.7 or greater."
)
endif
()
elseif
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"Clang"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-stdlib=libc++"
)
else
()
elseif
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"Clang"
)
if
(
NOT CXXFLAGS_PROVIDED
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-stdlib=libc++"
)
endif
()
else
()
message
(
FATAL_ERROR
"Your C++ compiler does not support C++11."
)
endif
()
if
(
ENABLE_DEBUG
)
set
(
CMAKE_BUILD_TYPE Debug
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DCPPA_DEBUG"
)
else
()
set
(
CMAKE_BUILD_TYPE RelWithDebInfo
)
endif
()
if
(
DISABLE_CONTEXT_SWITCHING
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DCPPA_DISABLE_CONTEXT_SWITCHING"
)
endif
()
set
(
LIBCPPA_SRC
src/abstract_tuple.cpp
src/actor.cpp
...
...
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