summaryrefslogtreecommitdiffstats
path: root/config.tests/unix/ptrsize.test
blob: c1d80eea9d499869e780884e7956d40b904eb489 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh

QMKSPEC=$1
VERBOSE=$2
SRCDIR=$3
OUTDIR=$4

# debuggery
[ "$VERBOSE" = "yes" ] && echo "Testing size of pointers ... ($*)"

# build and run a test program
test -d "$OUTDIR/config.tests/unix/ptrsize" || mkdir -p "$OUTDIR/config.tests/unix/ptrsize"
"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "$SRCDIR/config.tests/unix/ptrsize/ptrsizetest.pro" -o "$OUTDIR/config.tests/unix/ptrsize/Makefile" >/dev/null 2>&1
cd "$OUTDIR/config.tests/unix/ptrsize"

if [ "$VERBOSE" = "yes" ]; then
  ($MAKE clean && $MAKE)
else
  ($MAKE clean && $MAKE) >/dev/null 2>&1
fi
RETVAL=$?

if [ "$RETVAL" -ne 0 ]; then
    PTRSIZE=4
else
    PTRSIZE=8
fi


# done
[ "$VERBOSE" = "yes" ] && echo "Pointer size: $PTRSIZE"
exit $PTRSIZE
id='n93' href='#n93'>93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
static cmVS7FlagTable cmVS11CLFlagTable[] = {

  // Enum Properties
  { "DebugInformationFormat", "", "None", "None", 0 },
  { "DebugInformationFormat", "Z7", "C7 compatible", "OldStyle", 0 },
  { "DebugInformationFormat", "Zi", "Program Database", "ProgramDatabase", 0 },
  { "DebugInformationFormat", "ZI", "Program Database for Edit And Continue",
    "EditAndContinue", 0 },

  { "WarningLevel", "W0", "Turn Off All Warnings", "TurnOffAllWarnings", 0 },
  { "WarningLevel", "W1", "Level1", "Level1", 0 },
  { "WarningLevel", "W2", "Level2", "Level2", 0 },
  { "WarningLevel", "W3", "Level3", "Level3", 0 },
  { "WarningLevel", "W4", "Level4", "Level4", 0 },
  { "WarningLevel", "Wall", "EnableAllWarnings", "EnableAllWarnings", 0 },

  { "Optimization", "Od", "Disabled", "Disabled", 0 },
  { "Optimization", "O1", "Minimize Size", "MinSpace", 0 },
  { "Optimization", "O2", "Maximize Speed", "MaxSpeed", 0 },
  { "Optimization", "Ox", "Full Optimization", "Full", 0 },

  { "InlineFunctionExpansion", "", "Default", "Default", 0 },
  { "InlineFunctionExpansion", "Ob0", "Disabled", "Disabled", 0 },
  { "InlineFunctionExpansion", "Ob1", "Only __inline", "OnlyExplicitInline",
    0 },
  { "InlineFunctionExpansion", "Ob2", "Any Suitable", "AnySuitable", 0 },

  { "FavorSizeOrSpeed", "Os", "Favor small code", "Size", 0 },
  { "FavorSizeOrSpeed", "Ot", "Favor fast code", "Speed", 0 },
  { "FavorSizeOrSpeed", "", "Neither", "Neither", 0 },

  { "ExceptionHandling", "EHa", "Yes with SEH Exceptions", "Async", 0 },
  { "ExceptionHandling", "EHsc", "Yes", "Sync", 0 },
  { "ExceptionHandling", "EHs", "Yes with Extern C functions", "SyncCThrow",
    0 },
  { "ExceptionHandling", "", "No", "false", 0 },

  { "BasicRuntimeChecks", "RTCs", "Stack Frames", "StackFrameRuntimeCheck",
    0 },
  { "BasicRuntimeChecks", "RTCu", "Uninitialized variables",
    "UninitializedLocalUsageCheck", 0 },
  { "BasicRuntimeChecks", "RTC1", "Both (/RTC1, equiv. to /RTCsu)",
    "EnableFastChecks", 0 },
  { "BasicRuntimeChecks", "", "Default", "Default", 0 },

  { "RuntimeLibrary", "MT", "Multi-threaded", "MultiThreaded", 0 },
  { "RuntimeLibrary", "MTd", "Multi-threaded Debug", "MultiThreadedDebug", 0 },
  { "RuntimeLibrary", "MD", "Multi-threaded DLL", "MultiThreadedDLL", 0 },
  { "RuntimeLibrary", "MDd", "Multi-threaded Debug DLL",
    "MultiThreadedDebugDLL", 0 },

  { "StructMemberAlignment", "Zp1", "1 Byte", "1Byte", 0 },
  { "StructMemberAlignment", "Zp2", "2 Bytes", "2Bytes", 0 },
  { "StructMemberAlignment", "Zp4", "4 Byte", "4Bytes", 0 },
  { "StructMemberAlignment", "Zp8", "8 Bytes", "8Bytes", 0 },
  { "StructMemberAlignment", "Zp16", "16 Bytes", "16Bytes", 0 },
  { "StructMemberAlignment", "", "Default", "Default", 0 },

  { "EnableEnhancedInstructionSet", "arch:SSE", "Streaming SIMD Extensions",
    "StreamingSIMDExtensions", 0 },
  { "EnableEnhancedInstructionSet", "arch:SSE2", "Streaming SIMD Extensions 2",
    "StreamingSIMDExtensions2", 0 },
  { "EnableEnhancedInstructionSet", "arch:AVX", "Advanced Vector Extensions",
    "AdvancedVectorExtensions", 0 },
  { "EnableEnhancedInstructionSet", "arch:IA32", "No Enhanced Instructions",
    "NoExtensions", 0 },
  { "EnableEnhancedInstructionSet", "", "Not Set", "NotSet", 0 },

  { "FloatingPointModel", "fp:precise", "Precise", "Precise", 0 },
  { "FloatingPointModel", "fp:strict", "Strict", "Strict", 0 },
  { "FloatingPointModel", "fp:fast", "Fast", "Fast", 0 },

  { "PrecompiledHeader", "Yc", "Create", "Create",
    cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue },
  { "PrecompiledHeader", "Yu", "Use", "Use",
    cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue },
  { "PrecompiledHeader", "", "Not Using Precompiled Headers", "NotUsing", 0 },

  { "AssemblerOutput", "", "No Listing", "NoListing", 0 },
  { "AssemblerOutput", "FA", "Assembly-Only Listing", "AssemblyCode", 0 },
  { "AssemblerOutput", "FAc", "Assembly With Machine Code",
    "AssemblyAndMachineCode", 0 },
  { "AssemblerOutput", "FAs", "Assembly With Source Code",
    "AssemblyAndSourceCode", 0 },
  { "AssemblerOutput", "FAcs", "Assembly, Machine Code and Source", "All", 0 },

  { "CallingConvention", "Gd", "__cdecl", "Cdecl", 0 },
  { "CallingConvention", "Gr", "__fastcall", "FastCall", 0 },
  { "CallingConvention", "Gz", "__stdcall", "StdCall", 0 },

  { "CompileAs", "", "Default", "Default", 0 },
  { "CompileAs", "TC", "Compile as C Code", "CompileAsC", 0 },
  { "CompileAs", "TP", "Compile as C++ Code", "CompileAsCpp", 0 },

  { "ErrorReporting", "errorReport:none", "Do Not Send Report", "None", 0 },
  { "ErrorReporting", "errorReport:prompt", "Prompt Immediately", "Prompt",
    0 },
  { "ErrorReporting", "errorReport:queue", "Queue For Next Login", "Queue",
    0 },
  { "ErrorReporting", "errorReport:send", "Send Automatically", "Send", 0 },

  { "CompileAsManaged", "", "No Common Language RunTime Support", "false", 0 },
  { "CompileAsManaged", "clr", "Common Language RunTime Support", "true", 0 },
  { "CompileAsManaged", "clr:pure",
    "Pure MSIL Common Language RunTime Support", "Pure", 0 },
  { "CompileAsManaged", "clr:safe",
    "Safe MSIL Common Language RunTime Support", "Safe", 0 },
  { "CompileAsManaged", "clr:oldSyntax",
    "Common Language RunTime Support, Old Syntax", "OldSyntax", 0 },

  // Bool Properties
  { "CompileAsWinRT", "ZW", "", "true", 0 },
  { "WinRTNoStdLib", "ZW:nostdlib", "", "true", 0 },
  { "SuppressStartupBanner", "nologo-", "", "false", 0 },
  { "SuppressStartupBanner", "nologo", "", "true", 0 },
  { "TreatWarningAsError", "WX-", "", "false", 0 },
  { "TreatWarningAsError", "WX", "", "true", 0 },
  { "SDLCheck", "sdl-", "", "false", 0 },
  { "SDLCheck", "sdl", "", "true", 0 },