Project

General

Profile

Actions

Bug #5803

closed

cmake warning Policy CMP0022 is not set

Added by Bruce Toll over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
07/11/2017
Due date:
% Done:

0%

Estimated time:

Description

Wtih wt-3.3.8, github version 3.3.8-rc1-8-gb56bc1de, I'm getting a cmake warning that "Policy CMP0022 is not set" with -DCMAKE_BUILD_TYPE=Debug. I don't think it occurs with RelWithDebInfo build or with wt4 Debug build, but I could be mistaken. I believe this started with commit 05a6858d. This is with Debian stretch and cmake version 3.7.2. Full cmake output with home dir path redacted is attached.


Files

cmake_20170711b_clean.out (24.5 KB) cmake_20170711b_clean.out Bruce Toll, 07/11/2017 05:53 PM
Actions #1

Updated by Roel Standaert over 6 years ago

I've been seeing this warning sometimes, too. We don't actually define INTERFACE_LINK_LIBRARIES or LINK_INTERFACE_LIBRARIES_DEBUG, but instead use TARGET_LINK_LIBRARIES with PRIVATE and PUBLIC, so I'm guessing that this is due to something in CMake internally? If you look at either property, you'll notice that they're actually the same, apart from the check whether we're making a debug build or not.

Of course, we could just set CMP0022 to NEW, but I think that if CMake was working properly, we shouldn't have to?

Actions #2

Updated by Bruce Toll over 6 years ago

I agree with you. If you evaluate the conditions, the library lists match. It wasn't clear to me whether cmake was capable of evaluating the conditions in that context or just chose to format the warning message with the conditions present. From stackoverflow, it looks like other projects have encountered the issue and I feel the cmake documentation could be clearer in this area.

But, if the build is correct with CMP0022 set to NEW, it might be expedient to set it and avoid the warning since this is intended to be the default cmake behavior in the future. But, I'm not sure how that would impact older versions of cmake that are still supported by Wt.

Actions #3

Updated by Roel Standaert over 6 years ago

  • Status changed from New to Implemented @Emweb

I guess it can't hurt to set the property to NEW if it exists.

Actions #4

Updated by Bruce Toll over 6 years ago

Thanks!

Actions #5

Updated by Roel Standaert over 6 years ago

  • Status changed from Implemented @Emweb to Resolved
Actions #6

Updated by Roel Standaert over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF