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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to