diff options
author | Brad King <brad.king@kitware.com> | 2015-11-23 15:13:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-11-23 15:16:32 (GMT) |
commit | 9682de566e264c53018cccd05465f2c5d91ccf73 (patch) | |
tree | 87e738356006380581ba74a68544a443fa901756 /Modules/CMakeDetermineCompilerId.cmake | |
parent | 8b4873a1b025d7f47c90f3cafc93ca152b9e4652 (diff) | |
download | CMake-9682de566e264c53018cccd05465f2c5d91ccf73.zip CMake-9682de566e264c53018cccd05465f2c5d91ccf73.tar.gz CMake-9682de566e264c53018cccd05465f2c5d91ccf73.tar.bz2 |
Revert "Disable shared library support when compiler links statically" (#15855)
In commit v3.4.0-rc1~18^2 (Disable shared library support when compiler
links statically, 2015-09-30) we tried to detect when the compiler is
not capable of linking shared libraries (possibly due to flags in use).
However, the approach is not robust against flags like `-nostdlib`.
Revert it for now pending another solution to the original problem.
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 591ecb8..df6daf3 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -106,7 +106,6 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src) set(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "${CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX}" PARENT_SCOPE) - set(CMAKE_${lang}_COMPILER_LINKS_STATICALLY "${CMAKE_${lang}_COMPILER_LINKS_STATICALLY}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE) @@ -530,13 +529,6 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) endif() endif() - if(UNIX) - execute_process(COMMAND file "${file}" OUTPUT_VARIABLE out ERROR_VARIABLE out) - if(out MATCHES "statically linked") - set(CMAKE_${lang}_COMPILER_LINKS_STATICALLY 1 PARENT_SCOPE) - endif() - endif() - # Check if a valid compiler and platform were found. if(COMPILER_ID AND NOT COMPILER_ID_TWICE) set(CMAKE_${lang}_COMPILER_ID "${COMPILER_ID}") |