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
3dbe1534
Commit
3dbe1534
authored
Dec 12, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix flags for --more-clang-warnings
parent
05d2dcf3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
CMakeLists.txt
CMakeLists.txt
+14
-12
No files found.
CMakeLists.txt
View file @
3dbe1534
...
...
@@ -102,35 +102,37 @@ if(NOT WIN32 AND NOT NO_COMPILER_CHECK)
endif
()
endif
()
# set optional build flags
set
(
CXX_
EXTRA_FLAGS
""
)
set
(
EXTRA_FLAGS
""
)
# add "-Werror" flag if --pedantic-build is used
if
(
CXX_WARNINGS_AS_ERROS
)
set
(
CXX_
EXTRA_FLAGS
"-Werror"
)
set
(
EXTRA_FLAGS
"-Werror"
)
endif
()
# enable a ton of warnings if --more-clang-warnings is used
if
(
MORE_CLANG_WARNINGS AND
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"Clang"
)
set
(
CXX_EXTRA_FLAGS
"
${
CXX_EXTRA_FLAGS
}
-Weverything -Wno-c++98-compat "
"-Wno-padded -Wno-documentation-unknown-command "
"-Wno-exit-time-destructors -Wno-global-constructors "
"-Wno-missing-prototypes -Wno-c++98-compat-pedantic "
"-Wno-unused-member-function "
"-Wno-unused-const-variable"
)
set
(
WFLAGS
"-Weverything -Wno-c++98-compat -Wno-padded -Wno-missing-noreturn "
"-Wno-documentation-unknown-command -Wno-exit-time-destructors "
"-Wno-global-constructors -Wno-missing-prototypes "
"-Wno-c++98-compat-pedantic -Wno-unused-member-function "
"-Wno-unused-const-variable -Wno-switch-enum"
)
string
(
REPLACE
";"
""
WFLAGS_STR
${
WFLAGS
}
)
set
(
EXTRA_FLAGS
"
${
EXTRA_FLAGS
}
${
WFLAGS_STR
}
"
)
endif
()
# add -stdlib=libc++ when using Clang
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"Clang"
)
message
(
STATUS
"NOTE: Automatically added -stdlib=libc++ flag, "
"you can override this by defining CMAKE_CXX_FLAGS "
"(see 'configure --help')"
)
set
(
CXX_EXTRA_FLAGS
"
${
CXX_
EXTRA_FLAGS
}
-stdlib=libc++"
)
set
(
EXTRA_FLAGS
"
${
EXTRA_FLAGS
}
-stdlib=libc++"
)
endif
()
# enable address sanitizer if requested by the user
if
(
ENABLE_ADDRESS_SANITIZER
)
message
(
STATUS
"Enable address sanitizer"
)
set
(
CXX_EXTRA_FLAGS
"
${
CXX_EXTRA_FLAGS
}
-fsanitize=address -fno-omit-frame-pointer"
)
set
(
EXTRA_FLAGS
"
${
EXTRA_FLAGS
}
-fsanitize=address -fno-omit-frame-pointer"
)
endif
(
ENABLE_ADDRESS_SANITIZER
)
# -pthread is ignored on MacOSX but required on other platforms
if
(
NOT APPLE AND NOT WIN32
)
set
(
CXX_EXTRA_FLAGS
"
${
CXX_
EXTRA_FLAGS
}
-pthread"
)
set
(
EXTRA_FLAGS
"
${
EXTRA_FLAGS
}
-pthread"
)
endif
()
# check if the user provided CXXFLAGS, set defaults otherwise
if
(
CMAKE_CXX_FLAGS
)
...
...
@@ -139,7 +141,7 @@ if(CMAKE_CXX_FLAGS)
set
(
CMAKE_CXX_FLAGS_RELEASE
""
)
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
""
)
else
()
set
(
CMAKE_CXX_FLAGS
"-std=c++11 -Wextra -Wall -pedantic -fPIC
${
CXX_
EXTRA_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"-std=c++11 -Wextra -Wall -pedantic -fPIC
${
EXTRA_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-O0 -g"
)
set
(
CMAKE_CXX_FLAGS_MINSIZEREL
"-Os"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"-O3 -DNDEBUG"
)
...
...
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