فهرست منبع

Merge topic 'drop-HP-UX'

49640d36 HP-UX: Drop support for building CMake on HP-UX
acd462dd README: Add AIX to list of supported platforms

Acked-by: Kitware Robot <[email protected]>
Merge-request: !1105
Brad King 8 سال پیش
والد
کامیت
21e86adaf6

+ 8 - 3
CMakeLists.txt

@@ -21,6 +21,14 @@ if(CMAKE_BOOTSTRAP)
 endif()
 
 if(NOT CMake_TEST_EXTERNAL_CMAKE)
+  if(CMAKE_SYSTEM_NAME STREQUAL "HP-UX")
+    message(FATAL_ERROR
+      "CMake no longer compiles on HP-UX.  See\n"
+      "  https://gitlab.kitware.com/cmake/cmake/issues/17137\n"
+      "Use CMake 3.9 or lower instead."
+      )
+  endif()
+
   set(CMake_BIN_DIR ${CMake_BINARY_DIR}/bin)
 endif()
 
@@ -536,9 +544,6 @@ int main(void) { return 0; }
       if(NOT HAVE_CoreServices_OS_X_10_5)
         set(CMAKE_USE_LIBUV 0)
       endif()
-    elseif(CMAKE_SYSTEM_NAME STREQUAL "HP-UX")
-      # Disable until it can be ported.
-      set(CMAKE_USE_LIBUV 0)
     endif()
   endif()
   if(CMAKE_USE_LIBUV)

+ 0 - 12
CompileFlags.cmake

@@ -37,18 +37,6 @@ if(CMAKE_SYSTEM MATCHES "OSF1-V")
   endif()
 endif()
 
-if(CMAKE_SYSTEM_NAME MATCHES "HP-UX" AND CMAKE_CXX_COMPILER_ID MATCHES "HP")
-  # HP aCC since version 3.80 supports the flag +hpxstd98 to get ANSI C++98
-  # template support. It is known that version 6.25 doesn't need that flag.
-  # Versions prior to 3.80 will not be able to build CMake. Current assumption:
-  # it is needed for every version from 3.80 to 4 to get it working.
-  if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4 AND
-         NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.80)
-    # use new C++ library and improved template support
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA +hpxstd98")
-  endif()
-endif()
-
 # Workaround for short jump tables on PA-RISC
 if(CMAKE_SYSTEM_PROCESSOR MATCHES "^parisc")
   if(CMAKE_COMPILER_IS_GNUCC)

+ 8 - 0
Help/release/dev/drop-HP-UX.rst

@@ -0,0 +1,8 @@
+drop-HP-UX
+----------
+
+* Support for building CMake on HP-UX has been dropped pending better
+  support for C++11 and a port of libuv.  See `CMake Issue 17137`_.
+  Use CMake 3.9 or lower instead for HP-UX support.
+
+.. _`CMake Issue 17137`: https://gitlab.kitware.com/cmake/cmake/issues/17137

+ 1 - 1
README.rst

@@ -36,7 +36,7 @@ Supported Platforms
 * FreeBSD
 * OpenBSD
 * Solaris
-* HP-UX
+* AIX
 
 Other UNIX-like operating systems may work too out of the box, if not
 it should not be a major problem to port CMake to this platform.

+ 0 - 7
Tests/AliasTarget/CMakeLists.txt

@@ -4,13 +4,6 @@ project(AliasTarget)
 
 set(CMAKE_CXX_STANDARD 98)
 
-# Those versions of the HP compiler that need a flag to get proper C++98
-# template support also need a flag to use the newer C++ library.
-if (CMAKE_CXX_COMPILER_ID STREQUAL HP AND
-    CMAKE_CXX98_STANDARD_COMPILE_OPTION STREQUAL "+hpxstd98")
-  string(APPEND CMAKE_CXX_FLAGS " -AA")
-endif ()
-
 # Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
 if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
     CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")

+ 0 - 7
Tests/Complex/CMakeLists.txt

@@ -440,13 +440,6 @@ set(CMAKE_CXX_STANDARD 98)
 #
 set(CMAKE_CXX_EXTENSIONS TRUE)
 
-# Those versions of the HP compiler that need a flag to get proper C++98
-# template support also need a flag to use the newer C++ library.
-if (CMAKE_CXX_COMPILER_ID STREQUAL HP AND
-    CMAKE_CXX98_STANDARD_COMPILE_OPTION STREQUAL "+hpxstd98")
-  string(APPEND CMAKE_CXX_FLAGS " -AA")
-endif ()
-
 # Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
 if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
     CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")

+ 0 - 7
Tests/ComplexOneConfig/CMakeLists.txt

@@ -397,13 +397,6 @@ set(CMAKE_CXX_STANDARD 98)
 #
 set(CMAKE_CXX_EXTENSIONS TRUE)
 
