mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
The chosen STL libraries are already linked explicitly so we shouldn't let the compiler add its implicit `-lstdc++` (the default) when invoking the linker. Fixes: #17863 NDK-Issue: https://github.com/android-ndk/ndk/issues/105 Inspired-by: Tom Hughes <tomtheengineer@gmail.com>
9 lines
319 B
CMake
9 lines
319 B
CMake
if(NOT EXISTS "${file}")
|
|
message(FATAL_ERROR "Missing file:\n ${file}")
|
|
endif()
|
|
execute_process(COMMAND "${objdump}" -p ${file} OUTPUT_VARIABLE out)
|
|
if(out MATCHES "NEEDED[^\n]*stdc\\+\\+")
|
|
string(REPLACE "\n" "\n " out " ${out}")
|
|
message(FATAL_ERROR "File:\n ${file}\ndepends on libstdc++:\n${out}")
|
|
endif()
|