Skip to content
Snippets Groups Projects
Commit 248d5255 authored by Joachim Pouderoux's avatar Joachim Pouderoux Committed by Ben Boeckel
Browse files

linking: default to not making warnings fatal errors

Toolchains tend to add new warnings as time goes on, so in the spirit of
keeping VTK as future-proof as possible, don't turn them into warnings
by default. Testing machines and developers can certainly enable it
though.

    http://public.kitware.com/pipermail/vtk-developers/2015-July/032233.html
parent c6eb349e
No related branches found
No related tags found
No related merge requests found
......@@ -14,12 +14,17 @@ if(CMAKE_COMPILER_IS_GNUCXX)
# If we are compiling on Linux then set some extra linker flags too
if(CMAKE_SYSTEM_NAME MATCHES Linux)
option(VTK_LINKER_FATAL_WARNINGS "Specify if linker warnings must be considered as errors." OFF)
mark_as_advanced(VTK_LINKER_FATAL_WARNINGS)
if(VTK_LINKER_FATAL_WARNINGS)
set(VTK_EXTRA_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings")
endif()
set(CMAKE_SHARED_LINKER_FLAGS
"-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
"${VTK_EXTRA_SHARED_LINKER_FLAGS} -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS
"-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
"${VTK_EXTRA_SHARED_LINKER_FLAGS} -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
set (CMAKE_EXE_LINKER_FLAGS
"-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
"${VTK_EXTRA_SHARED_LINKER_FLAGS} -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
endif()
# Now check if we can use visibility to selectively export symbols
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment