[CMake] WIN32_LEAN_AND_MEAN
Jon Goldman
goldman at stellarscience.com
Tue Feb 8 17:22:53 EST 2011
Hi,
I am CMaking on Windows 7 with CMake 2.8.3. Our project is incorporating
ParaView and its cmake system. The problem I am having is that
WIN32_LEAN_AND_MEAN is getting defined, which is causing linker errors
in H5Detect and other project(s).
After I run CMake and load my project in Visual Studio the Preprocessor
flags have these values:
WIN32;_WINDOWS;TEST;_USE_MATH_DEFINES;NOMINMAX;WIN32_LEAN_AND_MEAN;_WIN32_WINNT=0x0502;WINVER=0x0502;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;_DEBUG;VTK_PYTHON_BUILD;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;VTK_IN_VTK;BIND_TO_CURRENT_VCLIBS_VERSION=1;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"Debug\"
Right after H5detect is added, in
paraview\VTK\Utilities\vtkhdf5\CMakeLists.txt, I print out GLOBAL,
TARGET, SOURCE, and DIRECTORY COMPILE_DEFINITIONS and I see these values:
add_executable H5detect
GLOBAL COMPILE_DEFINITIONS =
DIRECTORY
C:/Stellar/Controlled/CreateRF-repos/master/CreateRF/3rdparty/paraview/VTK/Utilities/vtkhdf5/src
COMPILE_DEFINITIONS =
VTK_PYTHON_BUILD;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;VTK_IN_VTK;BIND_TO_CURRENT_VCLIBS_VERSION=1;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CRT_SECURE_NO_WARNINGS
SOURCE
C:/Stellar/Controlled/CreateRF-repos/master/CreateRF/3rdparty/paraview/VTK/Utilities/vtkhdf5/src/H5detect.c
COMPILE_DEFINITIONS =
TARGET H5detect COMPILE_DEFINITIONS =
I don't see WIN32_LEAN_AND_MEAN, as well as some of the other values,
e.g. NOMINMAX, are missing.
Is there another place in the Cmake system or Visual Studio that is
setting WIN32_LEAN_AND_MEAN?
I also tried doing a remove_definitions( -DWIN32_LEAN_AND_MEAN ) before
and after adding H5detect, but that didn't seem to have any affect.
Thanks in advance if somebody can shed light on this issue.
Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110208/230e07f0/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5882 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110208/230e07f0/attachment-0001.bin>
More information about the CMake
mailing list