summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-07-26 20:47:31 (GMT)
committerBrad King <brad.king@kitware.com>2013-07-31 12:21:20 (GMT)
commitb81a4e1568c58d733051d9f27cd070761f264a80 (patch)
tree75306c0a9a10ec13a04a37c952651c8d60c50dcb /Utilities
parent3218f52f11713d28bdfedbe6eceddb8cf8502731 (diff)
downloadCMake-b81a4e1568c58d733051d9f27cd070761f264a80.zip
CMake-b81a4e1568c58d733051d9f27cd070761f264a80.tar.gz
CMake-b81a4e1568c58d733051d9f27cd070761f264a80.tar.bz2
libarchive: Remove build options not used by CMake
Drop options POSIX_REGEX_LIB and ENABLE_SAFESEH that we do not want for the CMake build of libarchive.
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/cmlibarchive/CMakeLists.txt122
1 files changed, 0 insertions, 122 deletions
diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
index d7a7682..64484fd 100644
--- a/Utilities/cmlibarchive/CMakeLists.txt
+++ b/Utilities/cmlibarchive/CMakeLists.txt
@@ -75,8 +75,6 @@ OPTION(ENABLE_OPENSSL "Enable use of OpenSSL" ON)
OPTION(ENABLE_XATTR "Enable extended attribute support" ON)
OPTION(ENABLE_ACL "Enable ACL support" ON)
OPTION(ENABLE_ICONV "Enable iconv support" ON)
-SET(POSIX_REGEX_LIB "AUTO" CACHE STRING "Choose what library should provide POSIX regular expression support")
-SET(ENABLE_SAFESEH "AUTO" CACHE STRING "Enable use of /SAFESEH linker flag (MSVC only)")
IF(WIN32)
IF(MSVC60)
@@ -87,20 +85,6 @@ IF(WIN32)
SET(_WIN32_WINNT ${WINVER})
ENDIF(WIN32)
-IF(MSVC)
- IF(ENABLE_SAFESEH STREQUAL "YES")
- SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH")
- SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH")
- SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH")
- SET(CMAKE_REQUIRED_LINKER_FLAGS "/SAFESEH")
- ELSEIF(ENABLE_SAFESEH STREQUAL "NO")
- SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
- SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
- SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
- SET(CMAKE_REQUIRED_LINKER_FLAGS "/SAFESEH:NO")
- ENDIF(ENABLE_SAFESEH STREQUAL "YES")
-ENDIF(MSVC)
-
IF("${CMAKE_C_PLATFORM_ID}" MATCHES "^(HP-UX)$")
ADD_DEFINITIONS(-D_XOPEN_SOURCE=500) # Ask wchar.h for mbstate_t
ENDIF()
@@ -836,112 +820,6 @@ MARK_AS_ADVANCED(CLEAR LIBXML2_LIBRARIES)
ENDIF()
#
-# POSIX Regular Expression support
-#
-IF(POSIX_REGEX_LIB MATCHES "^(AUTO|LIBC|LIBREGEX)$")
- #
- # If PCREPOSIX is not found or not requested, try using regex
- # from libc or libregex
- #
- FIND_PATH(REGEX_INCLUDE_DIR regex.h)
- IF(REGEX_INCLUDE_DIR)
- CHECK_FUNCTION_EXISTS_GLIBC(regcomp HAVE_REGCOMP_LIBC)
- #
- # If libc does not provide regex, find libregex.
- #
- IF(NOT HAVE_REGCOMP_LIBC)
- CMAKE_PUSH_CHECK_STATE() # Save the state of the variables
- FIND_LIBRARY(REGEX_LIBRARY regex)
- IF(REGEX_LIBRARY)
- SET(CMAKE_REQUIRED_LIBRARIES ${REGEX_LIBRARY})
- CHECK_FUNCTION_EXISTS_GLIBC(regcomp HAVE_REGCOMP_LIBREGEX)
- IF(HAVE_REGCOMP_LIBREGEX)
- LIST(APPEND ADDITIONAL_LIBS ${REGEX_LIBRARY})
- #
- # If regex.h is not found, retry looking for regex.h at
- # REGEX_INCLUDE_DIR
- #
- IF(NOT HAVE_REGEX_H)
- UNSET(HAVE_REGEX_H CACHE)
- INCLUDE_DIRECTORIES(${REGEX_INCLUDE_DIR})
- SET(CMAKE_REQUIRED_INCLUDES ${REGEX_INCLUDE_DIR})
- LA_CHECK_INCLUDE_FILE("regex.h" HAVE_REGEX_H)
- ENDIF(NOT HAVE_REGEX_H)
- # Test if a macro is needed for the library.
- TRY_MACRO_FOR_LIBRARY(
- "${REGEX_INCLUDE_DIR}" "${REGEX_LIBRARY}"
- COMPILES
- "#include <stddef.h>\n#include <regex.h>\nint main() {regex_t r;return regcomp(&r, \"\", 0);}"
- "USE_REGEX_DLL;USE_REGEX_STATIC")
- IF(USE_REGEX_DLL)
- ADD_DEFINITIONS(-DUSE_REGEX_DLL)
- ELSEIF(USE_REGEX_STATIC)
- ADD_DEFINITIONS(-DUSE_REGEX_STATIC)
- ENDIF(USE_REGEX_DLL)
- ENDIF(HAVE_REGCOMP_LIBREGEX)
- ENDIF(REGEX_LIBRARY)
- CMAKE_POP_CHECK_STATE() # Restore the state of the variables
- ENDIF(NOT HAVE_REGCOMP_LIBC)
- ENDIF(REGEX_INCLUDE_DIR)
- IF(HAVE_REGCOMP_LIBC OR HAVE_REGCOMP_LIBREGEX)
- SET(FOUND_POSIX_REGEX_LIB 1)
- ENDIF(HAVE_REGCOMP_LIBC OR HAVE_REGCOMP_LIBREGEX)
-ENDIF(POSIX_REGEX_LIB MATCHES "^(AUTO|LIBC|LIBREGEX)$")
-
-IF(NOT FOUND_POSIX_REGEX_LIB AND POSIX_REGEX_LIB MATCHES "^(AUTO|LIBPCREPOSIX)$")
- #
- # If requested, try finding library for PCREPOSIX
- #
- FIND_PACKAGE(LibGCC)
- FIND_PACKAGE(PCREPOSIX)
- IF(PCREPOSIX_FOUND)
- INCLUDE_DIRECTORIES(${PCRE_INCLUDE_DIR})
- LIST(APPEND ADDITIONAL_LIBS ${PCREPOSIX_LIBRARIES})
- # Test if a macro is needed for the library.
- TRY_MACRO_FOR_LIBRARY(
- "${PCRE_INCLUDE_DIR}" "${PCREPOSIX_LIBRARIES}"
- COMPILES
- "#include <pcreposix.h>\nint main() {regex_t r;return regcomp(&r, \"\", 0);}"
- "WITHOUT_PCRE_STATIC;PCRE_STATIC")
- IF(NOT WITHOUT_PCRE_STATIC AND PCRE_STATIC)
- ADD_DEFINITIONS(-DPCRE_STATIC)
- ELSEIF(NOT WITHOUT_PCRE_STATIC AND NOT PCRE_STATIC AND PCRE_FOUND)
- # Determine if pcre static libraries are to be used.
- LIST(APPEND ADDITIONAL_LIBS ${PCRE_LIBRARIES})
- SET(TMP_LIBRARIES ${PCREPOSIX_LIBRARIES} ${PCRE_LIBRARIES})
- MESSAGE(STATUS "trying again with -lpcre included")
- TRY_MACRO_FOR_LIBRARY(
- "${PCRE_INCLUDE_DIR}" "${TMP_LIBRARIES}"
- COMPILES
- "#include <pcreposix.h>\nint main() {regex_t r;return regcomp(&r, \"\", 0);}"
- "WITHOUT_PCRE_STATIC;PCRE_STATIC")
- IF(NOT WITHOUT_PCRE_STATIC AND PCRE_STATIC)
- ADD_DEFINITIONS(-DPCRE_STATIC)
- ELSEIF(NOT WITHOUT_PCRE_STATIC AND NOT PCRE_STATIC AND MSVC AND LIBGCC_FOUND)
- # When doing a Visual Studio build using pcre static libraries
- # built using the mingw toolchain, -lgcc is needed to resolve
- # ___chkstk_ms.
- MESSAGE(STATUS "Visual Studio build detected, trying again with -lgcc included")
- LIST(APPEND ADDITIONAL_LIBS ${LIBGCC_LIBRARIES})
- SET(TMP_LIBRARIES ${PCREPOSIX_LIBRARIES} ${PCRE_LIBRARIES} ${LIBGCC_LIBRARIES})
- TRY_MACRO_FOR_LIBRARY(
- "${PCRE_INCLUDE_DIR}" "${TMP_LIBRARIES}"
- COMPILES
- "#include <pcreposix.h>\nint main() {regex_t r;return regcomp(&r, \"\", 0);}"
- "WITHOUT_PCRE_STATIC;PCRE_STATIC")
- IF(NOT WITHOUT_PCRE_STATIC AND PCRE_STATIC)
- ADD_DEFINITIONS(-DPCRE_STATIC)
- ENDIF(NOT WITHOUT_PCRE_STATIC AND PCRE_STATIC)
- ENDIF(NOT WITHOUT_PCRE_STATIC AND PCRE_STATIC)
- ENDIF(NOT WITHOUT_PCRE_STATIC AND PCRE_STATIC)
- ENDIF(PCREPOSIX_FOUND)
- MARK_AS_ADVANCED(CLEAR PCRE_INCLUDE_DIR)
- MARK_AS_ADVANCED(CLEAR PCREPOSIX_LIBRARIES)
- MARK_AS_ADVANCED(CLEAR PCRE_LIBRARIES)
- MARK_AS_ADVANCED(CLEAR LIBGCC_LIBRARIES)
-ENDIF(NOT FOUND_POSIX_REGEX_LIB AND POSIX_REGEX_LIB MATCHES "^(AUTO|LIBPCREPOSIX)$")
-
-#
# Check functions
#
CMAKE_PUSH_CHECK_STATE() # Save the state of the variables