diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index 8c389592ba..3d9a9cb428 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit 8c389592bae401899a1c99bbf7b1781c62170423 +Subproject commit 3d9a9cb428154398d8c2b8b1fafca600d3aff075 diff --git a/ext/ghoul b/ext/ghoul index dd259016f3..359aefa702 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit dd259016f39c6bc5e37db680b35a640e30877d10 +Subproject commit 359aefa702be74f6bbc1535594c2b12e41a94b49 diff --git a/include/openspace/json.h b/include/openspace/json.h index bb8ce73463..d0eb9d6139 100644 --- a/include/openspace/json.h +++ b/include/openspace/json.h @@ -30,17 +30,13 @@ #pragma warning (disable : 4706) // assignment within conditional expression #endif // WIN32 -#if defined(__GNUC__) && !defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" #pragma GCC diagnostic ignored "-Wuseless-cast" -#endif // __GNUC__ #include -#if defined(__GNUC__) && !defined(__clang__) #pragma GCC diagnostic pop -#endif // __GNUC__ #ifdef WIN32 #pragma warning (pop) diff --git a/include/openspace/util/spicemanager.h b/include/openspace/util/spicemanager.h index 6d0958243b..2578956699 100644 --- a/include/openspace/util/spicemanager.h +++ b/include/openspace/util/spicemanager.h @@ -36,22 +36,17 @@ #include #include -#ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wold-style-cast" -#elif defined(__GNUC__) + #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wold-style-cast" -#endif #include "SpiceUsr.h" #include "SpiceZpr.h" -#ifdef __clang__ #pragma clang diagnostic pop -#elif defined(__GNUC__) #pragma GCC diagnostic pop -#endif namespace openspace { diff --git a/modules/touch/include/tuioear.h b/modules/touch/include/tuioear.h index dbf77292bc..42923ebb84 100644 --- a/modules/touch/include/tuioear.h +++ b/modules/touch/include/tuioear.h @@ -25,26 +25,17 @@ #ifndef __OPENSPACE_MODULE_TOUCH___TUIO_EAR___H__ #define __OPENSPACE_MODULE_TOUCH___TUIO_EAR___H__ -// -Wold-style-cast -#if (defined(__GNUC__) && !defined(__clang__)) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wold-style-cast" -#endif // defined(__GNUC__) && !defined(__clang__) -#ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wold-style-cast" -#endif // __clang__ #include #include -#if (defined(__GNUC__) && !defined(__clang__)) #pragma GCC diagnostic pop -#endif // defined(__GNUC__) && !defined(__clang__) -#ifdef __clang__ #pragma clang diagnostic pop -#endif // __clang__ #include #include diff --git a/src/util/spicemanager.cpp b/src/util/spicemanager.cpp index de08991485..bb091050fb 100644 --- a/src/util/spicemanager.cpp +++ b/src/util/spicemanager.cpp @@ -1026,13 +1026,11 @@ void SpiceManager::findCkCoverage(const std::string& path) { constexpr unsigned int MaxObj = 1024; constexpr unsigned int WinSiz = 16384; -#if defined __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wold-style-cast" -#elif defined __GNUC__ + #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wold-style-cast" -#endif SPICEINT_CELL(ids, MaxObj); SPICEDOUBLE_CELL(cover, WinSiz); @@ -1045,11 +1043,8 @@ void SpiceManager::findCkCoverage(const std::string& path) { for (SpiceInt i = 0; i < card_c(&ids); ++i) { const SpiceInt frame = SPICE_CELL_ELEM_I(&ids, i); // NOLINT -#if defined __clang__ #pragma clang diagnostic pop -#elif defined __GNUC__ #pragma GCC diagnostic pop -#endif scard_c(0, &cover); ckcov_c(path.c_str(), frame, SPICEFALSE, "SEGMENT", 0.0, "TDB", &cover); @@ -1085,13 +1080,11 @@ void SpiceManager::findSpkCoverage(const std::string& path) { constexpr unsigned int MaxObj = 1024; constexpr unsigned int WinSiz = 16384; -#if defined __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wold-style-cast" -#elif defined __GNUC__ + #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wold-style-cast" -#endif SPICEINT_CELL(ids, MaxObj); SPICEDOUBLE_CELL(cover, WinSiz); @@ -1104,11 +1097,8 @@ void SpiceManager::findSpkCoverage(const std::string& path) { for (SpiceInt i = 0; i < card_c(&ids); ++i) { const SpiceInt obj = SPICE_CELL_ELEM_I(&ids, i); // NOLINT -#if defined __clang__ #pragma clang diagnostic pop -#elif defined __GNUC__ #pragma GCC diagnostic pop -#endif scard_c(0, &cover); spkcov_c(path.c_str(), obj, &cover); diff --git a/support/cmake/set_openspace_compile_settings.cmake b/support/cmake/set_openspace_compile_settings.cmake index d3020216a9..52616f220f 100644 --- a/support/cmake/set_openspace_compile_settings.cmake +++ b/support/cmake/set_openspace_compile_settings.cmake @@ -28,6 +28,7 @@ function (set_openspace_compile_settings target) set(MSVC_WARNINGS "/MP" # Multi-threading support "/W4" # Highest warning level + "/wd4068" # unknown pragma "/wd4127" # conditional expression is constant [raised by: websocketpp] "/wd4201" # nonstandard extension used : nameless struct/union [raised by: GLM] "/wd5030" # attribute 'attribute' is not recognized [raised by: codegen] @@ -145,6 +146,7 @@ function (set_openspace_compile_settings target) "-Wno-attributes" "-Wno-missing-braces" "-Wno-unknown-attributes" + "-Wno-unknown-pragmas" ) if (OPENSPACE_WARNINGS_AS_ERRORS) set(CLANG_WARNINGS ${CLANG_WARNINGS} "-Werror") @@ -183,6 +185,7 @@ function (set_openspace_compile_settings target) "-Wno-float-equal" "-Wno-long-long" "-Wno-unknown-attributes" + "-Wno-unknown-pragmas" "-Wno-write-strings" ) if (OPENSPACE_WARNINGS_AS_ERRORS) diff --git a/support/coding/codegen b/support/coding/codegen index e1923b7ac7..e53aa1fce3 160000 --- a/support/coding/codegen +++ b/support/coding/codegen @@ -1 +1 @@ -Subproject commit e1923b7ac70d7393483634ef7e2951ff2625f2de +Subproject commit e53aa1fce3ec455f0cc47c8d0a1d716c0976423f diff --git a/tests/test_spicemanager.cpp b/tests/test_spicemanager.cpp index b25596eaf4..0f51e391d6 100644 --- a/tests/test_spicemanager.cpp +++ b/tests/test_spicemanager.cpp @@ -433,22 +433,17 @@ TEST_CASE("SpiceManager: Get Position Transform Matrix", "[spicemanager]") { } } -#if defined __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wold-style-cast" -#elif defined __GNUC__ + #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wold-style-cast" -#endif // transform reference position into new frame mxvg_c(referenceMatrix, state, 3, 3, state_t); -#if defined __clang__ #pragma clang diagnostic pop -#elif defined __GNUC__ #pragma GCC diagnostic pop -#endif position = positionMatrix * position; // check transformed values match