  namespace RaptorQ {
  namespace Impl {
  
-+#pragma warning(push)
-+#pragma warning(disable : 4068) // MSVC unknown pragma
++#ifdef __clang__
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wmissing-braces"
  #pragma clang diagnostic ignored "-Wglobal-constructors"
  #pragma clang diagnostic ignored "-Wexit-time-destructors"
-+#pragma warning(pop)
++#endif
  
  static const std::array<uint32_t, 31> degree_distribution = {
  							  0,    5243,  529531,  704294,  791675,  844104,
-@@ -39,7 +43,10 @@ static const std::array<uint32_t, 31> degree_distribution = {
+@@ -39,7 +42,9 @@ static const std::array<uint32_t, 31> degree_distribution = {
  						1010129, 1011876, 1013490, 1014983, 1016370, 1017662,
  						1048576};
  
-+#pragma warning(push)
-+#pragma warning(disable : 4068) // MSVC unknown pragma
++#ifdef __clang__
  #pragma clang diagnostic pop
-+#pragma warning(pop)
++#endif
  
  }	// namespace Impl
  }	// namespace RaptorQ

 //
 // We work on the "ar" format. refer to
diff --git a/src/multiplication.hpp b/src/multiplication.hpp
index 53504a6..f0e1c50 100644
--- a/src/multiplication.hpp
+++ b/src/multiplication.hpp
@@ -22,10 +22,13 @@
 namespace RaptorQ {
 namespace Impl {
 
+#pragma warning(push)
+#pragma warning(disable : 4068) // MSVC unknown pragma
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wmissing-braces"
 #pragma clang diagnostic ignored "-Wglobal-constructors"
 #pragma clang diagnostic ignored "-Wexit-time-destructors"
+#pragma warning(pop)
 
 static const std::array<uint8_t, 510> oct_exp = {
    1, 2, 4, 8, 16, 32, 64, 128, 29, 58, 116, 232, 205, 135, 19, 38, 76,
@@ -84,7 +87,10 @@ static const std::array<uint8_t, 255> oct_log = {
    79, 174, 213, 233, 230, 231, 173, 232, 116, 214, 244, 234, 168, 80,
    88, 175};
 
+#pragma warning(push)
+#pragma warning(disable : 4068) // MSVC unknown pragma
 #pragma clang diagnostic pop
+#pragma warning(pop)
 
 }	// namespace Impl
 }	// namespace RaptorQ

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 262690e..dac4c1b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,31 +20,43 @@
