Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use standard macro to check C++ version.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 2 Oct 2020 19:33:25 +0000 (21:33 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 2 Oct 2020 19:39:31 +0000 (21:39 +0200)
CMakeLists.txt
src/mc/sosp/PageStore.cpp

index bae099b..e97ab04 100644 (file)
@@ -795,9 +795,7 @@ endif()
 
 if (enable_model-checking AND (NOT ("cxx_std_14" IN_LIST known_features)))
   message(WARNING "C++14 not found. The model-checker will use a slow hash function. You should upgrade your compiler")
-  set(SG_HAVE_CPP14 0)
 else()
-  set(SG_HAVE_CPP14 1)
   set_property(TARGET simgrid PROPERTY CXX_STANDARD 14)    
 endif()
 
index ef1568c..0a070d4 100644 (file)
@@ -12,7 +12,7 @@
 #include "xbt/log.h"
 #include "xbt/sysdep.h"
 
-#ifdef SG_HAVE_CPP14
+#if __cplusplus >= 201402L
 #include "src/include/xxhash.hpp"
 #endif
 #include "src/mc/mc_mmu.hpp"
@@ -34,7 +34,7 @@ namespace mc {
  */
 static XBT_ALWAYS_INLINE PageStore::hash_type mc_hash_page(const void* data)
 {
-#ifdef SG_HAVE_CPP14
+#ifdef __cplusplus >= 201402L
   return xxh::xxhash<64>(data, xbt_pagesize);
 #else
   const std::uint64_t* values = (const uint64_t*)data;