On 2010-01-06 12:21-0500 Stuart Blood wrote:
> I hope this is the right place to report this finding.
> I don't know how to characterize this bug other than as a problem
> with compile flags generated by CMake.
> [...]I find this definition in
> # compile CXX with C:/Program Files/Microsoft Visual Studio 8/VC/bin/cl.exe
> CXX_FLAGS = /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR /D_DEBUG /MDd
> /Zi /Ob0 /Od /RTC1 -IC:\plplot\include -IC:\plplot\lib\qsastime
> -IC:\plplot\bindings\c++ -IC:\plplot\buildnmake
> -IC:\plplot\buildnmake\bindings\wxwidgets -IC:\wxWidgets\include
> -IC:\wxWidgets\lib\vc_dll\mswu WXUSINGDLL UNICODE _UNICODE
I am not familiar with nmake usage, but if it is like make, you should be
able to say something like "nmake VERBOSE=1 ..." to get all the details
of the build including compile definitions. Alternatively, if VERBOSE=1
does not work, you might want to try the cmake
option, -DCMAKE_VERBOSE_MAKEFILE=ON. Either of those options is easier
than wading through Makefile fragments.
However, that is a side issue, and the above result is obviously wrong. From
greping through our build system files in a hurry without looking at too
many details, it appears _for Windows builds only_ WXUSINGDLL, UNICODE, and
_UNICODE are appended to wxWidgets_DEFINITIONS, etc., in
cmake/modules/FindwxWidgets.cmake, and then used (properly I believe) to set
the directory COMPILE_DEFINITIONS property in
bindings/wxwidgets/CMakeLists.txt. That directory property means the -D
should automatically be prepended to the compiler definitions of
WXUSINGDLL, UNICODE, and _UNICODE, but obviously above that is not
I wonder if you have found a cmake bug. What version of cmake are you using?
If you are not already using cmake-2.8.0, I strongly encourage your to give
that a try instead.
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project