# I need help to change SWIG\_ADD\_MODULE at SWIG\_ADD\_LIBRARY in the CMakeLists.txt

**URL:** <https://discourse.cmake.org/t/i-need-help-to-change-swig-add-module-at-swig-add-library-in-the-cmakelists-txt/3910>\
**Category:** Usage\
**Tags:** os:windows\
**Created:** [August 11, 2021, 6:28pm UTC](https://discourse.cmake.org/t/i-need-help-to-change-swig-add-module-at-swig-add-library-in-the-cmakelists-txt/3910 "2021-08-11T18:28:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![amina](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/0ea827/32.png) [@amina](https://discourse.cmake.org/u/amina)\
**Post date:** [August 11, 2021, 6:28pm UTC](https://discourse.cmake.org/t/i-need-help-to-change-swig-add-module-at-swig-add-library-in-the-cmakelists-txt/3910/1 "2021-08-11T18:28:08Z")

</div>

Hi;

It gives me a message change SWIG\_ADD\_MODULE at SWIG\_ADD\_LIBRARY in the CMakeLists.txt The error is as follows :

CMake Deprecation Warning at C:/Program Files/CMake/share/cmake-3.21/Modules/UseSWIG.cmake:724 (message):  
SWIG\_ADD\_MODULE is deprecated. Use SWIG\_ADD\_LIBRARY instead.  
Call Stack (most recent call first):  
CMakeLists.txt:88 (SWIG\_ADD\_MODULE)

CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.21/Modules/UseSWIG.cmake:765 (message):  
Policy CMP0078 is not set: UseSWIG generates standard target names. Run  
“cmake --help-policy CMP0078” for policy details. Use the cmake\_policy  
command to set the policy and suppress this warning.

Call Stack (most recent call first):  
C:/Program Files/CMake/share/cmake-3.21/Modules/UseSWIG.cmake:725 (swig\_add\_library)  
CMakeLists.txt:88 (SWIG\_ADD\_MODULE)  
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.21/Modules/UseSWIG.cmake:607 (message):  
Policy CMP0086 is not set: UseSWIG honors SWIG\_MODULE\_NAME via -module  
flag. Run “cmake --help-policy CMP0086” for policy details. Use the  
cmake\_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):  
C:/Program Files/CMake/share/cmake-3.21/Modules/UseSWIG.cmake:877 (SWIG\_ADD\_SOURCE\_TO\_MODULE)  
C:/Program Files/CMake/share/cmake-3.21/Modules/UseSWIG.cmake:725 (swig\_add\_library)  
CMakeLists.txt:88 (SWIG\_ADD\_MODULE)  
This warning is for project developers. Use -Wno-dev to suppress it.
