[Cmake-commits] [cmake-commits] king committed cmMakefileExecutableTargetGenerator.cxx 1.65 1.66

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Oct 8 11:56:39 EDT 2009


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv19323/Source

Modified Files:
	cmMakefileExecutableTargetGenerator.cxx 
Log Message:
Do not use -fPIC to link executables

The commit "add support for borland run time flag for shared builds"
started using the value of CMAKE_SHARED_LIBRARY_CXX_FLAGS to link
executables because Borland requires some flags both at compile and link
time.  This change ended up propagating all the way to the current
Makefile generators and the behavior applies on all platforms.

In general it is incorrect to use these flags to link executables.  The
commit "Split Borland compiler information files" re-wrote Borland
support to work without this behavior, so we remove it in this commit.

Patch from Ben Hutchings.  See issue #9659.


Index: cmMakefileExecutableTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileExecutableTargetGenerator.cxx,v
retrieving revision 1.65
retrieving revision 1.66
diff -C 2 -d -r1.65 -r1.66
*** cmMakefileExecutableTargetGenerator.cxx	2 Oct 2009 17:51:49 -0000	1.65
--- cmMakefileExecutableTargetGenerator.cxx	8 Oct 2009 15:56:30 -0000	1.66
***************
*** 200,208 ****
    std::string linkFlags;
  
-   // Add flags to deal with shared libraries.  Any library being
-   // linked in might be shared, so always use shared flags for an
-   // executable.
-   this->LocalGenerator->AddSharedFlags(linkFlags, linkLanguage, true);
- 
    // Add flags to create an executable.
    this->LocalGenerator->
--- 200,203 ----



More information about the Cmake-commits mailing list