Commit e90f463a authored by Chuck Atkins's avatar Chuck Atkins Committed by Brad King

Drop executable symbol export if platform does not support shared libs

Instead of always adding CMAKE_SHARED_LIBRARY_LINK_<LANG>_FLAGS to
executables, or just when the ENABLE_EXPORTS property is set (CMP0065),
make sure that the target platform also actually supports shared
libraries.  If not, then the executable cannot possibly provide symbols
to them anyway.
parent 5c50b396
......@@ -1542,7 +1542,9 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
// Flags to link an executable to shared libraries.
if( tgt.GetType() == cmTarget::EXECUTABLE )
if (tgt.GetType() == cmTarget::EXECUTABLE &&
bool add_shlib_flags = false;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment