Temporary adjustment for strict aliasing (#2582)

* Fixes #2572.
* Added a custom rule to avoid optimization causing monsters to not attack. (From tests this appears to be npc.cpp on Centos 7 and mob.cpp on Windows vc141)
* Added -fno-strict-alising to CMake when building with GCC. (Clang and VS have it by default)
* Fixed cmake output path.
Thanks to @lighta!
This commit is contained in:
lighta
2017-11-06 17:59:59 -04:00
committed by Aleos
parent e7e9cf6d73
commit 673315994b
5 changed files with 29 additions and 10 deletions

View File

@@ -233,7 +233,9 @@
<ClCompile Include="map.cpp" />
<ClCompile Include="mapreg.cpp" />
<ClCompile Include="mercenary.cpp" />
<ClCompile Include="mob.cpp" />
<ClCompile Include="mob.cpp">
<Optimization Condition="'$(Configuration)'=='Release'">Disabled</Optimization>
</ClCompile>
<ClCompile Include="npc.cpp" />
<ClCompile Include="npc_chat.cpp" />
<ClCompile Include="party.cpp" />
@@ -368,3 +370,4 @@
<Copy SourceFiles="$(SolutionDir)db\import-tmpl\status_disabled.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\status_disabled.txt')" />
</Target>
</Project>