diff --git a/Help/manual/cmake-buildsystem.7.rst b/Help/manual/cmake-buildsystem.7.rst index 391ba534a3..d36348522b 100644 --- a/Help/manual/cmake-buildsystem.7.rst +++ b/Help/manual/cmake-buildsystem.7.rst @@ -960,20 +960,20 @@ on the consumer: target_compile_definitions(lib1 INTERFACE $<$,EXECUTABLE>:LIB1_WITH_EXE> $<$,SHARED_LIBRARY>:LIB1_WITH_SHARED_LIB> - $<$:CONSUMER_CMP0041_NEW> + $<$:CONSUMER_CMP0182_NEW> ) add_executable(exe1 exe1.cpp) target_link_libraries(exe1 lib1) - cmake_policy(SET CMP0041 NEW) + cmake_policy(SET CMP0182 NEW) add_library(shared_lib shared_lib.cpp) target_link_libraries(shared_lib lib1) The ``exe1`` executable will be compiled with ``-DLIB1_WITH_EXE``, while the ``shared_lib`` shared library will be compiled with ``-DLIB1_WITH_SHARED_LIB`` -and ``-DCONSUMER_CMP0041_NEW``, because policy :policy:`CMP0041` is +and ``-DCONSUMER_CMP0182_NEW``, because policy :policy:`CMP0182` is ``NEW`` at the point where the ``shared_lib`` target is created. The ``BUILD_INTERFACE`` expression wraps requirements which are only used when