[CMake] resetting /VERSION and /STACK linker options within visual studio

Jon W knowdat at gmail.com
Tue Jun 19 13:07:06 EDT 2007


I'm in the process of porting existing visual studio projects to
cmake.  As such, I want to duplicate the compiler and linker options
of the existing project files.  I'm using 2.4.7 RC10.

The first question is, how do I get rid of the /VERSION:0.0 linker
flag?  This flag seems to be generated by cmake, and I am unable to
find a way to remove this flag.

Next, I am having trouble getting rid of the /STACK:10000000 option.
I have the following structure:

   CMakeLists.txt
   directory1
         CMakeLists.txt
   directory2
         CMakeLists.txt

Within the top level CMakeLists.txt, I reset the CMAKE_EXE_LINKER_FLAGS:
-----------------------------------------------------------------
set (CMAKE_EXE_LINKER_FLAGS "/SUBSYSTEM:CONSOLE /MACHINE:X86" CACHE
STRING "Resetting the default linker options." FORCE)
set (CMAKE_EXE_LINKER_FLAGS_DEBUG "" CACHE STRING "Resetting the
default linker options." FORCE)
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "" CACHE STRING "Resetting the
default linker options." FORCE)
-----------------------------------------------------------------

This works for the directory2 generated project file, but the
directory1 project file still has the /STACK:10000000 option.  The
directory1 project does have the reset linker flags specified above,
but also the /STACK option.  Any idea what is happening?

Thank you,
Jon-


More information about the CMake mailing list