cmake generates install files with unsuppressable warnings when the install component is TEST
My project creates a TEST package for our unit tests (as an embedded system we have to create a package to get on our target platform).
ADD_EXECUTABLE(foo)
...
INSTALL(TARGETS foo COMPONENT TEST)
the cmake_install.cmake for the above will contain the following line:
if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "TEST" OR NOT CMAKE_INSTALL_COMPONENT)
This generates the following cmake warnings
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Quoted keywords like "TEST" will no longer be interpreted as keywords when
the policy is set to NEW. Since the policy is not set the OLD behavior
will be used.
Policy CMP0064 is not set: Support new TEST if() operator. Run "cmake
--help-policy CMP0064" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
TEST will be interpreted as an operator when the policy is set to NEW.
Since the policy is not set the OLD behavior will be used.
The warnings should not be triggered in "make install", the files are generated by cmake and thus the contents are fully controlled by cmake.
Edited by Ben Boeckel