HP-UX: Drop support for building CMake on HP-UX
CMake will soon require both C++11 and libuv to build. Neither of these works on HP-UX, so unfortunately we need to drop support for the platform until someone can get them working. Issue: #17137
This commit is contained in:
parent
acd462dd31
commit
49640d3629
@ -21,6 +21,14 @@ if(CMAKE_BOOTSTRAP)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT CMake_TEST_EXTERNAL_CMAKE)
|
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)
|
set(CMake_BIN_DIR ${CMake_BINARY_DIR}/bin)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -536,9 +544,6 @@ int main(void) { return 0; }
|
|||||||
if(NOT HAVE_CoreServices_OS_X_10_5)
|
if(NOT HAVE_CoreServices_OS_X_10_5)
|
||||||
set(CMAKE_USE_LIBUV 0)
|
set(CMAKE_USE_LIBUV 0)
|
||||||
endif()
|
endif()
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "HP-UX")
|
|
||||||
# Disable until it can be ported.
|
|
||||||
set(CMAKE_USE_LIBUV 0)
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_USE_LIBUV)
|
if(CMAKE_USE_LIBUV)
|
||||||
|
@ -37,18 +37,6 @@ if(CMAKE_SYSTEM MATCHES "OSF1-V")
|
|||||||
endif()
|
endif()
|
||||||
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
|
# Workaround for short jump tables on PA-RISC
|
||||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^parisc")
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^parisc")
|
||||||
if(CMAKE_COMPILER_IS_GNUCC)
|
if(CMAKE_COMPILER_IS_GNUCC)
|
||||||
|
8
Help/release/dev/drop-HP-UX.rst
Normal file
8
Help/release/dev/drop-HP-UX.rst
Normal file
@ -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
|
@ -37,7 +37,6 @@ Supported Platforms
|
|||||||
* OpenBSD
|
* OpenBSD
|
||||||
* Solaris
|
* Solaris
|
||||||
* AIX
|
* AIX
|
||||||
* HP-UX
|
|
||||||
|
|
||||||
Other UNIX-like operating systems may work too out of the box, if not
|
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.
|
it should not be a major problem to port CMake to this platform.
|
||||||
|
@ -4,13 +4,6 @@ project(AliasTarget)
|
|||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 98)
|
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
|
# Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
|
||||||
CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
|
CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
|
||||||
|
@ -440,13 +440,6 @@ set(CMAKE_CXX_STANDARD 98)
|
|||||||
#
|
#
|
||||||
set(CMAKE_CXX_EXTENSIONS TRUE)
|
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
|
# Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
|
||||||
CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
|
CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
|
||||||
|
@ -397,13 +397,6 @@ set(CMAKE_CXX_STANDARD 98)
|
|||||||
#
|
#
|
||||||
set(CMAKE_CXX_EXTENSIONS TRUE)
|
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
|
# Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
|
||||||
CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
|
CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
|
||||||
|
@ -28,13 +28,6 @@ include_directories(
|
|||||||
${Plugin_SOURCE_DIR}/include
|
${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
|
# Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
|
||||||
CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
|
CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
|
||||||
|
@ -45,13 +45,6 @@ include(GenerateExportHeader)
|
|||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 98)
|
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
|
# Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
|
||||||
CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
|
CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
|
||||||
|
59
bootstrap
59
bootstrap
@ -129,6 +129,11 @@ fi
|
|||||||
|
|
||||||
# Determine whether this is HP-UX
|
# Determine whether this is HP-UX
|
||||||
if echo "${cmake_system}" | grep -q HP-UX; then
|
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
|
cmake_system_hpux=true
|
||||||
else
|
else
|
||||||
cmake_system_hpux=false
|
cmake_system_hpux=false
|
||||||
@ -1140,60 +1145,6 @@ else
|
|||||||
fi
|
fi
|
||||||
rm -f "${TMPFILE}.cxx"
|
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
|
# Test for kwsys features
|
||||||
KWSYS_NAME_IS_KWSYS=0
|
KWSYS_NAME_IS_KWSYS=0
|
||||||
KWSYS_BUILD_SHARED=0
|
KWSYS_BUILD_SHARED=0
|
||||||
|
Loading…
Reference in New Issue
Block a user