CMake/Modules/Compiler
Modestas Vainius e1409ac59b Support building shared libraries or modules without soname (#13155)
Add a boolean target property NO_SONAME which may be used to disable
soname for the specified shared library or module even if the platform
supports it.  This property should be useful for private shared
libraries or various plugins which live in private directories and have
not been designed to be found or loaded globally.

Replace references to <CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG> and
hard-coded -install_name flags with a conditional <SONAME_FLAG> which is
expanded to the value of the CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG
definition as long as soname supports is enabled for the target in
question.  Keep expanding CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG in
rules in case third party projects still use it.  Such projects would
not yet use NO_SONAME so the adjacent <TARGET_SONAME> will always be
expanded.  Make <TARGET_INSTALLNAME_DIR> NO_SONAME aware as well.  Since
-install_name is soname on OS X, this should not be a problem if this
variable is expanded only if soname is enabled.

The Ninja generator performs rule variable substitution only once
globally per rule to put its own placeholders.  Final substitution is
performed by ninja at build time.  Therefore we cannot conditionally
replace the soname placeholders on a per-target basis.  Rather than
omitting $SONAME from rules.ninja, simply do not write its contents for
targets which have NO_SONAME.  Since 3 variables are affected by
NO_SONAME ($SONAME, $SONAME_FLAG, $INSTALLNAME_DIR), set them only if
soname is enabled.
2012-04-30 11:50:27 -04:00
..
Absoft-Fortran.cmake Fortran: Add support for free- and fixed-form flags 2011-08-31 10:24:43 -04:00
Clang-C.cmake Recognize Clang C and C++ compilers (see #10693) 2010-05-17 14:11:20 -04:00
Clang-CXX.cmake Recognize Clang C and C++ compilers (see #10693) 2010-05-17 14:11:20 -04:00
Cray-C.cmake Teach CMake about Cray C, C++, and Fortran compilers 2010-11-12 09:12:08 -05:00
Cray-CXX.cmake Teach CMake about Cray C, C++, and Fortran compilers 2010-11-12 09:12:08 -05:00
Cray-Fortran.cmake Fortran: Add support for free- and fixed-form flags 2011-08-31 10:24:43 -04:00
G95-Fortran.cmake Fortran: Add support for free- and fixed-form flags 2011-08-31 10:24:43 -04:00
GNU-ASM.cmake Change the default rules so they fit better to the new ASM handling 2011-02-23 21:21:41 +01:00
GNU-C.cmake Split GNU compiler information files 2009-12-02 09:52:00 -05:00
GNU-CXX.cmake Split GNU compiler information files 2009-12-02 09:52:00 -05:00
GNU-Fortran.cmake Fortran: Add support for free- and fixed-form flags 2011-08-31 10:24:43 -04:00
GNU.cmake Ninja: Substitute <OBJECT> and <CMAKE_C_COMPILER> in depfile flags 2012-03-26 04:46:12 +01:00
HP-ASM.cmake Set the HP asm file suffix 2011-02-23 21:18:55 +01:00
HP-C.cmake Add assemble- and preprocess commands for HP 2011-02-23 21:30:21 +01:00
HP-CXX.cmake Add assemble- and preprocess commands for HP 2011-02-23 21:30:21 +01:00
HP-Fortran.cmake Fortran: Add support for free- and fixed-form flags 2011-08-31 10:24:43 -04:00
Intel-ASM.cmake Add support for the Intel compiler used for ASM under Windows 2011-03-02 16:46:25 +01:00
Intel-C.cmake The preprocessing and assembly rules also need the <DEFINES>, otherwise different reults are created. 2009-09-19 04:33:10 -04:00
Intel-CXX.cmake The preprocessing and assembly rules also need the <DEFINES>, otherwise different reults are created. 2009-09-19 04:33:10 -04:00
Intel-Fortran.cmake Fortran: Add support for free- and fixed-form flags 2011-08-31 10:24:43 -04:00
MIPSpro-C.cmake
MIPSpro-CXX.cmake
MIPSpro-Fortran.cmake Fortran: Add support for free- and fixed-form flags 2011-08-31 10:24:43 -04:00
NAG-Fortran.cmake Fortran: Add support for free- and fixed-form flags 2011-08-31 10:24:43 -04:00
PGI-C.cmake Generalize support for Portland Group Compiler 2009-12-04 10:21:57 -05:00
PGI-CXX.cmake Generalize support for Portland Group Compiler 2009-12-04 10:21:57 -05:00
PGI-Fortran.cmake Fortran: Add support for free- and fixed-form flags 2011-08-31 10:24:43 -04:00
PGI.cmake Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
PathScale-C.cmake PathScale C/C++/Fortran Compiler Information 2010-01-13 12:14:31 -05:00
PathScale-CXX.cmake PathScale C/C++/Fortran Compiler Information 2010-01-13 12:14:31 -05:00
PathScale-Fortran.cmake Fortran: Add support for free- and fixed-form flags 2011-08-31 10:24:43 -04:00
PathScale.cmake Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
SCO-C.cmake Factor SCO compiler info out of platform file (#11700) 2011-01-17 09:57:17 -05:00
SCO-CXX.cmake Factor SCO compiler info out of platform file (#11700) 2011-01-17 09:57:17 -05:00
SCO.cmake Factor SCO compiler info out of platform file (#11700) 2011-01-17 09:57:17 -05:00
SunPro-ASM.cmake Change the default rules so they fit better to the new ASM handling 2011-02-23 21:21:41 +01:00
SunPro-C.cmake Make VERBOSE_FLAG appear as first statement for consistency 2010-04-17 07:49:21 +02:00
SunPro-CXX.cmake Make VERBOSE_FLAG appear as first statement for consistency 2010-04-17 07:49:21 +02:00
SunPro-Fortran.cmake Fortran: Add support for free- and fixed-form flags 2011-08-31 10:24:43 -04:00
TinyCC-C.cmake TinyCC: Add default compilation flags (#12605) 2011-12-05 08:59:50 -05:00
VisualAge-C.cmake Teach compiler id about VisualAge -> XL rebranding 2009-08-07 10:13:07 -04:00
VisualAge-CXX.cmake Teach compiler id about VisualAge -> XL rebranding 2009-08-07 10:13:07 -04:00
VisualAge-Fortran.cmake Teach compiler id about VisualAge -> XL rebranding 2009-08-07 10:13:07 -04:00
XL-ASM.cmake Fix the default CMAKE_ASM_COMPILE_OBJECT, make XL-ASM use it 2011-02-23 21:29:05 +01:00
XL-C.cmake XL: Consolidate compiler flag information 2011-04-07 17:09:05 -04:00
XL-CXX.cmake XL: Consolidate compiler flag information 2011-04-07 17:09:05 -04:00
XL-Fortran.cmake Fortran: Add support for free- and fixed-form flags 2011-08-31 10:24:43 -04:00
XL.cmake Support building shared libraries or modules without soname (#13155) 2012-04-30 11:50:27 -04:00