CMake Platform Dependent Issues: Difference between revisions
From KitwarePublic
Jump to navigationJump to search
Line 7: | Line 7: | ||
{| border="1" | {| border="1" | ||
|- bgcolor="#abcdef" | |- bgcolor="#abcdef" | ||
! Platform !! System Info !! Compilers !! List Dependencies !! Trace Syscal/Signal !! Runtime Library Path | ! Platform !! System Info !! Compilers !! Macros !! List Dependencies !! Trace Syscal/Signal !! Runtime Library Path | ||
|- | |- | ||
| Linux || uname -a || gcc, g++, icc || ldd program || strace || $LD_LIBRARY_PATH | | Linux || uname -a || gcc, g++, icc || __linux || ldd program || strace || $LD_LIBRARY_PATH | ||
|- | |- | ||
| HP-UX || uname -a || cc, aCC || chatr program || || $SHLIB_PATH | | HP-UX || uname -a || cc, aCC || __hpux || chatr program || || $SHLIB_PATH (32-bit), $LD_LIBRARY_PATH (64-bit) | ||
|- | |- | ||
| AIX || uname -a || xlc, xlC || dump -H program || || $LIBPATH | | AIX || uname -a || xlc, xlC || ?? || dump -H program || || $LIBPATH | ||
|- | |- | ||
| SunOS || uname -a || cc, CC || ldd program || || $LD_LIBRARY_PATH | | SunOS || uname -a || cc, CC || __sparc || ldd program || || $LD_LIBRARY_PATH (32-bit), $LD_LIBRARY_PATH_64 (64-bit) | ||
|- | |- | ||
| IRIX || hinv, uname -a || cc, CC || ldd program || || $LD_LIBRARY_PATH, $LD_LIBRARYN32_PATH, $LD_LIBRARY64_PATH | | IRIX || hinv, uname -a || cc, CC || __sgi || ldd program || || $LD_LIBRARY_PATH (o32), $LD_LIBRARYN32_PATH (n32), $LD_LIBRARY64_PATH (64) | ||
|- | |- | ||
| Max OSX / Darwin || system_profiler, uname -a || | | Max OSX / Darwin || system_profiler, uname -a || gcc, g++ || __APPLE__ || otool -L program || ktrace -f outfile program; kdump outfile || $DYLD_LIBRARY_PATH | ||
|- | |- | ||
|rowspan=3| Windows ||rowspan=3| ver || Visual Studio 6, cl || depends program.exe ||rowspan=3| ||rowspan=3| $PATH | |rowspan=3| Windows ||rowspan=3| ver || Visual Studio 6, cl || _WIN32 || depends program.exe ||rowspan=3| ||rowspan=3| $PATH | ||
|- | |- | ||
|Visual Studio 7, cl || depends program.exe '''†''' | |Visual Studio 7, cl || _WIN32 || depends program.exe '''†''' | ||
|- | |- | ||
|Visual Studio 7.1, cl || depends program.exe '''†''' | |Visual Studio 7.1, cl || _WIN32 || depends program.exe '''†''' | ||
|} | |} | ||
Revision as of 17:19, 18 March 2005
The Platforms / Compilers Table
Platform | System Info | Compilers | Macros | List Dependencies | Trace Syscal/Signal | Runtime Library Path |
---|---|---|---|---|---|---|
Linux | uname -a | gcc, g++, icc | __linux | ldd program | strace | $LD_LIBRARY_PATH |
HP-UX | uname -a | cc, aCC | __hpux | chatr program | $SHLIB_PATH (32-bit), $LD_LIBRARY_PATH (64-bit) | |
AIX | uname -a | xlc, xlC | ?? | dump -H program | $LIBPATH | |
SunOS | uname -a | cc, CC | __sparc | ldd program | $LD_LIBRARY_PATH (32-bit), $LD_LIBRARY_PATH_64 (64-bit) | |
IRIX | hinv, uname -a | cc, CC | __sgi | ldd program | $LD_LIBRARY_PATH (o32), $LD_LIBRARYN32_PATH (n32), $LD_LIBRARY64_PATH (64) | |
Max OSX / Darwin | system_profiler, uname -a | gcc, g++ | __APPLE__ | otool -L program | ktrace -f outfile program; kdump outfile | $DYLD_LIBRARY_PATH |
Windows | ver | Visual Studio 6, cl | _WIN32 | depends program.exe | $PATH | |
Visual Studio 7, cl | _WIN32 | depends program.exe † | ||||
Visual Studio 7.1, cl | _WIN32 | depends program.exe † |
- † In order for depends to be installed, the "Win32 Platform SDK Tool" needs to be selected when installing Visual Studio (See Determining Which DLLs to Redistribute).
Compiler Options and Flags
Compiler | Full warnings | Errors as warnings | Disabling a particular warning (#n) |
---|---|---|---|
gcc | -W -Wall | -Werror | |
MIPS Pro | -fullwarn | -w2 | |
icc | -Wall -w2 -Wcheck | -Werror | -wd(#n) |
xlC | -qflag=w:w or -qlanglv=ansi |
- More platform specific information can be found in ROSETTA STONE platforms table (Mostly for system administrators)
- Another even more complete table: Using static and shared libraries across platforms (For various compiler flags and options)