Commit 13e5f1dc authored by jcfr's avatar jcfr
Browse files

COMP: Pass --no-undefined flag to the linker with GNUCXX compiler is used.

Doing so will alert the linux/apple developer if there are undefined symbol at
build time.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@15985 3bd1e089-480b-0410-8dfb-8563597acbee
parent 36c4ca5b
......@@ -205,6 +205,7 @@ SET(Slicer_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT} ${COVERAGE_CXX_FLAGS} ${ADDITIONAL
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(cflags "-Wall -Wextra -Wpointer-arith -Winvalid-pch -Wcast-align -Wwrite-strings -D_FORTIFY_SOURCE=2")
SlicerFunctionCheckCompilerFlags("-fdiagnostics-show-option" cflags)
SlicerFunctionCheckCompilerFlags("-Wl,--no-undefined" cflags)
slicerFunctionGetGccVersion(${CMAKE_CXX_COMPILER} GCC_VERSION)
# With older version of gcc supporting the flag -fstack-protector-all, an extra dependency to libssp.so
......
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