-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
I just built DASH using CMake 3.9 and saw a bunch warnings due to enforced OLD policies:
CMake Deprecation Warning at CMakeLists.txt:12 (cmake_policy):
The OLD behavior for policy CMP0007 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 Deprecation Warning at CMakeLists.txt:15 (cmake_policy):
The OLD behavior for policy CMP0003 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 Deprecation Warning at CMakeLists.txt:21 (cmake_policy):
The OLD behavior for policy CMP0004 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 Deprecation Warning at CMakeLists.txt:24 (cmake_policy):
The OLD behavior for policy CMP0016 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.
CMP0007:OLDsuppresses counting empty list elements (see https://cmake.org/cmake/help/v3.6/policy/CMP0007.html)CMP0003:OLDsplits absolute paths passed totarget_link_librariesinto-Land-lparts instead of passing the absolute path (see http://docs.w3cub.com/cmake~3.9/policy/cmp0003/)CMP0004:OLDsilently removes whitespaces intarget_link_libraries(myexe " A "),NEWcauses white spaces to be erroneous (see http://docs.w3cub.com/cmake~3.9/policy/cmp0004/)CMP0016:NEWcauses an error if the first argument totarget_link_libraries()is not a target (see http://docs.w3cub.com/cmake~3.9/policy/cmp0016/)
Now, unsurprisingly none of these choices are documented and hence I have no idea whether they are still required. I suggest we remove these policy settings and fix our CMake files to comply with the new behavior.
We also set policies CMP0054 (expansion in if()), CMP0053 (variable references), CMP0060 (implicit link directories), and CMP0058 (byproducts for ninja builds) which do not currently trigger a warning. It might be worth looking at them as well (except for CMP0058 I guess).