[
https://issues.apache.org/jira/browse/MESOS-8033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrew Schwartzmeyer reassigned MESOS-8033:
-------------------------------------------
Resolution: Fixed
Assignee: Andrew Schwartzmeyer
Fix Version/s: 1.6.0
commit 0c18ca176
Author: Andrew Schwartzmeyer <[email protected]>
Date: Thu Mar 8 10:03:48 2018 -0800
CMake: Set C++11 as standard automatically.
Instead of setting the compiler option manually, we use the
`CMAKE_CXX_STANDARD` variable to set the default for all targets. This
automatically appends the correct flag for each compiler.
Review: https://reviews.apache.org/r/66007
commit 5cb101761
Author: Andrew Schwartzmeyer <[email protected]>
Date: Thu Mar 8 14:56:22 2018 -0800
CMake: Enabled compiler warnings.
We had previously been using the default sets of warnings, but now we
use the same warnings as on Autotools. This meant disabling two common
possible-loss-of-data warnings on Windows that are not part of the
GNU/Clang default warnings.
This also replaces the use of `string(APPEND CMAKE_CXX_FLAGS)` with
the canonical command `add_compile_options`. Although generally the
use of `target_compile_options` is preferred, it would currently
result in a lot more churn, and the build already supports setting
these flags globally.
Review: https://reviews.apache.org/r/66008
> Use more idiomatic CMake for compiler features
> ----------------------------------------------
>
> Key: MESOS-8033
> URL: https://issues.apache.org/jira/browse/MESOS-8033
> Project: Mesos
> Issue Type: Improvement
> Components: cmake
> Reporter: Andrew Schwartzmeyer
> Assignee: Andrew Schwartzmeyer
> Priority: Minor
> Labels: cmake
> Fix For: 1.6.0
>
>
> Specifically, we should replace
> {noformat}
> string(APPEND CMAKE_CXX_FLAGS " -std=c++11")
> {noformat}
> With {{CMAKE_CXX_STANDARD}}, and use [compile feature
> requirements|https://cmake.org/cmake/help/latest/manual/cmake-compile-features.7.html#compile-feature-requirements].
> And replace
> {noformat}
> string(APPEND CMAKE_CXX_FLAGS " -Wformat-security")
> {noformat}
> With compile options instead of appending to {{CMAKE_CXX_FLAGS}}.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)