[CMake] how set compiler flags used in initial configure try-compile?

Derek Bruening iye at alum.mit.edu
Sat May 29 16:39:10 EDT 2010


Is there any way short of editing the ${CMAKE_ROOT}/Modules/Platform/ cmake
files themselves to set which compiler flags are used during the initial
try-compile during cmake configure time where it tries to determine whether
the C compiler works?

I want to remove the /Zi and /debug flags from CMAKE_C_COMPILER_INIT,
etc. in Windows-cl.cmake in order to build over cygwin ssh with pubkey
authent and VS2005.  I can control the flags in my project just fine and am
perfectly happy to give up pdbs for the scenarios where I build-and-test
over ssh.  I just need to disable pdbs for cmake's try-compile.  I'm
looking for a solution other than using 'at' to launch the build as an
authenticated user, using ssh password authentication, or editing the
Windows-cl.cmake file itself.

- Derek


More information about the CMake mailing list