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

CMP0135 requires higher version of CMake #1283

Closed
1 task done
hubenchang0515 opened this issue May 10, 2023 · 1 comment
Closed
1 task done

CMP0135 requires higher version of CMake #1283

hubenchang0515 opened this issue May 10, 2023 · 1 comment

Comments

@hubenchang0515
Copy link

Report

Issues and Steps to Reproduce

CMP0135 requires CMake version 3.24, see https://cmake.org/cmake/help/latest/policy/CMP0135.html
But in the tests/CMakelists.txt file is cmake_minimum_required(VERSION 3.13)

$ mkdir build
$ cd build
$ cmake ..
CMake Error at tests/CMakeLists.txt:18 (cmake_policy):
  Policy "CMP0135" is not known to this version of CMake.

Expected Behavior

Describe what you expected would happen.

Actual Behavior

Describe what actually happened.

Link to Code

https://github.com/facebook/yoga/blob/main/tests/CMakeLists.txt#L7

https://github.com/facebook/yoga/blob/main/tests/CMakeLists.txt#L18

NickGerleman added a commit to NickGerleman/yoga that referenced this issue May 10, 2023
Summary:
Fixes facebook#1283

New versions of CMake add "policies" which control how the build system acts wrt breaking changes. By default, CMake will emulate the behavior of the version specified in `cmake_minimum_required`.

Setting a policy to true (to opt into new behavior where `cmake_minimum_required` is lower than the current version) seems actually just error out on the old versions.

Googling around, apparently the way I should be doing this is to specify `<policy_max>` as part of `cmake_minimum_required `. https://gitlab.kitware.com/cmake/cmake/-/issues/20392

This should I think use new policies introduced up to 3.26 (what we test on right now), while letting 3.13 be the minimum.

Differential Revision: D45724864

fbshipit-source-id: cf32e3cd7dc9ab3dcb5e6d62a5cd451355d38bdf
NickGerleman added a commit to NickGerleman/react-native that referenced this issue May 10, 2023
Summary:
X-link: facebook/yoga#1288

Fixes facebook/yoga#1283

New versions of CMake add "policies" which control how the build system acts wrt breaking changes. By default, CMake will emulate the behavior of the version specified in `cmake_minimum_required`.

Setting a policy to true (to opt into new behavior where `cmake_minimum_required` is lower than the current version) seems actually just error out on the old versions.

Googling around, apparently the way I should be doing this is to specify `<policy_max>` as part of `cmake_minimum_required `. https://gitlab.kitware.com/cmake/cmake/-/issues/20392

This should I think use new policies introduced up to 3.26 (what we test on right now), while letting 3.13 be the minimum.

Differential Revision: D45724864

fbshipit-source-id: 6a5ac596fd5862f53aa7256411f11bed3596f7da
@NickGerleman
Copy link
Contributor

Could you try patching in the PR for this? I think it should work.

NickGerleman added a commit to NickGerleman/yoga that referenced this issue May 15, 2023
Summary:
X-link: facebook/react-native#37349

Pull Request resolved: facebook#1288

Fixes facebook#1283

New versions of CMake add "policies" which control how the build system acts wrt breaking changes. By default, CMake will emulate the behavior of the version specified in `cmake_minimum_required`.

Setting a policy to true (to opt into new behavior where `cmake_minimum_required` is lower than the current version) seems actually just error out on the old versions.

Googling around, apparently the way I should be doing this is to specify `<policy_max>` as part of `cmake_minimum_required `. https://gitlab.kitware.com/cmake/cmake/-/issues/20392

This should I think use new policies introduced up to 3.26 (what we test on right now), while letting 3.13 be the minimum.

Reviewed By: cortinico

Differential Revision: D45724864

fbshipit-source-id: 21c4c6962b0882c5f90746cf343c718e287cc444
NickGerleman added a commit to NickGerleman/react-native that referenced this issue May 15, 2023
Summary:
Pull Request resolved: facebook#37349

X-link: facebook/yoga#1288

Fixes facebook/yoga#1283

New versions of CMake add "policies" which control how the build system acts wrt breaking changes. By default, CMake will emulate the behavior of the version specified in `cmake_minimum_required`.

