-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#10345 - Sush warnings in third_party directory on modern compilers/OSes #10346
Changes from all commits
cf2deda
7dac977
cc20b31
0e3b9f4
604ea98
a32540d
1c80e2b
19be572
c0ccd20
cc6b54f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,14 @@ target_compile_definitions( | |
) | ||
target_include_directories( | ||
nlohmann_json | ||
INTERFACE | ||
SYSTEM INTERFACE | ||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/nlohmann> | ||
) | ||
set_source_files_properties( | ||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/nlohmann>/json.hpp | ||
TARGET_DIRECTORY nlohmann_json | ||
PROPERTIES COMPILE_FLAGS -Wno-deprecated-declarations | ||
) | ||
Comment on lines
11
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Somehow I can't figure out how to suppress this warning?
|
||
|
||
# To avoid modifying every third_party library | ||
# we link the project_options in here for every library in this | ||
|
@@ -67,12 +72,15 @@ elseif(MSVC) # VisualStudio | |
endif() | ||
target_compile_features(ssc PRIVATE cxx_std_11) | ||
|
||
# C++17 flag is intentionally after ssd | ||
# C++17 flag is intentionally after ssc | ||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
#Note: the Tarcog files are improperly initializing their virtual base classes, and this 4589 warning | ||
# on MSVC is legitimate, but silencing the warning because it's a third-party library | ||
|
||
# Shush every warning for any lib added after it? | ||
# link_libraries(turn_off_warnings) | ||
|
||
if(NOT MSVC) | ||
add_compile_options(-Wno-pedantic -Wno-unused-parameter -Wno-unknown-pragmas) | ||
else() | ||
|
@@ -93,7 +101,7 @@ set(RE2_BUILD_TESTING | |
# CACHE BOOL "" FORCE) | ||
#endif() | ||
|
||
# We don't want to enable the global warnings for any of the third party projects | ||
# We don't want to enable the global project_warnings for any of the third party projects | ||
link_libraries(project_options) | ||
add_subdirectory(SQLite) | ||
set_target_properties(sqlite PROPERTIES FOLDER ThirdParty/SQLite) | ||
|
@@ -123,21 +131,32 @@ endif() | |
|
||
add_subdirectory(ObjexxFCL) | ||
set_target_properties(objexx PROPERTIES FOLDER ThirdParty/ObjexxFCL) | ||
|
||
add_subdirectory(BCVTB) | ||
set_target_properties(bcvtb PROPERTIES FOLDER ThirdParty/BCVTB) | ||
|
||
add_subdirectory(Expat) | ||
set_target_properties(epexpat PROPERTIES FOLDER ThirdParty/Expat) | ||
|
||
add_subdirectory(FMI) | ||
set_target_properties(epfmiimport PROPERTIES FOLDER ThirdParty/FMI) | ||
target_link_libraries(epfmiimport turn_off_warnings) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Turn off warnings for some of the third party libs that were issuing some:
|
||
|
||
add_subdirectory(zlib) | ||
set_target_properties(miniziplib PROPERTIES FOLDER ThirdParty/zlib) | ||
target_link_libraries(miniziplib PRIVATE turn_off_warnings) | ||
|
||
add_subdirectory(DElight) | ||
set_target_properties(DElight PROPERTIES FOLDER ThirdParty/DElight) | ||
target_link_libraries(DElight PRIVATE turn_off_warnings) | ||
|
||
add_subdirectory(re2) | ||
set_target_properties(re2 PROPERTIES FOLDER ThirdParty/re2) | ||
|
||
add_subdirectory(fmt-8.0.1) | ||
target_compile_definitions(fmt PRIVATE FMT_USE_FULL_CACHE_DRAGONBOX=1) | ||
set_target_properties(fmt PROPERTIES FOLDER ThirdParty/fmt) | ||
|
||
add_subdirectory(cpgfunctionEP) | ||
set_target_properties(cpgfunctionEP PROPERTIES FOLDER ThirdParty/cpgfunctionEP) | ||
|
||
|
@@ -152,7 +171,7 @@ set(KIVA_3D OFF CACHE BOOL "" FORCE) | |
set(KIVA_GROUND_PLOT ${BUILD_GROUND_PLOT} CACHE BOOL "" FORCE) | ||
set(KIVA_COVERAGE OFF CACHE BOOL "" FORCE) | ||
|
||
add_subdirectory("kiva") | ||
add_subdirectory(kiva) | ||
set_target_properties(libkiva PROPERTIES FOLDER ThirdParty/Kiva) | ||
|
||
if(NOT APPLE) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
#ifndef EIGEN_SPARSETRIANGULARSOLVER_H | ||
#define EIGEN_SPARSETRIANGULARSOLVER_H | ||
|
||
namespace Eigen { | ||
namespace Eigen { | ||
|
||
namespace internal { | ||
|
||
|
@@ -270,7 +270,7 @@ struct sparse_solve_triangular_sparse_selector<Lhs,Rhs,Mode,UpLo,ColMajor> | |
} | ||
|
||
|
||
Index count = 0; | ||
[[maybe_unused]] Index count = 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. easy warning avoidance. |
||
// FIXME compute a reference value to filter zeros | ||
for (typename AmbiVector<Scalar,StorageIndex>::Iterator it(tempVector/*,1e-12*/); it; ++it) | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,7 +68,9 @@ struct segments_intersection_points | |
Ratio const& rb_from_wrt_a, Ratio const& rb_to_wrt_a) | ||
{ | ||
return_type result; | ||
unsigned int index = 0, count_a = 0, count_b = 0; | ||
unsigned int index = 0; | ||
[[maybe_unused]] unsigned int count_a = 0; | ||
[[maybe_unused]] unsigned int count_b = 0; | ||
Comment on lines
+71
to
+73
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. easy warning avoidance. |
||
Ratio on_a[2]; | ||
|
||
// The conditions "index < 2" are necessary for non-robust handling, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -190,33 +190,37 @@ | |
# endif | ||
|
||
// BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR | ||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && BOOST_MOVE_HAS_TRAIT(is_constructible) && BOOST_MOVE_HAS_TRAIT(is_trivially_constructible) | ||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) | ||
|
||
# if BOOST_MOVE_HAS_TRAIT(is_constructible) && BOOST_MOVE_HAS_TRAIT(is_trivially_constructible) | ||
# define BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) (__is_constructible(T, T&&) && __is_trivially_constructible(T, T&&)) | ||
# elif BOOST_MOVE_HAS_TRAIT(has_trivial_move_constructor) | ||
# define BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) __has_trivial_move_constructor(T) | ||
# endif | ||
|
||
// BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN | ||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && BOOST_MOVE_HAS_TRAIT(is_assignable) && BOOST_MOVE_HAS_TRAIT(is_trivially_assignable) | ||
# if BOOST_MOVE_HAS_TRAIT(is_assignable) && BOOST_MOVE_HAS_TRAIT(is_trivially_assignable) | ||
# define BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) (__is_assignable(T, T&&) && __is_trivially_assignable(T, T&&)) | ||
# elif BOOST_MOVE_HAS_TRAIT(has_trivial_move_assign) | ||
# define BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) __has_trivial_move_assign(T) | ||
# endif | ||
|
||
// BOOST_MOVE_HAS_NOTHROW_MOVE_CONSTRUCTOR | ||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && BOOST_MOVE_HAS_TRAIT(is_constructible) && BOOST_MOVE_HAS_TRAIT(is_nothrow_constructible) | ||
# if BOOST_MOVE_HAS_TRAIT(is_constructible) && BOOST_MOVE_HAS_TRAIT(is_nothrow_constructible) | ||
# define BOOST_MOVE_HAS_NOTHROW_MOVE_CONSTRUCTOR(T) (__is_constructible(T, T&&) && __is_nothrow_constructible(T, T&&)) | ||
# elif BOOST_MOVE_HAS_TRAIT(has_nothrow_move_constructor) | ||
# define BOOST_MOVE_HAS_NOTHROW_MOVE_CONSTRUCTOR(T) __has_nothrow_move_constructor(T) | ||
# endif | ||
|
||
// BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN | ||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && BOOST_MOVE_HAS_TRAIT(is_assignable) && BOOST_MOVE_HAS_TRAIT(is_nothrow_assignable) | ||
# if BOOST_MOVE_HAS_TRAIT(is_assignable) && BOOST_MOVE_HAS_TRAIT(is_nothrow_assignable) | ||
# define BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN(T) (__is_assignable(T, T&&) && __is_nothrow_assignable(T, T&&)) | ||
# elif BOOST_MOVE_HAS_TRAIT(has_nothrow_move_assign) | ||
# define BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN(T) __has_nothrow_move_assign(T) | ||
# endif | ||
|
||
# endif //BOOST_NO_CXX11_RVALUE_REFERENCES | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jmarrec could you confirm the intent here? It looks like you just pulled one of the IF conditions to an outer IF block. Anything functionally different? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above, it's mostly just using the right builtins. The outer condition is just the way it's on develop at https://github.com/boostorg/move/blob/develop/include/boost/move/detail/type_traits.hpp There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, that should be fine. |
||
|
||
// BOOST_MOVE_ALIGNMENT_OF | ||
# define BOOST_MOVE_ALIGNMENT_OF(T) __alignof(T) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,7 +78,7 @@ | |
#if defined(__MSL_CPP__) && (__MSL_CPP__ >= 0x8000) | ||
// Metrowerks compiler is acquiring intrinsic type traits support | ||
// post version 8. We hook into the published interface to pick up | ||
// user defined specializations as well as compiler intrinsics as | ||
// user defined specializations as well as compiler intrinsics as | ||
// and when they become available: | ||
# include <msl_utility> | ||
# define BOOST_IS_UNION(T) BOOST_STD_EXTENSION_NAMESPACE::is_union<T>::value | ||
|
@@ -160,11 +160,11 @@ | |
# define BOOST_HAS_TYPE_TRAITS_INTRINSICS | ||
#endif | ||
|
||
#if defined(BOOST_CLANG) && defined(__has_feature) && !defined(__CUDACC__) | ||
#if defined(BOOST_CLANG) && defined(__has_feature) && defined(__has_builtin) && (!(defined(__CUDACC__) && (__CUDACC_VER_MAJOR__ < 11)) || defined(__CUDA__)) | ||
// | ||
// Note that these intrinsics are disabled for the CUDA meta-compiler as it appears | ||
// to not support them, even though the underlying clang compiler does so. | ||
// This is a rubbish fix as it basically stops type traits from working correctly, | ||
// This is a rubbish fix as it basically stops type traits from working correctly, | ||
// but maybe the best we can do for now. See https://svn.boost.org/trac/boost/ticket/10694 | ||
// | ||
// | ||
|
@@ -183,25 +183,39 @@ | |
# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_empty) | ||
# define BOOST_IS_EMPTY(T) __is_empty(T) | ||
# endif | ||
# if __has_feature(has_trivial_constructor) | ||
# if __has_builtin(__is_trivially_constructible) | ||
# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __is_trivially_constructible(T) | ||
# elif __has_feature(has_trivial_constructor) | ||
# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) | ||
# endif | ||
# if __has_feature(has_trivial_copy) | ||
# if __has_builtin(__is_trivially_copyable) | ||
# define BOOST_HAS_TRIVIAL_COPY(T) (__is_trivially_copyable(T) && !is_reference<T>::value) | ||
# elif __has_feature(has_trivial_copy) | ||
# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference<T>::value) | ||
# endif | ||
# if __has_feature(has_trivial_assign) | ||
# if __has_builtin(__is_trivially_assignable) | ||
# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__is_trivially_assignable(T&, const T&) && !is_volatile<T>::value && is_assignable<T&, const T&>::value) | ||
# elif __has_feature(has_trivial_assign) | ||
# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile<T>::value && is_assignable<T&, const T&>::value) | ||
# endif | ||
# if __has_feature(has_trivial_destructor) | ||
# if __has_builtin(__is_trivially_destructible) | ||
# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__is_trivially_destructible(T) && is_destructible<T>::value) | ||
# elif __has_feature(has_trivial_destructor) | ||
# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) && is_destructible<T>::value) | ||
# endif | ||
# if __has_feature(has_nothrow_constructor) | ||
# if __has_builtin(__is_nothrow_constructible) | ||
# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__is_nothrow_constructible(T) && is_default_constructible<T>::value) | ||
# elif __has_feature(has_nothrow_constructor) | ||
# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) && is_default_constructible<T>::value) | ||
# endif | ||
Comment on lines
+206
to
210
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I pulled the latest from develop for the move and type_traits boost projects, keeping only the macro changes I needed. |
||
# if __has_feature(has_nothrow_copy) | ||
# if __has_builtin(__is_nothrow_constructible) | ||
# define BOOST_HAS_NOTHROW_COPY(T) (__is_nothrow_constructible(T, const T&) && !is_volatile<T>::value && !is_reference<T>::value && is_copy_constructible<T>::value) | ||
# elif __has_feature(has_nothrow_copy) | ||
# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile<T>::value && !is_reference<T>::value && is_copy_constructible<T>::value) | ||
# endif | ||
# if __has_feature(has_nothrow_assign) | ||
# if __has_builtin(__is_nothrow_assignable) | ||
# define BOOST_HAS_NOTHROW_ASSIGN(T) (__is_nothrow_assignable(T&, const T&) && !is_volatile<T>::value && is_assignable<T&, const T&>::value) | ||
# elif __has_feature(has_nothrow_assign) | ||
# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile<T>::value && is_assignable<T&, const T&>::value) | ||
# endif | ||
# if __has_feature(has_virtual_destructor) | ||
|
@@ -388,4 +402,3 @@ | |
#endif // BOOST_TT_DISABLE_INTRINSICS | ||
|
||
#endif // BOOST_TT_INTRINSICS_HPP_INCLUDED | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,7 +91,7 @@ function(set_default_compile_options target) | |
else(MSVC) | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | ||
if (APPLE) | ||
set(MAIN_CFLAGS "${MAIN_CFLAGS} -arch x86_64 -fno-common -DWX_PRECOMP -D__MACOSX__") | ||
set(MAIN_CFLAGS "${MAIN_CFLAGS} -fno-common -DWX_PRECOMP -D__MACOSX__") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah. |
||
else() | ||
set(MAIN_CFLAGS "${MAIN_CFLAGS} -D__UNIX__") | ||
endif() | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -232,7 +232,12 @@ foreach( name ${DEPENDENCIES} ) | |
endforeach() | ||
|
||
if (UNIX) | ||
target_link_libraries(ssc -lpthread -lm -ldl -lstdc++) | ||
find_package(Threads REQUIRED) | ||
target_link_libraries(ssc Threads::Threads ${CMAKE_DL_LIBS}) | ||
find_library(MATH_LIBRARY m) | ||
if(MATH_LIBRARY) | ||
target_link_libraries(ssc ${MATH_LIBRARY}) | ||
endif() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah. |
||
endif() | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A new interface library, which does
-w
on gcc/clang and/W0
on msvc to remove all warningsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, we shouldn't be trying to handle warnings emitted from third_party, so this is fine with me.