[CMake] MSVC compiler flags not visible

michael.martin at de.thalesgroup.com michael.martin at de.thalesgroup.com
Wed Jan 27 12:04:39 EST 2010


Hi,

my name is Michael, i have just begun using CMake as a build system for 
our new project.
I have set up everything, compilation succeeded under OpenSuSE11.1 with 
gcc 4.3.1
and so i wanted to compile also with MSVC9.0 under WindowsXP 32bit but had 
no luck.
We use OmniORB and somehow the cl.exe compiler does not seem
to see the defines i had set with add_definitions(...). I can not confirm 
that, since i do not see
any compiler flags, although i call nmake with VERBOSE=1. So my question 
is how do i manage
to see the complete call to cl.exe.
Here is what i see now:

C:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe 
@C:\DOKUME~1\michmart\LOKALE~1\Temp\nm429.tmp CORBAutil.cpp
( the file referenced after the @ does not exist)

In the corresponding CMake generated build.make there is

C:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe  @<<
 /nologo $(CXX_FLAGS) $(CXX_DEFINES) /TP 
/FoCMakeFiles\EvalCorba.dir\CORBAutil.cpp.obj 
/FdD:\SoftwareProjects\eclipseworkspace\EvalDataService\build\release\x86-msvc-win32\lib\static\EvalCorba.pdb 
-c 
D:\SoftwareProjects\eclipseworkspace\EvalDataService\src\corba\CORBAutil.cpp

and CXX_FLAGS and CXX_DEFINES (that's where my OmniORB defines are) are 
set correctly in flags.make
(except that the defines in CXX_DEFINES start with a - instead of a /)
I use CMake from eclipse set up as a make target.

cheers

  Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100127/c773b467/attachment.htm>


More information about the CMake mailing list