[Openmp-commits] [openmp] 521a5c1 - Rename OPENMP_HAVE_STD_CPP14_FLAG to match c++17

Jon Chesterfield via Openmp-commits openmp-commits at lists.llvm.org
Mon Aug 8 09:07:51 PDT 2022


Author: Jon Chesterfield
Date: 2022-08-08T17:07:45+01:00
New Revision: 521a5c11acb45fe4672ed63e3f6aa1f22b0e9fbe

URL: https://github.com/llvm/llvm-project/commit/521a5c11acb45fe4672ed63e3f6aa1f22b0e9fbe
DIFF: https://github.com/llvm/llvm-project/commit/521a5c11acb45fe4672ed63e3f6aa1f22b0e9fbe.diff

LOG: Rename OPENMP_HAVE_STD_CPP14_FLAG to match c++17

Added: 
    

Modified: 
    openmp/CMakeLists.txt
    openmp/cmake/HandleOpenMPOptions.cmake
    openmp/cmake/config-ix.cmake

Removed: 
    


################################################################################
diff  --git a/openmp/CMakeLists.txt b/openmp/CMakeLists.txt
index b6ddbe90516d..dd860485c69d 100644
--- a/openmp/CMakeLists.txt
+++ b/openmp/CMakeLists.txt
@@ -67,7 +67,7 @@ set(ENABLE_LIBOMPTARGET ON)
 # Currently libomptarget cannot be compiled on Windows or MacOS X.
 # Since the device plugins are only supported on Linux anyway,
 # there is no point in trying to compile libomptarget on other OSes.
-if (APPLE OR WIN32 OR NOT OPENMP_HAVE_STD_CPP14_FLAG)
+if (APPLE OR WIN32 OR NOT OPENMP_HAVE_STD_CPP17_FLAG)
   set(ENABLE_LIBOMPTARGET OFF)
 endif()
 
@@ -93,7 +93,7 @@ if (OPENMP_ENABLE_LIBOMPTARGET)
   # Check that the library can actually be built.
   if (APPLE OR WIN32)
     message(FATAL_ERROR "libomptarget cannot be built on Windows and MacOS X!")
-  elseif (NOT OPENMP_HAVE_STD_CPP14_FLAG)
+  elseif (NOT OPENMP_HAVE_STD_CPP17_FLAG)
     message(FATAL_ERROR "Host compiler must support C++14 to build libomptarget!")
   endif()
 

diff  --git a/openmp/cmake/HandleOpenMPOptions.cmake b/openmp/cmake/HandleOpenMPOptions.cmake
index b9faeeff2845..cfbf5e8ac52f 100644
--- a/openmp/cmake/HandleOpenMPOptions.cmake
+++ b/openmp/cmake/HandleOpenMPOptions.cmake
@@ -29,4 +29,4 @@ append_if(OPENMP_HAVE_WNO_EXTRA_FLAG "-Wno-extra" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
 append_if(OPENMP_HAVE_WNO_PEDANTIC_FLAG "-Wno-pedantic" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
 append_if(OPENMP_HAVE_WNO_MAYBE_UNINITIALIZED_FLAG "-Wno-maybe-uninitialized" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
 
-append_if(OPENMP_HAVE_STD_CPP14_FLAG "-std=c++17" CMAKE_CXX_FLAGS)
+append_if(OPENMP_HAVE_STD_CPP17_FLAG "-std=c++17" CMAKE_CXX_FLAGS)

diff  --git a/openmp/cmake/config-ix.cmake b/openmp/cmake/config-ix.cmake
index 5a76805721ba..20079f1fe5f8 100644
--- a/openmp/cmake/config-ix.cmake
+++ b/openmp/cmake/config-ix.cmake
@@ -30,4 +30,4 @@ check_cxx_compiler_flag(-Wno-extra OPENMP_HAVE_WNO_EXTRA_FLAG)
 check_cxx_compiler_flag(-Wno-pedantic OPENMP_HAVE_WNO_PEDANTIC_FLAG)
 check_cxx_compiler_flag(-Wno-maybe-uninitialized OPENMP_HAVE_WNO_MAYBE_UNINITIALIZED_FLAG)
 
-check_cxx_compiler_flag(-std=c++17 OPENMP_HAVE_STD_CPP14_FLAG)
+check_cxx_compiler_flag(-std=c++17 OPENMP_HAVE_STD_CPP17_FLAG)


        


More information about the Openmp-commits mailing list