-# Those versions of the HP compiler that need a flag to get proper C++98
-# template support also need a flag to use the newer C++ library.
-if (CMAKE_CXX_COMPILER_ID STREQUAL HP AND
-    CMAKE_CXX98_STANDARD_COMPILE_OPTION STREQUAL "+hpxstd98")
-  string(APPEND CMAKE_CXX_FLAGS " -AA")
-endif ()
-
 # Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
 if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
     CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")

+ 0 - 7
Tests/Plugin/CMakeLists.txt

@@ -28,13 +28,6 @@ include_directories(
   ${Plugin_SOURCE_DIR}/include
   )
 
-# Those versions of the HP compiler that need a flag to get proper C++98
-# template support also need a flag to use the newer C++ library.
-if (CMAKE_CXX_COMPILER_ID STREQUAL HP AND
-    CMAKE_CXX98_STANDARD_COMPILE_OPTION STREQUAL "+hpxstd98")
-  string(APPEND CMAKE_CXX_FLAGS " -AA")
-endif ()
-
 # Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
 if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
     CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")

+ 0 - 7
Tests/RunCMake/GenerateExportHeader/GEH.cmake

@@ -45,13 +45,6 @@ include(GenerateExportHeader)
 
 set(CMAKE_CXX_STANDARD 98)
 
-# Those versions of the HP compiler that need a flag to get proper C++98
-# template support also need a flag to use the newer C++ library.
-if (CMAKE_CXX_COMPILER_ID STREQUAL HP AND
-    CMAKE_CXX98_STANDARD_COMPILE_OPTION STREQUAL "+hpxstd98")
-  string(APPEND CMAKE_CXX_FLAGS " -AA")
-endif ()
-
 # Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
 if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
     CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")

+ 5 - 54
bootstrap

@@ -129,6 +129,11 @@ fi
 
 # Determine whether this is HP-UX
 if echo "${cmake_system}" | grep -q HP-UX; then
+  die 'CMake no longer compiles on HP-UX.  See
+
+  https://gitlab.kitware.com/cmake/cmake/issues/17137
+
+Use CMake 3.9 or lower instead.'
   cmake_system_hpux=true
 else
   cmake_system_hpux=false
@@ -1140,60 +1145,6 @@ else
 fi
 rm -f "${TMPFILE}.cxx"
 
-if [ "x${cmake_cxx_compiler_is_gnu}" != "x1" ]; then
-  # Check for non-GNU compiler flags
-
-  # If we are on HP-UX, check for -Ae for the C compiler.
-  if [ "x${cmake_system}" = "xHP-UX" ]; then
-    cmake_test_flags="-Ae"
-    TMPFILE=`cmake_tmp_file`
-    echo '
-    int main(int argc, char** argv) { (void)argc; (void)argv; return 0; }
-' > ${TMPFILE}.c
-    cmake_need_Ae=0
-    if cmake_try_run "${cmake_c_compiler}" "${cmake_c_flags}" "${TMPFILE}.c" >> cmake_bootstrap.log 2>&1; then
-      :
-    else
-      if cmake_try_run "${cmake_c_compiler}" \
-        "${cmake_c_flags} ${cmake_test_flags}" "${TMPFILE}.c" >> cmake_bootstrap.log 2>&1; then
-        cmake_need_Ae=1
-      fi
-    fi
-    if [ "x${cmake_need_Ae}" = "x1" ]; then
-      cmake_c_flags="${cmake_c_flags} ${cmake_test_flags}"
-      echo "${cmake_c_compiler} needs ${cmake_test_flags}"
-    else
-      echo "${cmake_c_compiler} does not need ${cmake_test_flags}"
-    fi
-    rm -f "${TMPFILE}.c"
-    echo '
-    #include <iostream>
-    int main(int argc, char** argv) {
-    for(int i=0; i < 1; ++i);
-    for(int i=0; i < 1; ++i);
-    (void)argc; (void)argv; return 0; }
-' > ${TMPFILE}.cxx
-    cmake_need_AAstd98=0
-    cmake_test_flags="-AA +hpxstd98"
-    if cmake_try_run "${cmake_cxx_compiler}" "${cmake_cxx_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
-      :
-    else
-      if cmake_try_run "${cmake_cxx_compiler}" \
-        "${cmake_cxx_flags} ${cmake_test_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
-        cmake_need_AAstd98=1
-      fi
-    fi
-    if [ "x${cmake_need_AAstd98}" = "x1" ]; then
-      cmake_cxx_flags="${cmake_cxx_flags} ${cmake_test_flags}"
-      echo "${cmake_cxx_compiler} needs ${cmake_test_flags}"
-    else
-      echo "${cmake_cxx_compiler} does not need ${cmake_test_flags}"
-    fi
-  fi
-  cmake_test_flags=
-fi
-
-
 # Test for kwsys features
 KWSYS_NAME_IS_KWSYS=0
 KWSYS_BUILD_SHARED=0