diff options
author | Augusto F. Hack <hack.augusto@gmail.com> | 2018-07-22 06:08:47 +0800 |
---|---|---|
committer | Augusto F. Hack <hack.augusto@gmail.com> | 2018-08-06 06:21:33 +0800 |
commit | 6c3b48ddfcfb0849e1083cea8d4fae4446511be1 (patch) | |
tree | 026b6acf54761cec4cc5573c9e3147e6270f1f63 /cmake/EthCompilerSettings.cmake | |
parent | 20c65f9af1f42620db7b77543717a2b341771daf (diff) | |
download | dexon-solidity-6c3b48ddfcfb0849e1083cea8d4fae4446511be1.tar.gz dexon-solidity-6c3b48ddfcfb0849e1083cea8d4fae4446511be1.tar.zst dexon-solidity-6c3b48ddfcfb0849e1083cea8d4fae4446511be1.zip |
Added guards for unknown pragmas
Removed push/pop if there was no change to the warnings *in the same
file* for a given compiler. This assumes the imported boost headers use
a warning stack themselves.
The pragmas don't seem to be required anymore, but were not removed to
mantain compatibility with older versions of the boost library.
Compiled with
- clang version 6.0.1 (tags/RELEASE_601/final)
- gcc (GCC) 8.1.1 20180531
against:
- libboost 1.67.0-5
Diffstat (limited to 'cmake/EthCompilerSettings.cmake')
-rw-r--r-- | cmake/EthCompilerSettings.cmake | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/cmake/EthCompilerSettings.cmake b/cmake/EthCompilerSettings.cmake index 515057fa..b0786ce2 100644 --- a/cmake/EthCompilerSettings.cmake +++ b/cmake/EthCompilerSettings.cmake @@ -36,13 +36,6 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA add_compile_options(-Wextra) add_compile_options(-Werror) - # Disable warnings about unknown pragmas (which is enabled by -Wall). I assume we have external - # dependencies (probably Boost) which have some of these. Whatever the case, we shouldn't be - # disabling these globally. Instead, we should pragma around just the problem #includes. - # - # TODO - Track down what breaks if we do NOT do this. - add_compile_options(-Wno-unknown-pragmas) - # Configuration-specific compiler settings. set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -DETH_DEBUG") set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG") @@ -73,13 +66,13 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA # TODO - Is this even necessary? Why? # See http://stackoverflow.com/questions/19774778/when-is-it-necessary-to-use-use-the-flag-stdlib-libstdc. add_compile_options(-stdlib=libstdc++) - + # Tell Boost that we're using Clang's libc++. Not sure exactly why we need to do. add_definitions(-DBOOST_ASIO_HAS_CLANG_LIBCXX) - + # Use fancy colors in the compiler diagnostics add_compile_options(-fcolor-diagnostics) - + # See "How to silence unused command line argument error with clang without disabling it?" # When using -Werror with clang, it transforms "warning: argument unused during compilation" messages # into errors, which makes sense. |