Zitat von Ashwin Chandra <achan...@panologic.com>:
Hendrik,
Sorry about the whitespace. The example you showed me is for use of the
actual compiler during real build time. However the TRY_COMPILE MACRO is
somehow different and does not use normal CXX_FLAGS. It's almost as if
it has an internal built-in flags. I don't know how to invoke
TRY_COMPILE and have it compile the test program with the proper /Fo
flags. (It always defaults to /o).
These are two different things. With the platform file, you tell cmake
how to work with your compiler. The TRY_COMPILE macro should use this
information.
HS
-----Original Message-----
From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf
Of Hendrik Sattler
Sent: Thursday, July 30, 2009 11:00 PM
To: cmake@cmake.org
Subject: Re: [CMake] TRY_COMPILE help...Does anyone know?
Zitat von Ashwin Chandra <achan...@panologic.com>:
I am using a custom compiler and during the initialization of CMake,
the
CMakeTestCCompiler.cmake is invoked which tries to compile a simple
program. However the compile fails it is because of the flags passed
to
the compiler.
For example, the command line that is generated by CMake is:
"C:\PROGRA~1\COMMON~1\COMPUW~1\NMShared\NMcl.exe $(C_DEFINES)
$(C_FLAGS) -o CMakeFiles\cmTryCompileExec.dir\testCCompiler.c.obj -c
C:\trunk\Debug\wxp_x86\CMakeFiles\CMakeTmp\testCCompiler.c"
The "-o" should be a "-Fo", otherwise the object file generated is not
of the form "testCCompiler.c.obj".
Is there anyway to tell CMake to use "-Fo" instead of "-o"? Or perhaps
disable the Test?
Thanks!
Putting less empty lines in mails may also help.
Did you try look at the file in Modules/Platform like
http://public.kitware.com/cgi-bin/viewcvs.cgi/Modules/Platform/cl.cmake?
revision=1.6&root=CMake&view=markup
It also uses /Fo and thus obviously sets this.
Each other compiler also fits as example.
HS
_______________________________________________
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
_______________________________________________
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