Ignorar advertencias en módulos externos al usar CMake
estoy usandoCMake GUI
(sin versión) conCMake
3.6.1. Estoy usando un módulo externo conadd_subdirectory
eso me muestra algunas advertencias que no me gustan (debido a la molesta contaminación):
CMake Warning (dev) at D:/Sources/.../external/g3log/latest/Build.cmake:11 (IF):
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 variables like "MSVC" will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
D:/Sources/.../external/g3log/latest/CMakeLists.txt:72 (INCLUDE)
This warning is for project developers. Use -Wno-dev to suppress it.
Quiero ocultar estas advertencias sin tocar los archivos externos.-Wno-dev
estaría bien si solo afectara al módulo externo (g3log
)
Traté de usarcmake_policy
como seguir sin ningún efecto:
cmake_policy(PUSH)
cmake_policy(SET CMP0054 OLD)
add_subdirectory(${g3log_DIR} ${CMAKE_BINARY_DIR}/../g3log)
cmake_policy(POP)