Setting a policy to true (to opt into new behavior where `cmake_minimum_required` is lower than the current version) seems actually just error out on the old versions.

Googling around, apparently the way I should be doing this is to specify `<policy_max>` as part of `cmake_minimum_required `. https://gitlab.kitware.com/cmake/cmake/-/issues/20392

This should I think use new policies introduced up to 3.26 (what we test on right now), while letting 3.13 be the minimum.

Reviewed By: cortinico

Differential Revision: D45724864

fbshipit-source-id: 34385ddf8506b033b353292a1fbeb77a7117f128
NickGerleman added a commit to NickGerleman/react-native that referenced this issue May 15, 2023
Summary:
Pull Request resolved: facebook#37349

X-link: facebook/yoga#1288

Fixes facebook/yoga#1283

New versions of CMake add "policies" which control how the build system acts wrt breaking changes. By default, CMake will emulate the behavior of the version specified in `cmake_minimum_required`.

Setting a policy to true (to opt into new behavior where `cmake_minimum_required` is lower than the current version) seems actually just error out on the old versions.

Googling around, apparently the way I should be doing this is to specify `<policy_max>` as part of `cmake_minimum_required `. https://gitlab.kitware.com/cmake/cmake/-/issues/20392

This should I think use new policies introduced up to 3.26 (what we test on right now), while letting 3.13 be the minimum.

Reviewed By: cortinico

Differential Revision: D45724864

fbshipit-source-id: 46bc309a128470d1fa5d9c69329bba1bbd3cf51a
NickGerleman added a commit to NickGerleman/yoga that referenced this issue May 15, 2023
Summary:
X-link: facebook/react-native#37349

Pull Request resolved: facebook#1288

Fixes facebook#1283

New versions of CMake add "policies" which control how the build system acts wrt breaking changes. By default, CMake will emulate the behavior of the version specified in `cmake_minimum_required`.

Setting a policy to true (to opt into new behavior where `cmake_minimum_required` is lower than the current version) seems actually just error out on the old versions.

Googling around, apparently the way I should be doing this is to specify `<policy_max>` as part of `cmake_minimum_required `. https://gitlab.kitware.com/cmake/cmake/-/issues/20392

This should I think use new policies introduced up to 3.26 (what we test on right now), while letting 3.13 be the minimum.

Reviewed By: cortinico

Differential Revision: D45724864

fbshipit-source-id: 95588cd8a4e3ca426e723f0aaa1d0114b18ac4c3
facebook-github-bot pushed a commit that referenced this issue May 15, 2023
Summary:
X-link: facebook/react-native#37349

Pull Request resolved: #1288

Fixes #1283

New versions of CMake add "policies" which control how the build system acts wrt breaking changes. By default, CMake will emulate the behavior of the version specified in `cmake_minimum_required`.

Setting a policy to true (to opt into new behavior where `cmake_minimum_required` is lower than the current version) seems actually just error out on the old versions.

Googling around, apparently the way I should be doing this is to specify `<policy_max>` as part of `cmake_minimum_required `. https://gitlab.kitware.com/cmake/cmake/-/issues/20392

This should I think use new policies introduced up to 3.26 (what we test on right now), while letting 3.13 be the minimum.

Reviewed By: cortinico

Differential Revision: D45724864

fbshipit-source-id: 120cc2015a043605e7c07ef0459667643a4284b7
facebook-github-bot pushed a commit to facebook/react-native that referenced this issue May 15, 2023
Summary:
Pull Request resolved: #37349

X-link: facebook/yoga#1288

Fixes facebook/yoga#1283

New versions of CMake add "policies" which control how the build system acts wrt breaking changes. By default, CMake will emulate the behavior of the version specified in `cmake_minimum_required`.

Setting a policy to true (to opt into new behavior where `cmake_minimum_required` is lower than the current version) seems actually just error out on the old versions.

Googling around, apparently the way I should be doing this is to specify `<policy_max>` as part of `cmake_minimum_required `. https://gitlab.kitware.com/cmake/cmake/-/issues/20392

This should I think use new policies introduced up to 3.26 (what we test on right now), while letting 3.13 be the minimum.

Reviewed By: cortinico

Differential Revision: D45724864

fbshipit-source-id: 120cc2015a043605e7c07ef0459667643a4284b7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants