Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: bump minimum required to version 3.5.0 #859

Merged
merged 1 commit into from
Jul 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -341,26 +341,26 @@ jobs:
cat build/libxxhash.pc | grep "libdir=/usr/lib"
cat build/libxxhash.pc | grep "includedir=/usr/include"

- name: cmake minimum version v2.8.12 test
- name: cmake minimum version v3.5 test
run: |
mkdir -p cmake_bins
cd cmake_bins
wget https://cmake.org/files/v2.8/cmake-2.8.12.2-Linux-i386.tar.gz
tar xzf cmake-2.8.12.2-Linux-i386.tar.gz
wget https://cmake.org/files/v3.5/cmake-3.5.0-Linux-i386.tar.gz
tar xzf cmake-3.5.0-Linux-i386.tar.gz
cd ../cmake_unofficial
rm -rf build
pwd
ls
mkdir -p build
cd build
../../cmake_bins/cmake-2.8.12.2-Linux-i386/bin/cmake --version
../../cmake_bins/cmake-2.8.12.2-Linux-i386/bin/cmake ..
../../cmake_bins/cmake-2.8.12.2-Linux-i386/bin/cmake --build .
../../cmake_bins/cmake-3.5.0-Linux-i386/bin/cmake --version
../../cmake_bins/cmake-3.5.0-Linux-i386/bin/cmake ..
../../cmake_bins/cmake-3.5.0-Linux-i386/bin/cmake --build .
mkdir -p test_install_dir
DESTDIR=test_install_dir ../../cmake_bins/cmake-2.8.12.2-Linux-i386/bin/cmake --install .
DESTDIR=test_install_dir ../../cmake_bins/cmake-3.5.0-Linux-i386/bin/cmake --install .
rm -rf *
../../cmake_bins/cmake-2.8.12.2-Linux-i386/bin/cmake -DCMAKE_BUILD_TYPE=Debug ..
../../cmake_bins/cmake-2.8.12.2-Linux-i386/bin/cmake --build .
../../cmake_bins/cmake-3.5.0-Linux-i386/bin/cmake -DCMAKE_BUILD_TYPE=Debug ..
../../cmake_bins/cmake-3.5.0-Linux-i386/bin/cmake --build .



Expand Down
24 changes: 5 additions & 19 deletions cmake_unofficial/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# For details, see <https://creativecommons.org/publicdomain/zero/1.0/>.

cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
cmake_minimum_required (VERSION 3.5 FATAL_ERROR)

set(XXHASH_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..")

Expand All @@ -25,14 +25,10 @@ if("${CMAKE_VERSION}" VERSION_LESS "3.13")
else()
cmake_policy (SET CMP0077 NEW)
endif()
if("${CMAKE_VERSION}" VERSION_LESS "3.0")
project(xxHash C)
else()
cmake_policy (SET CMP0048 NEW)
project(xxHash
VERSION ${XXHASH_VERSION_STRING}
LANGUAGES C)
endif()
cmake_policy (SET CMP0048 NEW)
project(xxHash
VERSION ${XXHASH_VERSION_STRING}
LANGUAGES C)

if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Project build type" FORCE)
Expand Down Expand Up @@ -168,19 +164,9 @@ if(NOT XXHASH_BUNDLED_MODE)
${PROJECT_SOURCE_DIR}/xxHashConfig.cmake.in
${xxHash_PROJECT_CONFIG}
INSTALL_DESTINATION ${xxHash_CONFIG_INSTALL_DIR})
if("${CMAKE_VERSION}" VERSION_LESS "3.0")
set(XXHASH_EXPORT_SET xxhash)
if(XXHASH_BUILD_XXHSUM)
set(XXHASH_EXPORT_SET ${XXHASH_EXPORT_SET} xxhsum)
endif()
export(TARGETS ${XXHASH_EXPORT_SET}
FILE ${xxHash_TARGETS_CONFIG}
NAMESPACE ${PROJECT_NAME}::)
else()
export(EXPORT xxHashTargets
FILE ${xxHash_TARGETS_CONFIG}
NAMESPACE ${PROJECT_NAME}::)
endif()

install(FILES ${xxHash_PROJECT_CONFIG} ${xxHash_VERSION_CONFIG}
DESTINATION ${xxHash_CONFIG_INSTALL_DIR})
Expand Down