Skip to content
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

gcc 11 issue #194

Closed
PhMakowski opened this issue Jun 11, 2021 · 1 comment · Fixed by #195
Closed

gcc 11 issue #194

PhMakowski opened this issue Jun 11, 2021 · 1 comment · Fixed by #195

Comments

@PhMakowski
Copy link

Hi,
under Fedora with gcc 11.1.1 we need the following patch :
Note, this patch also include a modification in CMakeLists.txt so we can effectively disable build testing.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 58f2c9b..a44d26d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -812,5 +812,7 @@ add_subdirectory(examples)
 add_subdirectory(external)
 
 # Tests
-enable_testing()
-add_subdirectory(test)
+if(BUILD_TESTING)
+  enable_testing()
+  add_subdirectory(test)
+endif()
diff --git a/src/PABLO/Map.hpp b/src/PABLO/Map.hpp
index 08f4dc0..30092e5 100644
--- a/src/PABLO/Map.hpp
+++ b/src/PABLO/Map.hpp
@@ -31,6 +31,7 @@
 #include <vector>
 #include <iostream>
 #include <array>
+#include <limits>
 
 namespace bitpit {
 
diff --git a/src/common/commonUtils.hpp b/src/common/commonUtils.hpp
index ad9ced6..bd89efa 100644
--- a/src/common/commonUtils.hpp
+++ b/src/common/commonUtils.hpp
@@ -38,6 +38,7 @@
 #include <string>
 #include <vector>
 #include <map>
+#include <limits>
 
 // Stringification macro
 #define BITPIT_STR2(X) #X
@andrea-iob andrea-iob self-assigned this Jun 11, 2021
@andrea-iob andrea-iob linked a pull request Jun 11, 2021 that will close this issue
@andrea-iob
Copy link
Member

Thanks for the patch.

When #195 will be merged, I will also backport the changes into the 1.7 branch.

We are in the process of updating the test suite (#115), I can add a variable to disable testing in that pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants