Warning, /education/kstars/cmake/modules/CheckNodump.cmake is written in an unsupported language. File is not indexed.

0001 # Check if the linker supports -Wl,z,nodump
0002 
0003 function(check_nodump result)
0004   set(NODUMP_FLAGS "-Wl,-z,nodump")
0005   cmake_policy(SET CMP0056 NEW)
0006   set(CMAKE_EXE_LINKER_FLAGS "${NODUMP_FLAGS}")
0007   set(TEST_PROGRAM "int main() { return 0 ; }")
0008   set(TEST_FILE "${CMAKE_CURRENT_BINARY_DIR}/test_nodump.cc")
0009   file(WRITE "${TEST_FILE}" "${TEST_PROGRAM}")
0010 
0011   message(STATUS "Checking whether the linker supports ${NODUMP_FLAGS} ...")
0012   try_compile(SUPPORT_NODUMP
0013               "${CMAKE_CURRENT_BINARY_DIR}/try_has_nodump"
0014               "${TEST_FILE}"
0015   )
0016   message(STATUS "  supports ${NODUMP_FLAGS}: ${SUPPORT_NODUMP}")
0017 
0018   if(SUPPORT_NODUMP)
0019     set(${result} "${NODUMP_FLAGS}")
0020   else()
0021     set(${result} "")
0022   endif()
0023 endfunction()