Commit Graph

12 Commits

Author SHA1 Message Date
Stephen Kelly 55d7aa4c44 Add platform variable for flags specific to shared libraries
Store in CMAKE_${lang}_COMPILE_OPTIONS_DLL flags from
CMAKE_SHARED_LIBRARY_${lang}_FLAGS that are truly exclusive to shared
libraries.
2012-06-12 15:38:48 -04:00
Stephen Kelly 31d7a0f2e3 Add platform variables for position independent code flags
Store in new platform variables

  CMAKE_${lang}_COMPILE_OPTIONS_PIC
  CMAKE_${lang}_COMPILE_OPTIONS_PIE

flags for position independent code generation.

In almost all cases, this means duplication of the
CMAKE_SHARED_LIBRARY_${lang}_FLAGS for the _PIC case and using the
assumed pie equivalent for the _PIE case.  Note that the GNU compiler
has supported -fPIE since 3.4 and that there is no -fPIC on GNU for
Windows or Cygwin.

There is a possibility that the _PIE variables are not correct.
However, as there is no backwards compatibility to be concerned about
(as the POSITION_INDEPENDENT_CODE property is not used anywhere yet),
the current state suffices.
2012-06-12 15:37:53 -04:00
Brad King fa7141f5ad Add framework to detect compiler version with its id (#12408)
Teach CMakePlatformId.h to construct an "INFO:compiler_version[]" string
literal from macros COMPILER_VERSION_(MAJOR|MINOR|PATCH|TWEAK) to be
defined in CMake(C|CXX)CompilerId.(c|cpp) for each compiler.  Provide
conversion macros DEC() and HEX() to decode decimal or hex digits from
integer values.  Parse the version out of the compiler id binary along
with the other INFO values already present.

Store the result in variable CMAKE_<LANG>_COMPILER_VERSION in the format
"major[.minor[.patch[.tweak]]]".  Save the value persistently in
CMake(C|CXX)Compiler.cmake in the build tree.  Document the variable for
internal use since we do not set it everywhere yet.

Report the compiler version on the compiler id result line e.g.

  The C compiler identification is GNU 4.5.2

Report CMAKE_(C|CXX)_COMPILER_(ID|VERSION) in SystemInformation test.
2011-12-07 08:59:51 -05:00
Brad King 9daa4a6c3f Remove CMAKE_SHARED_MODULE_RUNTIME_${lang}_FLAG
This platform configuration variable is unused.  Modules are built using
the value of CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG.
2009-12-02 15:17:32 -05:00
Brad King e55bbab88b Teach Xcode generator to set XCODE_VERSION
We set the variable 'XCODE_VERSION' in the CMake language to the Xcode
version string (e.g. "3.1.2").  Platform config files may use it later.
2009-09-23 08:48:39 -04:00
Brad King 07ea19ad1f ENH: Implicit link info for C, CXX, and Fortran
This teaches CMake to detect implicit link information for C, C++, and
Fortran compilers.  We detect the implicit linker search directories and
implicit linker options for UNIX-like environments using verbose output
from compiler front-ends.  We store results in new variables called

  CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES
  CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES

The implicit libraries can contain linker flags as well as library
names.
2009-07-23 10:07:25 -04:00
Brad King 1d0502927c ENH: Adding support to link specifically to an archive or a shared library based on the file name specified. This fixes the problem of having -lfoo linking to libfoo.so even when it came from libfoo.a being specified. 2006-09-15 14:09:10 -04:00
Bill Hoffman 0510292b9e add some more prints 2003-01-17 10:28:07 -05:00
Bill Hoffman e9687d931a fix for create shared library 2002-11-21 08:45:45 -05:00
Bill Hoffman 603af011c1 add print for compiler is gnu 2002-11-18 09:08:23 -05:00
Bill Hoffman 8b689f9a62 clean up test for html output 2002-11-12 14:18:36 -05:00
Bill Hoffman 928b9dee06 new test 2002-11-11 18:07:20 -05:00