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

CMP0037 OLD cmake deprecation warning #3587

Closed
Totktonada opened this issue Jul 31, 2018 · 1 comment
Closed

CMP0037 OLD cmake deprecation warning #3587

Totktonada opened this issue Jul 31, 2018 · 1 comment
Assignees
Labels
bug Something isn't working good first issue Good for newcomers refactoring Code refactoring
Milestone

Comments

@Totktonada
Copy link
Member

Totktonada commented Jul 31, 2018

CMake Deprecation Warning at test/CMakeLists.txt:21 (cmake_policy):
  The OLD behavior for policy CMP0037 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.

cmake version 3.11.3

Related: #742.

Can be fixed like so I guess: https://git.reviewboard.kde.org/r/123745/diff/1#index_header

Update: The link above was died. I guess the linked patch is https://phabricator.kde.org/R283:38b0eeec41de0e916dd834b849f7ddcfa06bdafc

@kyukhin kyukhin added the refactoring Code refactoring label Aug 7, 2018
@kyukhin kyukhin added this to the 1.10.3 milestone Aug 7, 2018
@kyukhin kyukhin added the good first issue Good for newcomers label Aug 7, 2018
@kyukhin kyukhin modified the milestones: 1.10.3, 2.1.1 Oct 25, 2018
@kyukhin kyukhin added the bug Something isn't working label Nov 26, 2018
@kyukhin kyukhin modified the milestones: 2.1.1, 2.2.0 Nov 26, 2018
@kyukhin kyukhin modified the milestones: 2.2.0, 2.3.0 Apr 1, 2019
@kostja kostja modified the milestones: 2.3.1, 2.4.0 Aug 6, 2019
@OKriw
Copy link
Contributor

OKriw commented Mar 16, 2020

We have got cmake_policy(SET CMP0037 OLD).
Accordingly to https://cmake.org/cmake/help/v3.0/policy/CMP0037.html
starting from 2.8.12 + we need to follow some name politics when using add_library(), add_executable() and add_custom_target().
I guess we need to check name we are using inside add_* functions and remove setting old policy.

@kyukhin kyukhin modified the milestones: 2.4.1, 2.4.2 Apr 10, 2020
OKriw pushed a commit that referenced this issue May 6, 2020
Remove setting old CMP0037 policy explicitly, it may be
removed in later versions of cmake.

Closes #3587
OKriw pushed a commit that referenced this issue May 21, 2020
To stop deprecation warning CMP0037 policy was changed to NEW.
Deprecation warnings tells us that OLD behaviour will be dropped in the
next versions.

CMP0037 old behavior (cmake 2.8.12) allowed taget names such as test,
however in versions 3.10 and below names test, help and etc. were complitely
anavailable because cmake always reserved them.
Starting from cmake 3.11 this names only reserved when the corresponding
feature is enabled (e.g. by including the CTest or CPack modules).
Tarantool does not use CTest so the name test can be used.
Users have to use cmake 3.11 and above.

Closes: #3587
OKriw pushed a commit that referenced this issue May 25, 2020
To fix deprecation warning, CMP0037 policy was changed to NEW for cmake
3.11 and above.

CMP0037 old behavior (cmake 2.8.12) allowed target names such as test.
In cmake 3.10 and below names test, help and etc. were reserved.

Starting from cmake 3.11 these names are only reserved when the corresponding
feature is enabled (e.g. by including the CTest or CPack modules).
Tarantool does not use CTest so the name test can be used.

Closes: #3587
OKriw pushed a commit that referenced this issue May 27, 2020
To fix deprecation warning, CMP0037 policy was changed to NEW for cmake
3.11 and above.

CMP0037 old behavior (cmake 2.8.12) allowed target names such as test.
In cmake 3.10 and below names test, help and etc. were reserved.

Starting from cmake 3.11 these names are only reserved when the corresponding
feature is enabled (e.g. by including the CTest or CPack modules).
Tarantool does not use CTest so the name test can be used.

Closes #3587
Totktonada pushed a commit that referenced this issue Jun 14, 2020
To fix deprecation warning, CMP0037 policy was changed to NEW for cmake
3.11 and above.

CMP0037 old behavior (cmake 2.8.12) allowed target names such as test.
In cmake 3.10 and below names test, help and etc. were reserved.

Starting from cmake 3.11 these names are only reserved when the
corresponding feature is enabled (e.g. by including the CTest or CPack
modules). Tarantool does not use CTest so the name test can be used.

Closes #3587

(cherry picked from commit a753f25)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers refactoring Code refactoring
Projects
None yet
Development

No branches or pull requests

4 participants