summaryrefslogtreecommitdiffstats
path: root/Tests/Fortran
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-10-30 21:32:40 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-10-30 21:32:40 (GMT)
commita07ab25e141467de942ffe339fdd95225d30f6f2 (patch)
treea6712b9e796b36512ecbf3be3e8c4121530d2b11 /Tests/Fortran
parent6066a3fca699a8494319439338f6f80078b25414 (diff)
downloadCMake-a07ab25e141467de942ffe339fdd95225d30f6f2.zip
CMake-a07ab25e141467de942ffe339fdd95225d30f6f2.tar.gz
CMake-a07ab25e141467de942ffe339fdd95225d30f6f2.tar.bz2
ENH: add some debug stuff for the dashboards
Diffstat (limited to 'Tests/Fortran')
-rw-r--r--Tests/Fortran/CMakeLists.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt
index 5df5280..bb07c16 100644
--- a/Tests/Fortran/CMakeLists.txt
+++ b/Tests/Fortran/CMakeLists.txt
@@ -19,7 +19,35 @@ set(srcs ${srcs} mysub.f foo.c)
create_fortran_c_interface("F_" FORTRAN_FUNCTIONS "${testf_BINARY_DIR}/foo.h")
include_directories("${testf_BINARY_DIR}")
add_executable(foo ${srcs})
+# print out some stuff to help debug on machines via cdash
+message("CTEST_FULL_OUTPUT ")
+file(READ "${testf_BINARY_DIR}/foo.h" fooh)
+message("foo.h contents:\n${fooh}")
+# if the name mangling is not found for an F90 compiler
+# print out some diagnostic stuff for the dashboard
+if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
+ if(NOT FORTRAN_C_MODULE_MANGLING_FOUND)
+ file(GLOB_RECURSE O_OBJFILES
+ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckFortranLink/*.o"
+ "*.o" )
+ file(GLOB_RECURSE OBJ_OBJFILES
+ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckFortranLink/*.obj")
+ find_program(DUMPBIN dumpbin)
+ find_program(NM nm)
+ foreach(ofile ${O_OBJFILES} ${OBJ_OBJFILES})
+ if(DEPENDS)
+ execute_process(COMMAND ${DUMPBIN} /symbols "${ofile}"
+ OUTPUT_VARIABLE out)
+ message("symbols in ${ofile}:\n${out}")
+ endif()
+ if(NM)
+ execute_process(COMMAND ${NM} "${ofile}" OUTPUT_VARIABLE out)
+ message("symbols in ${ofile}:\n${out}")
+ endif()
+ endforeach()
+ endif()
+endif()