summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-07-23 14:07:39 (GMT)
committerBrad King <brad.king@kitware.com>2009-07-23 14:07:39 (GMT)
commitc98aaceb9287329e71ffa060103265cc8fea8d69 (patch)
tree496a818cc9ca6fd3617e30a4eafcbacb62ddd7ca
parent07ea19ad1f280e7a1cb07ab2b52c0081f72251dd (diff)
downloadCMake-c98aaceb9287329e71ffa060103265cc8fea8d69.zip
CMake-c98aaceb9287329e71ffa060103265cc8fea8d69.tar.gz
CMake-c98aaceb9287329e71ffa060103265cc8fea8d69.tar.bz2
ENH: Create ImplicitLinkInfo test
This tests the internal CMakeParseImplicitLinkInfo.cmake module to ensure that implicit link information is extracted correctly. The test contains many manually verified examples from a variety of systems.
-rw-r--r--Tests/CMakeTests/CMakeLists.txt1
-rw-r--r--Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in319
2 files changed, 320 insertions, 0 deletions
diff --git a/Tests/CMakeTests/CMakeLists.txt b/Tests/CMakeTests/CMakeLists.txt
index b83518b..32c5412 100644
--- a/Tests/CMakeTests/CMakeLists.txt
+++ b/Tests/CMakeTests/CMakeLists.txt
@@ -19,6 +19,7 @@ AddCMakeTest(Version "")
AddCMakeTest(Message "")
AddCMakeTest(File "")
AddCMakeTest(SeparateArguments "")
+AddCMakeTest(ImplicitLinkInfo "")
SET(GetPrerequisites_PreArgs
"-DCTEST_CONFIGURATION_TYPE:STRING=\\\${CTEST_CONFIGURATION_TYPE}"
diff --git a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
new file mode 100644
index 0000000..03e858d
--- /dev/null
+++ b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
@@ -0,0 +1,319 @@
+# This is not supposed to be included by user code, but we need to
+# test it.
+include(${CMAKE_ROOT}/Modules/CMakeParseImplicitLinkInfo.cmake)
+
+#-----------------------------------------------------------------------------
+# Linux
+
+# gcc dummy.c -v
+set(linux64_gcc_text " /usr/lib/gcc/x86_64-linux-gnu/4.3.3/collect2 --eh-frame-hdr -m elf_x86_64 --hash-style=both -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.3.3/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/4.3.3 -L/usr/lib/gcc/x86_64-linux-gnu/4.3.3 -L/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../.. -L/usr/lib/x86_64-linux-gnu /tmp/ccEO9iux.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/4.3.3/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/crtn.o")
+set(linux64_gcc_libs "gcc;gcc_s;c;gcc;gcc_s")
+set(linux64_gcc_dirs "/usr/lib/gcc/x86_64-linux-gnu/4.3.3;/usr/lib;/lib;/usr/lib/x86_64-linux-gnu")
+list(APPEND platforms linux64_gcc)
+
+# g++ dummy.cxx -v
+set(linux64_g++_text " /usr/lib/gcc/x86_64-linux-gnu/4.3.3/collect2 --eh-frame-hdr -m elf_x86_64 --hash-style=both -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.3.3/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/4.3.3 -L/usr/lib/gcc/x86_64-linux-gnu/4.3.3 -L/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../.. -L/usr/lib/x86_64-linux-gnu /tmp/ccalRBlq.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/4.3.3/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/crtn.o")
+set(linux64_g++_libs "stdc++;m;gcc_s;gcc;c;gcc_s;gcc")
+set(linux64_g++_dirs "/usr/lib/gcc/x86_64-linux-gnu/4.3.3;/usr/lib;/lib;/usr/lib/x86_64-linux-gnu")
+list(APPEND platforms linux64_g++)
+
+# f95 dummy.f -v
+set(linux64_f95_text " /usr/lib/gcc/x86_64-linux-gnu/4.3.3/collect2 --eh-frame-hdr -m elf_x86_64 --hash-style=both -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.3.3/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/4.3.3 -L/usr/lib/gcc/x86_64-linux-gnu/4.3.3 -L/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../.. -L/usr/lib/x86_64-linux-gnu /tmp/ccAVcN7N.o -lgfortranbegin -lgfortran -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/4.3.3/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/crtn.o")
+set(linux64_f95_libs "gfortranbegin;gfortran;m;gcc_s;gcc;c;gcc_s;gcc")
+set(linux64_f95_dirs "/usr/lib/gcc/x86_64-linux-gnu/4.3.3;/usr/lib;/lib;/usr/lib/x86_64-linux-gnu")
+list(APPEND platforms linux64_f95)
+
+# suncc dummy.c '-#'
+set(linux64_suncc_text "/usr/bin/ld --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /opt/sun/sunstudio12/prod/lib/amd64/crti.o /opt/sun/sunstudio12/prod/lib/amd64/crt1x.o /opt/sun/sunstudio12/prod/lib/amd64/values-xa.o dummy.o -Y \"/opt/sun/sunstudio12/prod/lib/amd64:/lib64:/usr/lib64\" -Qy -lc /opt/sun/sunstudio12/prod/lib/amd64/libc_supp.a /opt/sun/sunstudio12/prod/lib/amd64/crtn.o")
+set(linux64_suncc_libs "c;/opt/sun/sunstudio12/prod/lib/amd64/libc_supp.a")
+set(linux64_suncc_dirs "/opt/sun/sunstudio12/prod/lib/amd64;/lib64;/usr/lib64")
+list(APPEND platforms linux64_suncc)
+
+# sunCC dummy.cxx -v
+set(linux64_sunCC_text "/opt/sun/sunstudio12/prod/lib/amd64/ld -u __1cH__CimplKcplus_init6F_v_ --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -R/opt/sun/sunstudio12/lib/rw7/amd64:/opt/sun/sunstudio12/lib/amd64:/opt/sun/sunstudio12/rtlibs/amd64:/opt/sun/lib/rtlibs/amd64:/opt/SUNWspro/lib/amd64:/lib64:/usr/lib64 -o a.out /opt/sun/sunstudio12/prod/lib/amd64/crti.o /opt/sun/sunstudio12/prod/lib/amd64/CCrti.o /opt/sun/sunstudio12/prod/lib/amd64/crt1x.o -Y P,/opt/sun/sunstudio12/lib/rw7/amd64:/opt/sun/sunstudio12/lib/amd64:/opt/sun/sunstudio12/rtlibs/amd64:/opt/sun/sunstudio12/prod/lib/rw7/amd64:/opt/sun/sunstudio12/prod/lib/amd64:/lib64:/usr/lib64 dummy.o -lCstd -lCrun -lm -lc /opt/sun/sunstudio12/prod/lib/amd64/libc_supp.a /opt/sun/sunstudio12/prod/lib/amd64/CCrtn.o /opt/sun/sunstudio12/prod/lib/amd64/crtn.o >&/tmp/ld.04973.2.err")
+set(linux64_sunCC_libs "Cstd;Crun;m;c;/opt/sun/sunstudio12/prod/lib/amd64/libc_supp.a")
+set(linux64_sunCC_dirs "/opt/sun/sunstudio12/lib/rw7/amd64;/opt/sun/sunstudio12/lib/amd64;/opt/sun/sunstudio12/rtlibs/amd64;/opt/sun/sunstudio12/prod/lib/rw7/amd64;/opt/sun/sunstudio12/prod/lib/amd64;/lib64;/usr/lib64")
+list(APPEND platforms linux64_sunCC)
+
+# sunf90 dummy.f -v
+set(linux64_sunf90_text "/usr/bin/ld --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -R/opt/sun/sunstudio12/lib/amd64:/opt/sun/sunstudio12/rtlibs/amd64:/opt/sun/lib/rtlibs/amd64 -o a.out /opt/sun/sunstudio12/prod/lib/amd64/crti.o /opt/sun/sunstudio12/prod/lib/amd64/crt1x.o /opt/sun/sunstudio12/prod/lib/amd64/values-xi.o -Y P,/opt/sun/sunstudio12/lib/amd64:/opt/sun/sunstudio12/rtlibs/amd64:/opt/sun/sunstudio12/prod/lib/amd64:/lib64:/usr/lib64 dummy.o -lfui -lfai -lfsu -Bdynamic -lmtsk -lpthread -lm -lc /opt/sun/sunstudio12/prod/lib/amd64/libc_supp.a /opt/sun/sunstudio12/prod/lib/amd64/crtn.o")
+set(linux64_sunf90_libs "fui;fai;fsu;mtsk;pthread;m;c;/opt/sun/sunstudio12/prod/lib/amd64/libc_supp.a")
+set(linux64_sunf90_dirs "/opt/sun/sunstudio12/lib/amd64;/opt/sun/sunstudio12/rtlibs/amd64;/opt/sun/sunstudio12/prod/lib/amd64;/lib64;/usr/lib64")
+list(APPEND platforms linux64_sunf90)
+
+#-----------------------------------------------------------------------------
+# Sun
+
+# cc dummy.c '-#'/
+set(sun_cc_text "/usr/ccs/bin/ld /opt/SUNWspro/prod/lib/crti.o /opt/SUNWspro/prod/lib/crt1.o /opt/SUNWspro/prod/lib/misalign.o /opt/SUNWspro/prod/lib/values-xa.o dummy.o -Y \"P,/opt/SUNWspro/prod/lib/v8plus:/opt/SUNWspro/prod/lib:/usr/ccs/lib:/lib:/usr/lib\" -Qy -lc /opt/SUNWspro/prod/lib/crtn.o")
+set(sun_cc_libs "c")
+set(sun_cc_dirs "/opt/SUNWspro/prod/lib/v8plus;/opt/SUNWspro/prod/lib;/usr/ccs/lib;/lib;/usr/lib")
+list(APPEND platforms sun_cc)
+
+# CC dummy.cxx -v
+set(sun_CC_text "/usr/ccs/bin/ld -u __1cH__CimplKcplus_init6F_v_ -zld32=-S/opt/SUNWspro/prod/lib/libldstab_ws.so -zld64=-S/opt/SUNWspro/prod/lib/v9/libldstab_ws.so -zld32=-S/opt/SUNWspro/prod/lib/libCCexcept.so.1 -zld64=-S/opt/SUNWspro/prod/lib/v9/libCCexcept.so.1 -R/opt/SUNWspro/lib/rw7:/opt/SUNWspro/lib/v8plus:/opt/SUNWspro/lib:/usr/ccs/lib:/lib:/usr/lib -o a.out /opt/SUNWspro/prod/lib/crti.o /opt/SUNWspro/prod/lib/CCrti.o /opt/SUNWspro/prod/lib/crt1.o /opt/SUNWspro/prod/lib/misalign.o /opt/SUNWspro/prod/lib/values-xa.o -Y P,/opt/SUNWspro/lib/rw7:/opt/SUNWspro/lib/v8plus:/opt/SUNWspro/prod/lib/rw7:/opt/SUNWspro/prod/lib/v8plus:/opt/SUNWspro/lib:/opt/SUNWspro/prod/lib:/usr/ccs/lib:/lib:/usr/lib dummy.o -lCstd -lCrun -lm -lc /opt/SUNWspro/prod/lib/CCrtn.o /opt/SUNWspro/prod/lib/crtn.o >&/tmp/ld.14846.2.err")
+set(sun_CC_libs "Cstd;Crun;m;c")
+set(sun_CC_dirs "/opt/SUNWspro/lib/rw7;/opt/SUNWspro/lib/v8plus;/opt/SUNWspro/prod/lib/rw7;/opt/SUNWspro/prod/lib/v8plus;/opt/SUNWspro/lib;/opt/SUNWspro/prod/lib;/usr/ccs/lib;/lib;/usr/lib")
+list(APPEND platforms sun_CC)
+
+# f77 dummy.f -v
+set(sun_f77_text "/usr/ccs/bin/ld -t -R/opt/SUNWspro/lib/v8plus:/opt/SUNWspro/lib -o a.out /opt/SUNWspro/prod/lib/crti.o /opt/SUNWspro/prod/lib/crt1.o /opt/SUNWspro/prod/lib/misalign.o /opt/SUNWspro/prod/lib/values-xi.o -Y P,/opt/SUNWspro/lib/v8plus:/opt/SUNWspro/prod/lib/v8plus:/opt/SUNWspro/lib:/opt/SUNWspro/prod/lib:/usr/ccs/lib:/lib:/usr/lib dummy.o -lf77compat -zallextract -lompstubs -zdefaultextract -lfui -lfai -lfai2 -lfsumai -lfprodai -lfminlai -lfmaxlai -lfminvai -lfmaxvai -lfsu -lsunmath -lm -lc /opt/SUNWspro/prod/lib/crtn.o")
+set(sun_f77_libs "f77compat;ompstubs;fui;fai;fai2;fsumai;fprodai;fminlai;fmaxlai;fminvai;fmaxvai;fsu;sunmath;m;c")
+set(sun_f77_dirs "/opt/SUNWspro/lib/v8plus;/opt/SUNWspro/prod/lib/v8plus;/opt/SUNWspro/lib;/opt/SUNWspro/prod/lib;/usr/ccs/lib;/lib;/usr/lib")
+list(APPEND platforms sun_f77)
+
+# f90 dummy.f -v
+set(sun_f90_text "/usr/ccs/bin/ld -t -R/opt/SUNWspro/lib/v8plus:/opt/SUNWspro/lib -o a.out /opt/SUNWspro/prod/lib/crti.o /opt/SUNWspro/prod/lib/crt1.o /opt/SUNWspro/prod/lib/misalign.o /opt/SUNWspro/prod/lib/values-xi.o -Y P,/opt/SUNWspro/lib/v8plus:/opt/SUNWspro/prod/lib/v8plus:/opt/SUNWspro/lib:/opt/SUNWspro/prod/lib:/usr/ccs/lib:/lib:/usr/lib dummy.o -zallextract -lompstubs -zdefaultextract -lfui -lfai -lfai2 -lfsumai -lfprodai -lfminlai -lfmaxlai -lfminvai -lfmaxvai -lfsu -lsunmath -lm -lc /opt/SUNWspro/prod/lib/crtn.o")
+set(sun_f90_libs "ompstubs;fui;fai;fai2;fsumai;fprodai;fminlai;fmaxlai;fminvai;fmaxvai;fsu;sunmath;m;c")
+set(sun_f90_dirs "/opt/SUNWspro/lib/v8plus;/opt/SUNWspro/prod/lib/v8plus;/opt/SUNWspro/lib;/opt/SUNWspro/prod/lib;/usr/ccs/lib;/lib;/usr/lib")
+list(APPEND platforms sun_f90)
+
+#-----------------------------------------------------------------------------
+# AIX
+
+# xlc -q32 dummy.c -V
+set(aix_xlc_32_text "/bin/ld -b32 /lib/crt0.o -bpT:0x10000000 -bpD:0x20000000 dummy.o -L/usr/vac/lib -lxlopt -lxl -lc")
+set(aix_xlc_32_libs "xlopt;xl;c")
+set(aix_xlc_32_dirs "/usr/vac/lib")
+list(APPEND platforms aix_xlc_32)
+
+# xlc -q64 dummy.c -V
+set(aix_xlc_64_text "/bin/ld -b64 /lib/crt0_64.o -bpT:0x100000000 -bpD:0x110000000 dummy.o -L/usr/vac/lib -lxlopt -lxl -lc")
+set(aix_xlc_64_libs "xlopt;xl;c")
+set(aix_xlc_64_dirs "/usr/vac/lib")
+list(APPEND platforms aix_xlc_64)
+
+# xlC -q32 dummy.cxx -V
+set(aix_xlC_32_text "
+/bin/ld -b32 /lib/crt0.o -bpT:0x10000000 -bpD:0x20000000 dummy.o -L/usr/vac/lib -lxlopt -lxl -L/usr/vacpp/lib -lC -lm -lc -bnobind >/tmp/xlcLDW0agyh
+/bin/ld -b32 /lib/crt0.o -bpT:0x10000000 -bpD:0x20000000 dummy.o -L/usr/vac/lib -lxlopt -lxl -L/usr/vacpp/lib -lC -lm -lc |")
+set(aix_xlC_32_libs "xlopt;xl;C;m;c")
+set(aix_xlC_32_dirs "/usr/vac/lib;/usr/vacpp/lib")
+list(APPEND platforms aix_xlC_32)
+
+# xlC -q64 dummy.cxx -V
+set(aix_xlC_64_text "
+/bin/ld -b64 /lib/crt0_64.o -bpT:0x100000000 -bpD:0x110000000 dummy.o -L/usr/vac/lib -lxlopt -lxl -L/usr/vacpp/lib -lC -lm -lc -bnobind >/tmp/xlcLD5nUnah
+/bin/ld -b64 /lib/crt0_64.o -bpT:0x100000000 -bpD:0x110000000 dummy.o -L/usr/vac/lib -lxlopt -lxl -L/usr/vacpp/lib -lC -lm -lc |")
+set(aix_xlC_64_libs "xlopt;xl;C;m;c")
+set(aix_xlC_64_dirs "/usr/vac/lib;/usr/vacpp/lib")
+list(APPEND platforms aix_xlC_64)
+
+# xlf -q32 dummy.f -V
+set(aix_xlf_32_text "/bin/ld -b32 /lib/crt0.o -bpT:0x10000000 -bpD:0x20000000 -bh:4 -bh:4 -bh:4 -bh:4 dummy.o -lxlf90 -L/usr/lpp/xlf/lib -lxlopt -lxlf -lxlomp_ser -lm -lc")
+set(aix_xlf_32_libs "xlf90;xlopt;xlf;xlomp_ser;m;c")
+set(aix_xlf_32_dirs "/usr/lpp/xlf/lib")
+list(APPEND platforms aix_xlf_32)
+
+# xlf -q64 dummy.f -V
+set(aix_xlf_64_text "/bin/ld -b64 /lib/crt0_64.o -bpT:0x100000000 -bpD:0x110000000 -bh:4 -bh:4 -bh:4 -bh:4 dummy.o -lxlf90 -L/usr/lpp/xlf/lib -lxlopt -lxlf -lxlomp_ser -lm -lc")
+set(aix_xlf_64_libs "xlf90;xlopt;xlf;xlomp_ser;m;c")
+set(aix_xlf_64_dirs "/usr/lpp/xlf/lib")
+list(APPEND platforms aix_xlf_64)
+
+# xlf90 -q32 dummy.f -V
+set(aix_xlf90_32_text "/bin/ld -b32 /lib/crt0.o -bpT:0x10000000 -bpD:0x20000000 -bh:4 dummy.o -lxlf90 -L/usr/lpp/xlf/lib -lxlopt -lxlf -lxlomp_ser -lm -lc")
+set(aix_xlf90_32_libs "xlf90;xlopt;xlf;xlomp_ser;m;c")
+set(aix_xlf90_32_dirs "/usr/lpp/xlf/lib")
+list(APPEND platforms aix_xlf90_32)
+
+# xlf90 -q64 dummy.f -V
+set(aix_xlf90_64_text "/bin/ld -b64 /lib/crt0_64.o -bpT:0x100000000 -bpD:0x110000000 -bh:4 dummy.o -lxlf90 -L/usr/lpp/xlf/lib -lxlopt -lxlf -lxlomp_ser -lm -lc")
+set(aix_xlf90_64_libs "xlf90;xlopt;xlf;xlomp_ser;m;c")
+set(aix_xlf90_64_dirs "/usr/lpp/xlf/lib")
+list(APPEND platforms aix_xlf90_64)
+
+#-----------------------------------------------------------------------------
+# HP
+
+# cc dummy.c -v
+set(hp_cc_old_text "cc: LPATH is /usr/lib/pa1.1:/usr/lib:/opt/langtools/lib:
+/usr/ccs/bin/ld /opt/langtools/lib/crt0.o -u main dummy.o -lc")
+set(hp_cc_old_libs "c")
+set(hp_cc_old_dirs "/usr/lib/pa1.1;/usr/lib;/opt/langtools/lib")
+list(APPEND platforms hp_cc_old)
+
+# aCC dummy.cxx -v
+set(hp_aCC_old_text "LPATH=/usr/lib/pa1.1:/usr/lib:/opt/langtools/lib
+ /usr/ccs/bin/ld -o a.out /opt/aCC/lib/crt0.o -u ___exit -u main -L /opt/aCC/lib /opt/aCC/lib/cpprt0.o dummy.o -lstd -lstream -lCsup -lm -lcl -lc /usr/lib/libdld.sl >/var/tmp/AAAa27787 2>&1")
+set(hp_aCC_old_libs "std;stream;Csup;m;cl;c")
+set(hp_aCC_old_dirs "/usr/lib/pa1.1;/usr/lib;/opt/langtools/lib;/opt/aCC/lib")
+list(APPEND platforms hp_aCC_old)
+
+# cc dummy.c -v
+set(hp_cc_32_text "LPATH=/usr/lib/hpux32:/opt/langtools/lib/hpux32
+ /usr/ccs/bin/ld -o a.out -u___exit -umain dummy.o -lc")
+set(hp_cc_32_libs "c")
+set(hp_cc_32_dirs "/usr/lib/hpux32;/opt/langtools/lib/hpux32")
+list(APPEND platforms hp_cc_32)
+
+# cc +DD64 dummy.c -v
+set(hp_cc_64_text "LPATH=/usr/lib/hpux64:/opt/langtools/lib/hpux64
+ /usr/ccs/bin/ld -o a.out -u___exit -umain dummy.o -lc")
+set(hp_cc_64_libs "c")
+set(hp_cc_64_dirs "/usr/lib/hpux64;/opt/langtools/lib/hpux64")
+list(APPEND platforms hp_cc_64)
+
+# aCC dummy.cxx -v
+set(hp_aCC_32_text "LPATH=/usr/lib/hpux32:/opt/langtools/lib/hpux32
+ /usr/ccs/bin/ld -o a.out -u___exit -umain -L/opt/aCC/lib/hpux32 dummy.o -lstd_v2 -lCsup -lm -lunwind -lCsup -lc -ldl >/var/tmp/AAAa03601 2>&1")
+set(hp_aCC_32_libs "std_v2;Csup;m;unwind;Csup;c;dl")
+set(hp_aCC_32_dirs "/usr/lib/hpux32;/opt/langtools/lib/hpux32;/opt/aCC/lib/hpux32")
+list(APPEND platforms hp_aCC_32)
+
+# aCC +DD64 dummy.cxx -v
+set(hp_aCC_64_text "LPATH=/usr/lib/hpux64:/opt/langtools/lib/hpux64
+ /usr/ccs/bin/ld -o a.out -u___exit -umain -L/opt/aCC/lib/hpux64 dummy.o -lstd_v2 -lCsup -lm -lunwind -lCsup -lc -ldl >/var/tmp/AAAa03597 2>&1")
+set(hp_aCC_64_libs "std_v2;Csup;m;unwind;Csup;c;dl")
+set(hp_aCC_64_dirs "/usr/lib/hpux64;/opt/langtools/lib/hpux64;/opt/aCC/lib/hpux64")
+list(APPEND platforms hp_aCC_64)
+
+# f90 dummy.f -v
+set(hp_f90_32_text "LPATH is: /usr/lib/hpux32/:/opt/langtools/lib/hpux32/
+/usr/ccs/bin/ld -u f90\$sgemm -u f90\$sgemv -u f90\$dgemm -u f90\$dgemv dummy.c +vnoshlibunsats -l:libF90.a -l:libIO77.a -lm -lc -lunwind -luca")
+set(hp_f90_32_libs "-l:libF90.a;-l:libIO77.a;m;c;unwind;uca")
+set(hp_f90_32_dirs "/usr/lib/hpux32;/opt/langtools/lib/hpux32")
+list(APPEND platforms hp_f90_32)
+
+# f90 +DD64 dummy.f -v
+set(hp_f90_64_text "LPATH is: /usr/lib/hpux64/:/opt/langtools/lib/hpux64/
+/usr/ccs/bin/ld -u f90\$sgemm -u f90\$sgemv -u f90\$dgemm -u f90\$dgemv dummy.c +vnoshlibunsats -l:libF90.a -l:libIO77.a -lm -lc -lunwind -luca")
+set(hp_f90_64_libs "-l:libF90.a;-l:libIO77.a;m;c;unwind;uca")
+set(hp_f90_64_dirs "/usr/lib/hpux64;/opt/langtools/lib/hpux64")
+list(APPEND platforms hp_f90_64)
+
+#-----------------------------------------------------------------------------
+# IRIX
+
+# cc -o32 dummy.c -v
+set(irix64_cc_o32_text "/usr/lib/ld -elf -_SYSTYPE_SVR4 -require_dynamic_link _rld_new_interface -no_unresolved -Wx,-G 0 -o32 -mips2 -call_shared -g0 -KPIC -L/usr/lib/ -nocount /usr/lib/crt1.o -count dummy.o -nocount -lc /usr/lib/crtn.o")
+set(irix64_cc_o32_libs "c")
+set(irix64_cc_o32_dirs "/usr/lib")
+list(APPEND platforms irix64_cc_o32)
+
+# cc -n32 dummy.c -v
+set(irix64_cc_n32_text "/usr/lib32/cmplrs/ld32 -call_shared -no_unresolved -transitive_link -elf -_SYSTYPE_SVR4 -show -mips4 -n32 -L/usr/lib32/mips4/r10000 -L/usr/lib32/mips4 -L/usr/lib32 /usr/lib32/mips4/crt1.o dummy.o -dont_warn_unused -Bdynamic -lc /usr/lib32/mips4/crtn.o -warn_unused")
+set(irix64_cc_n32_libs "c")
+set(irix64_cc_n32_dirs "/usr/lib32/mips4/r10000;/usr/lib32/mips4;/usr/lib32")
+list(APPEND platforms irix64_cc_n32)
+
+# cc -64 dummy.c -v
+set(irix64_cc_64_text "/usr/lib32/cmplrs/ld64 -call_shared -no_unresolved -transitive_link -elf -_SYSTYPE_SVR4 -show -mips4 -64 -L/usr/lib64/mips4/r10000 -L/usr/lib64/mips4 -L/usr/lib64 /usr/lib64/mips4/crt1.o dummy.o -dont_warn_unused -Bdynamic -lc /usr/lib64/mips4/crtn.o -warn_unused")
+set(irix64_cc_64_libs "c")
+set(irix64_cc_64_dirs "/usr/lib64/mips4/r10000;/usr/lib64/mips4;/usr/lib64")
+list(APPEND platforms irix64_cc_64)
+
+# CC -o32 dummy.cxx -v
+set(irix64_CC_o32_text "/usr/lib/ld -elf -cxx -woff 134 -_SYSTYPE_SVR4 -require_dynamic_link _rld_new_interface -no_unresolved -Wx,-G 0 -o32 -mips2 -call_shared -g0 -KPIC -L/usr/lib/ -nocount /usr/lib/crt1.o /usr/lib/c++init.o -count dummy.o -nocount -dont_warn_unused -lC -warn_unused -lc /usr/lib/crtn.o")
+set(irix64_CC_o32_libs "C;c")
+set(irix64_CC_o32_dirs "/usr/lib")
+list(APPEND platforms irix64_CC_o32)
+
+# CC -n32 dummy.cxx -v
+set(irix64_CC_n32_text "/usr/lib32/cmplrs/ld32 -call_shared -init _main -fini _fini -no_unresolved -transitive_link -demangle -elf -_SYSTYPE_SVR4 -LANG:std -show -mips4 -n32 -L/usr/lib32/mips4/r10000 -L/usr/lib32/mips4 -L/usr/lib32 -cxx -woff 134 /usr/lib32/mips4/crt1.o /usr/lib32/c++init.o dummy.o -dont_warn_unused -lCsup -lC -lCio -Bdynamic -lc /usr/lib32/mips4/crtn.o -warn_unused")
+set(irix64_CC_n32_libs "Csup;C;Cio;c")
+set(irix64_CC_n32_dirs "/usr/lib32/mips4/r10000;/usr/lib32/mips4;/usr/lib32")
+list(APPEND platforms irix64_CC_n32)
+
+# CC -64 dummy.cxx -v
+set(irix64_CC_64_text "/usr/lib32/cmplrs/ld64 -call_shared -init _main -fini _fini -no_unresolved -transitive_link -demangle -elf -_SYSTYPE_SVR4 -LANG:std -show -mips4 -64 -L/usr/lib64/mips4/r10000 -L/usr/lib64/mips4 -L/usr/lib64 -cxx -woff 134 /usr/lib64/mips4/crt1.o /usr/lib64/c++init.o dummy.o -dont_warn_unused -lCsup -lC -lCio -Bdynamic -lc /usr/lib64/mips4/crtn.o -warn_unused")
+set(irix64_CC_64_libs "Csup;C;Cio;c")
+set(irix64_CC_64_dirs "/usr/lib64/mips4/r10000;/usr/lib64/mips4;/usr/lib64")
+list(APPEND platforms irix64_CC_64)
+
+# f77 -o32 dummy.f -v
+set(irix64_f77_o32_text "/usr/lib/ld -elf -_SYSTYPE_SVR4 -require_dynamic_link _rld_new_interface -no_unresolved -Wx,-G 0 -o32 -mips2 -call_shared -g0 -KPIC -L/usr/lib/ -nocount /usr/lib/crt1.o -count dummy.o -nocount -lftn -lm -lc /usr/lib/crtn.o")
+set(irix64_f77_o32_libs "ftn;m;c")
+set(irix64_f77_o32_dirs "/usr/lib")
+list(APPEND platforms irix64_f77_o32)
+
+# f77 -n32 dummy.f -v
+set(irix64_f77_n32_text "/usr/lib32/cmplrs/ld32 -call_shared -no_unresolved -transitive_link -elf -_SYSTYPE_SVR4 -show -mips4 -n32 -L/usr/lib32/mips4/r10000 -L/usr/lib32/mips4 -L/usr/lib32 /usr/lib32/mips4/crt1.o dummy.o -dont_warn_unused -lftn -lm -Bdynamic -lc /usr/lib32/mips4/crtn.o -warn_unused")
+set(irix64_f77_n32_libs "ftn;m;c")
+set(irix64_f77_n32_dirs "/usr/lib32/mips4/r10000;/usr/lib32/mips4;/usr/lib32")
+list(APPEND platforms irix64_f77_n32)
+
+# f77 -64 dummy.f -v
+set(irix64_f77_64_text "/usr/lib32/cmplrs/ld64 -call_shared -no_unresolved -transitive_link -elf -_SYSTYPE_SVR4 -show -mips4 -64 -L/usr/lib64/mips4/r10000 -L/usr/lib64/mips4 -L/usr/lib64 /usr/lib64/mips4/crt1.o dummy.o -dont_warn_unused -lftn -lm -Bdynamic -lc /usr/lib64/mips4/crtn.o -warn_unused")
+set(irix64_f77_64_libs "ftn;m;c")
+set(irix64_f77_64_dirs "/usr/lib64/mips4/r10000;/usr/lib64/mips4;/usr/lib64")
+list(APPEND platforms irix64_f77_64)
+
+# f90 -o32 dummy.f -v
+#f90 ERROR: specified abi -o32 not supported.
+
+# f90 -n32 dummy.f -v
+set(irix64_f90_n32_text "/usr/lib32/cmplrs/ld32 -call_shared -no_unresolved -transitive_link -elf -_SYSTYPE_SVR4 -show -mips4 -n32 -L/usr/lib32/mips4/r10000 -L/usr/lib32/mips4 -L/usr/lib32 /usr/lib32/mips4/crt1.o dummy.o -dont_warn_unused -lfortran -lffio -lftn -lm -Bdynamic -lc /usr/lib32/mips4/crtn.o -warn_unused")
+set(irix64_f90_n32_libs "fortran;ffio;ftn;m;c")
+set(irix64_f90_n32_dirs "/usr/lib32/mips4/r10000;/usr/lib32/mips4;/usr/lib32")
+list(APPEND platforms irix64_f90_n32)
+
+# f90 -64 dummy.f -v
+set(irix64_f90_64_text "/usr/lib32/cmplrs/ld64 -call_shared -no_unresolved -transitive_link -elf -_SYSTYPE_SVR4 -show -mips4 -64 -L/usr/lib64/mips4/r10000 -L/usr/lib64/mips4 -L/usr/lib64 /usr/lib64/mips4/crt1.o dummy.o -dont_warn_unused -lfortran -lffio -lftn -lm -Bdynamic -lc /usr/lib64/mips4/crtn.o -warn_unused")
+set(irix64_f90_64_libs "fortran;ffio;ftn;m;c")
+set(irix64_f90_64_dirs "/usr/lib64/mips4/r10000;/usr/lib64/mips4;/usr/lib64")
+list(APPEND platforms irix64_f90_64)
+
+#-----------------------------------------------------------------------------
+# Cygwin
+
+# gcc dummy.c -v
+set(cygwin_gcc_text " /usr/lib/gcc/i686-pc-cygwin/3.4.4/collect2.exe -Bdynamic --dll-search-prefix=cyg /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../crt0.o -L/usr/lib/gcc/i686-pc-cygwin/3.4.4 -L/usr/lib/gcc/i686-pc-cygwin/3.4.4 -L/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../.. /home/user/AppData/Local/Temp/cczg1Arh.o -lgcc -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc")
+set(cygwin_gcc_libs "gcc;cygwin;user32;kernel32;advapi32;shell32;gcc")
+set(cygwin_gcc_dirs "/usr/lib/gcc/i686-pc-cygwin/3.4.4;/usr/lib")
+list(APPEND platforms cygwin_gcc)
+
+# g++ dummy.cxx -v
+set(cygwin_g++_text " /usr/lib/gcc/i686-pc-cygwin/3.4.4/collect2.exe -Bdynamic --dll-search-prefix=cyg /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../crt0.o -L/usr/lib/gcc/i686-pc-cygwin/3.4.4 -L/usr/lib/gcc/i686-pc-cygwin/3.4.4 -L/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../.. /home/user/AppData/Local/Temp/ccsvcDO6.o -lstdc++ -lgcc -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc")
+set(cygwin_g++_libs "stdc++;gcc;cygwin;user32;kernel32;advapi32;shell32;gcc")
+set(cygwin_g++_dirs "/usr/lib/gcc/i686-pc-cygwin/3.4.4;/usr/lib")
+list(APPEND platforms cygwin_g++)
+
+# gfortran dummy.f -v
+set(cygwin_gfortran_text "Configured with: ... LD=/opt/gcc-tools/bin/ld.exe
+ /usr/lib/gcc/i686-pc-cygwin/4.3.2/collect2.exe -Bdynamic --dll-search-prefix=cyg -u ___register_frame_info -u ___deregister_frame_info /usr/lib/gcc/i686-pc-cygwin/4.3.2/../../../crt0.o /usr/lib/gcc/i686-pc-cygwin/4.3.2/crtbegin.o -L/usr/lib/gcc/i686-pc-cygwin/4.3.2 -L/usr/lib/gcc/i686-pc-cygwin/4.3.2 -L/usr/lib/gcc/i686-pc-cygwin/4.3.2/../../.. /home/user/AppData/Local/Temp/ccqRWKWg.o -lgfortranbegin -lgfortran -lgcc_s -lgcc_s -lgcc -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc_s -lgcc_s -lgcc /usr/lib/gcc/i686-pc-cygwin/4.3.2/crtend.o
+")
+set(cygwin_gfortran_libs "gfortranbegin;gfortran;gcc_s;gcc_s;gcc;cygwin;user32;kernel32;advapi32;shell32;gcc_s;gcc_s;gcc")
+set(cygwin_gfortran_dirs "/usr/lib/gcc/i686-pc-cygwin/4.3.2;/usr/lib")
+list(APPEND platforms cygwin_gfortran)
+
+#-----------------------------------------------------------------------------
+# MSYS
+
+# gcc dummy.c -v
+set(msys_gcc_text " C:/mingw/bin/../libexec/gcc/mingw32/3.4.5/collect2.exe -Bdynamic /mingw/lib/crt2.o C:/mingw/bin/../lib/gcc/mingw32/3.4.5/crtbegin.o -LC:/mingw/bin/../lib/gcc/mingw32/3.4.5 -LC:/mingw/bin/../lib/gcc -L/mingw/lib -LC:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../.. C:/home/user/AppData/Local/Temp/cckQmvRt.o -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt C:/mingw/bin/../lib/gcc/mingw32/3.4.5/crtend.o")
+set(msys_gcc_libs "mingw32;gcc;moldname;mingwex;msvcrt;user32;kernel32;advapi32;shell32;mingw32;gcc;moldname;mingwex;msvcrt")
+set(msys_gcc_dirs "C:/mingw/lib/gcc/mingw32/3.4.5;C:/mingw/lib/gcc;/mingw/lib;C:/mingw/lib")
+list(APPEND platforms msys_gcc)
+
+# g++ dummy.cxx -v
+set(msys_g++_text " C:/mingw/bin/../libexec/gcc/mingw32/3.4.5/collect2.exe -Bdynamic /mingw/lib/crt2.o C:/mingw/bin/../lib/gcc/mingw32/3.4.5/crtbegin.o -LC:/mingw/bin/../lib/gcc/mingw32/3.4.5 -LC:/mingw/bin/../lib/gcc -L/mingw/lib -LC:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../.. C:/home/user/AppData/Local/Temp/cci5hYPk.o -lstdc++ -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt C:/mingw/bin/../lib/gcc/mingw32/3.4.5/crtend.o")
+set(msys_g++_libs "stdc++;mingw32;gcc;moldname;mingwex;msvcrt;user32;kernel32;advapi32;shell32;mingw32;gcc;moldname;mingwex;msvcrt")
+set(msys_g++_dirs "C:/mingw/lib/gcc/mingw32/3.4.5;C:/mingw/lib/gcc;/mingw/lib;C:/mingw/lib")
+list(APPEND platforms msys_g++)
+
+# g77 dummy.f -v
+set(msys_g77_text " C:/mingw/bin/../libexec/gcc/mingw32/3.4.5/collect2.exe -Bdynamic /mingw/lib/crt2.o C:/mingw/bin/../lib/gcc/mingw32/3.4.5/crtbegin.o -LC:/mingw/bin/../lib/gcc/mingw32/3.4.5 -LC:/mingw/bin/../lib/gcc -L/mingw/lib -LC:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../.. C:/home/user/AppData/Local/Temp/ccabRxQ1.o -lfrtbegin -lg2c -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt C:/mingw/bin/../lib/gcc/mingw32/3.4.5/crtend.o")
+set(msys_g77_libs "frtbegin;g2c;mingw32;gcc;moldname;mingwex;msvcrt;user32;kernel32;advapi32;shell32;mingw32;gcc;moldname;mingwex;msvcrt")
+set(msys_g77_dirs "C:/mingw/lib/gcc/mingw32/3.4.5;C:/mingw/lib/gcc;/mingw/lib;C:/mingw/lib")
+list(APPEND platforms msys_g77)
+
+
+#-----------------------------------------------------------------------------
+# Test parsing for all above examples.
+
+foreach(p IN LISTS platforms)
+ cmake_parse_implicit_link_info("${${p}_text}" libs dirs)
+
+ foreach(v libs dirs)
+ if(NOT "${${v}}" STREQUAL "${${p}_${v}}")
+ message(FATAL_ERROR
+ "cmake_parse_implicit_link_info failed\n"
+ "Expected '${p}' implicit ${v}\n"
+ " [${${p}_${v}}]\n"
+ "but got\n"
+ " [${${v}}]\n"
+ )
+ endif()
+ endforeach()
+endforeach()