[cmake-developers] CMake removes /DEF: option in CMAKE_SHARED_LINKER_FLAGS

Brad King brad.king at kitware.com
Fri Nov 8 08:52:38 EST 2019


On 11/8/19 5:17 AM, Alexander wrote:
> /DEF:"E:/workspace/cmake_test_option/tesseract/bin/libtesseract.dir/Release/exports.def"
> is added by CMake automatically and I cannot control it (CMake first creates a file
> objects.txt and then exports.def from it).

That behavior is not default, but activated by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS:

  https://cmake.org/cmake/help/v3.16/variable/CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS.html

The project you're building must be using that setting.  Find it and turn it off.

-Brad


More information about the cmake-developers mailing list