Mercurial > mxe-octave
comparison src/build-msvctools/cc-msvc.cc @ 3087:3663f6300abf
[MSVC] enable FFTW compilation
- fix cc-msvc when all input files are pushed into @-files by libtool
- make libtool think clgfortran is not the GNU Fortran compiler
- don't bother compiling long-double version of FFTW, MSVC does not support
long double type, it's typedef'ed to double
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Mon, 24 Jun 2013 22:10:13 -0400 |
parents | c0222ce8760d |
children | 31edb6eea0eb |
comparison
equal
deleted
inserted
replaced
3086:9b848bfe6f10 | 3087:3663f6300abf |
---|---|
767 return 1; | 767 return 1; |
768 } | 768 } |
769 clopt += (" " + sourcefile); | 769 clopt += (" " + sourcefile); |
770 } | 770 } |
771 | 771 |
772 if (exeoutput && sourcefile.empty()) | |
773 { | |
774 // It's possible all object files and libraries have been | |
775 // pushed into @-files, so "prog" would still be set to "cl". | |
776 // If there's no source file specified on the command line, | |
777 // it's probably safe to assume we're calling the linker. | |
778 | |
779 prog = "link"; | |
780 } | |
781 | |
772 if (!exeoutput && !sourcefile.empty() && objectfile.empty()) | 782 if (!exeoutput && !sourcefile.empty() && objectfile.empty()) |
773 { | 783 { |
774 // use .o suffix by default | 784 // use .o suffix by default |
775 int pos = sourcefile.rfind('.'); | 785 int pos = sourcefile.rfind('.'); |
776 if (pos == string::npos) | 786 if (pos == string::npos) |
790 else | 800 else |
791 exefile = "a.exe"; | 801 exefile = "a.exe"; |
792 clopt += " -Fe" + exefile; | 802 clopt += " -Fe" + exefile; |
793 linkopt += " -out:" + exefile; | 803 linkopt += " -out:" + exefile; |
794 } | 804 } |
805 | |
806 if (exeoutput && | |
807 (ends_with(exefile, ".dll") || ends_with(exefile, ".DLL")) | |
808 && ! doshared) | |
809 { | |
810 // Maybe "-shared" was missing on the command line. | |
811 // Compensate for it! | |
812 | |
813 clopt += " -LD"; | |
814 linkopt += " -DLL"; | |
815 } | |
795 | 816 |
796 if (exeoutput && default_libs) | 817 if (exeoutput && default_libs) |
797 { | 818 { |
798 cllinkopt += " dirent.lib msvcmath.lib shell32.lib advapi32.lib user32.lib kernel32.lib"; | 819 cllinkopt += " dirent.lib msvcmath.lib shell32.lib advapi32.lib user32.lib kernel32.lib"; |
799 linkopt += " dirent.lib msvcmath.lib shell32.lib advapi32.lib user32.lib kernel32.lib"; | 820 linkopt += " dirent.lib msvcmath.lib shell32.lib advapi32.lib user32.lib kernel32.lib"; |