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

Avoid CMake backward compatibility warning #663

Merged
merged 1 commit into from
Mar 5, 2024
Merged

Avoid CMake backward compatibility warning #663

merged 1 commit into from
Mar 5, 2024

Conversation

Youw
Copy link
Member

@Youw Youw commented Mar 5, 2024

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.
```
@Youw
Copy link
Member Author

Youw commented Mar 5, 2024

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 mcuee added the CMake Related to CMake build system label Mar 5, 2024
@mcuee
Copy link
Member

mcuee commented Mar 5, 2024

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
Copy link
Member

mcuee commented Mar 5, 2024

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).

@Youw Youw merged commit 76462bd into master Mar 5, 2024
23 checks passed
@Youw Youw deleted the cmake-warning branch March 5, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake Related to CMake build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Too old CMake version warning
2 participants