Commit 2740e82f authored by Rashad Kanavath's avatar Rashad Kanavath

COMP: activate --no-defined option on linux

parent 064ec140
......@@ -272,6 +272,13 @@ macro(check_compiler_platform_flags)
set(OTB_REQUIRED_LINK_FLAGS "${OTB_REQUIRED_LINK_FLAGS} -mthreads")
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined")
set(OTB_REQUIRED_LINK_FLAGS "${OTB_REQUIRED_LINK_FLAGS} -Wl,--no-undefined")
endif()
# check for OpenMP
if(OTB_USE_OPENMP)
find_package(OpenMP QUIET)
......
......@@ -97,7 +97,6 @@ if(OTB_DATA_USE_LARGEINPUT)
mark_as_advanced(OTB_DATA_LARGEINPUT_ROOT)
endif()
option(BUILD_EXAMPLES " Build the OTB Examples directory" OFF)
option(USE_DEFAULT_INSTALL_PREFIX "Install superbuild to default prefix /usr/local for unix" OFF)
......@@ -159,12 +158,6 @@ if(MSVC)
endif()
endif()
# if(LINUX)
# list(APPEND CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
# list(APPEND CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined")
# list(APPEND CMAKE_EXE_LINKER_FLAGS "-Wl,--no-undefined")
# endif()
if(DEFINED ENV{CMAKE_PREFIX_PATH})
set(SB_CMAKE_PREFIX_PATH "$ENV{CMAKE_PREFIX_PATH};${SB_INSTALL_PREFIX}")
else()
......@@ -204,7 +197,6 @@ foreach(cmake_var
endif()
endforeach()
if(CMAKE_VERBOSE_MAKEFILE)
list(APPEND SB_CMAKE_CACHE_ARGS "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON")
endif()
......
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