Skip to content

Commit

Permalink
Compiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
pleroy committed Oct 15, 2024
1 parent e7b7e70 commit 53de452
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 4 deletions.
4 changes: 2 additions & 2 deletions msvc/core-math.props
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@
<ClCompile>
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
<CallingConvention>vectorcall</CallingConvention>
<LanguageStandard>stdcpp17</LanguageStandard>
<LanguageStandard>stdcpp20</LanguageStandard>
<WarningLevel>Level3</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4146;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4068;4146;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
Expand Down
8 changes: 8 additions & 0 deletions msvc/core-math.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PropertyGroup>
<ImportGroup Label="PropertySheets">
<Import Project="google_abseil-cpp.props" />
</ImportGroup>
<Import Project="$(SolutionDir)core-math.props" />
<ItemDefinitionGroup>
<ClCompile>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\binary64\cos\cos.c" />
<ClCompile Include="..\src\binary64\sin\sin.c" />
Expand Down
15 changes: 15 additions & 0 deletions msvc/google_abseil-cpp.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\..\Google\abseil-cpp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(SolutionDir)..\..\..\Google\abseil-cpp\msvc\$(PrincipiaDependencyConfiguration)\$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>base.lib;container.lib;debugging.lib;flags.lib;hash.lib;numeric.lib;random.lib;status.lib;strings.lib;synchronization.lib;time.lib;types.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
4 changes: 3 additions & 1 deletion src/binary64/cos/cos.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SOFTWARE.

// This code has been adapted to C++ and MSVC.

#include "core-math/cos.h"
#include "cos.h"

/* stdio.h and stdlib.h are needed in case the rounding test of the accurate
step fails, to print the corresponding input and exit. */
Expand All @@ -35,6 +35,8 @@ SOFTWARE.
#include <stdint.h>
#include <fenv.h>

#include <cmath>

#include "absl/numeric/int128.h"

// Warning: clang also defines __GNUC__
Expand Down
4 changes: 3 additions & 1 deletion src/binary64/sin/sin.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SOFTWARE.

// This code has been adapted to C++ and MSVC.

#include "core-math/sin.h"
#include "sin.h"

/* stdio.h and stdlib.h are needed in case the rounding test of the accurate
step fails, to print the corresponding input and exit. */
Expand All @@ -35,6 +35,8 @@ SOFTWARE.
#include <stdint.h>
#include <fenv.h>

#include <cmath>

#include "absl/numeric/int128.h"

// Warning: clang also defines __GNUC__
Expand Down

0 comments on commit 53de452

Please sign in to comment.