Avoid CMake backward compatibility warning #663

Merged
Youw merged 1 commit from cmake-warning into master 2024-03-05 05:26:02 -06:00
Youw commented 2024-03-05 03:22:57 -06:00 (Migrated from github.com)

Avoid a message:

Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

Fixes: #642

Avoid a message: ``` Compatibility with CMake < 3.5 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions. ``` Fixes: #642
Youw commented 2024-03-05 03:24:11 -06:00 (Migrated from github.com)

I've picked 3.25 becase I'm actively using it on a number of build environments and had no issues with it.
And it is fairly new - should not cause any issues.

I've picked 3.25 becase I'm actively using it on a number of build environments and had no issues with it. And it is fairly new - should not cause any issues.
mcuee commented 2024-03-05 05:08:10 -06:00 (Migrated from github.com)

Yes the issue is gone now with this PR.

$ cmake -B build_mingw64
-- Building for: Ninja
-- The C compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/msys64/mingw64/bin/cc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- hidapi: v0.14.0
-- Configuring done (1.9s)
-- Generating done (0.0s)
-- Build files have been written to: C:/work/libusb/hidapi_pr663/build_mingw64

$ cmake --build build_mingw64/
[4/4] Linking C shared library src\windows\libhidapi.dll

$ cmake --version
cmake version 3.28.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).
Yes the issue is gone now with this PR. ``` $ cmake -B build_mingw64 -- Building for: Ninja -- The C compiler identification is GNU 13.2.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/msys64/mingw64/bin/cc.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- hidapi: v0.14.0 -- Configuring done (1.9s) -- Generating done (0.0s) -- Build files have been written to: C:/work/libusb/hidapi_pr663/build_mingw64 $ cmake --build build_mingw64/ [4/4] Linking C shared library src\windows\libhidapi.dll $ cmake --version cmake version 3.28.3 CMake suite maintained and supported by Kitware (kitware.com/cmake). ```
mcuee commented 2024-03-05 05:09:11 -06:00 (Migrated from github.com)

No regressions with VS2022 either. I think this PR is good to go,

PS C:\work\libusb\hidapi_pr663> cmake -B build_vs2022
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
-- The C compiler identification is MSVC 19.38.33135.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- hidapi: v0.14.0
-- Configuring done (4.7s)
-- Generating done (0.0s)
-- Build files have been written to: C:/work/libusb/hidapi_pr663/build_vs2022
PS C:\work\libusb\hidapi_pr663> cmake --build .\build_vs2022\
MSBuild version 17.8.5+b5265ef37 for .NET Framework

  1>Checking Build System
  Building Custom Rule C:/work/libusb/hidapi_pr663/windows/CMakeLists.txt
  hid.c
  hidapi_descriptor_reconstruct.c
  Generating Code...
     Creating library C:/work/libusb/hidapi_pr663/build_vs2022/src/windows/Debug/hidapi.lib and object C:/work/libusb/h
  idapi_pr663/build_vs2022/src/windows/Debug/hidapi.exp
  hidapi_winapi.vcxproj -> C:\work\libusb\hidapi_pr663\build_vs2022\src\windows\Debug\hidapi.dll
  Building Custom Rule C:/work/libusb/hidapi_pr663/CMakeLists.txt
PS C:\work\libusb\hidapi_pr663> cmake --version
cmake version 3.27.2-msvc1

CMake suite maintained and supported by Kitware (kitware.com/cmake).
No regressions with VS2022 either. I think this PR is good to go, ``` PS C:\work\libusb\hidapi_pr663> cmake -B build_vs2022 -- Building for: Visual Studio 17 2022 -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631. -- The C compiler identification is MSVC 19.38.33135.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- hidapi: v0.14.0 -- Configuring done (4.7s) -- Generating done (0.0s) -- Build files have been written to: C:/work/libusb/hidapi_pr663/build_vs2022 PS C:\work\libusb\hidapi_pr663> cmake --build .\build_vs2022\ MSBuild version 17.8.5+b5265ef37 for .NET Framework 1>Checking Build System Building Custom Rule C:/work/libusb/hidapi_pr663/windows/CMakeLists.txt hid.c hidapi_descriptor_reconstruct.c Generating Code... Creating library C:/work/libusb/hidapi_pr663/build_vs2022/src/windows/Debug/hidapi.lib and object C:/work/libusb/h idapi_pr663/build_vs2022/src/windows/Debug/hidapi.exp hidapi_winapi.vcxproj -> C:\work\libusb\hidapi_pr663\build_vs2022\src\windows\Debug\hidapi.dll Building Custom Rule C:/work/libusb/hidapi_pr663/CMakeLists.txt PS C:\work\libusb\hidapi_pr663> cmake --version cmake version 3.27.2-msvc1 CMake suite maintained and supported by Kitware (kitware.com/cmake). ```
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libusb/hidapi!663
No description provided.