diff options
author | Brad King <brad.king@kitware.com> | 2009-07-30 10:59:37 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-07-30 10:59:37 -0400 |
commit | fcab87c9f802965318bee033c2fa3ff27cfbfec7 (patch) | |
tree | 75000cee15b4ecd1c233c7c7c259fa15bffb6994 /Modules/CMakeCXXCompiler.cmake.in | |
parent | fd633b33cff397b110cc69f82fd522cdf905952a (diff) | |
download | cmake-fcab87c9f802965318bee033c2fa3ff27cfbfec7.tar.gz |
Do not always propagate linker language preference
The commit "Consider link dependencies for link language" taught CMake
to propagate linker language preference from languages compiled into
libraries linked by a target. It turns out this should only be done for
some languages, such as C++, because normally the language of the
program entry point (main) should be used.
We introduce variable CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES to tell
CMake whether a language should propagate its linker preference across
targets. Currently it is true only for C++.
Diffstat (limited to 'Modules/CMakeCXXCompiler.cmake.in')
-rw-r--r-- | Modules/CMakeCXXCompiler.cmake.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in index d87c788fa3..0b5560e40b 100644 --- a/Modules/CMakeCXXCompiler.cmake.in +++ b/Modules/CMakeCXXCompiler.cmake.in @@ -22,6 +22,7 @@ SET(CMAKE_CXX_COMPILER_ID_RUN 1) SET(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;H;o;O;obj;OBJ;def;DEF;rc;RC) SET(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm) SET(CMAKE_CXX_LINKER_PREFERENCE 30) +SET(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) # Save compiler ABI information. SET(CMAKE_CXX_SIZEOF_DATA_PTR "@CMAKE_CXX_SIZEOF_DATA_PTR@") |