Skip to content

Commit

Permalink
fixes for 1.3.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Felix committed Jun 13, 2020
1 parent 00839e0 commit 8b47b53
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 12 deletions.
15 changes: 9 additions & 6 deletions CaDiCaL.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PreprocessorDefinitions>NUNLOCKED;NBUILD;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NUNLOCKED;NBUILD;WIN32;NO_STRICT;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
Expand All @@ -116,7 +116,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>NUNLOCKED;NBUILD;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NUNLOCKED;NBUILD;WIN32;NDEBUG;NO_STRICT;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
Expand All @@ -133,7 +133,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Library|Win32'">
<ClCompile>
<PreprocessorDefinitions>NUNLOCKED;NBUILD;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NUNLOCKED;NBUILD;WIN32;NDEBUG;_CONSOLE;NO_STRICT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
Expand All @@ -151,14 +151,14 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories>src/pal-win</AdditionalIncludeDirectories>
<PreprocessorDefinitions>USE_PAL;NUNLOCKED;NBUILD;</PreprocessorDefinitions>
<PreprocessorDefinitions>USE_PAL;NUNLOCKED;NBUILD;NO_STRICT;</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>src/pal-win</AdditionalIncludeDirectories>
<PreprocessorDefinitions>USE_PAL;NDEBUG;NUNLOCKED;NBUILD;</PreprocessorDefinitions>
<PreprocessorDefinitions>USE_PAL;NDEBUG;NUNLOCKED;NBUILD;NO_STRICT;</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<WholeProgramOptimization>true</WholeProgramOptimization>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
Expand All @@ -173,7 +173,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Library|x64'">
<ClCompile>
<AdditionalIncludeDirectories>src/pal-win</AdditionalIncludeDirectories>
<PreprocessorDefinitions>USE_PAL;NDEBUG;NUNLOCKED;NBUILD;</PreprocessorDefinitions>
<PreprocessorDefinitions>USE_PAL;NDEBUG;NUNLOCKED;NBUILD;NO_STRICT;</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<WholeProgramOptimization>true</WholeProgramOptimization>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
Expand Down Expand Up @@ -202,6 +202,7 @@
<ClCompile Include="src\compact.cpp" />
<ClCompile Include="src\condition.cpp" />
<ClCompile Include="src\config.cpp" />
<ClCompile Include="src\contract.cpp" />
<ClCompile Include="src\cover.cpp" />
<ClCompile Include="src\decide.cpp" />
<ClCompile Include="src\decompose.cpp" />
Expand All @@ -219,6 +220,7 @@
<ClCompile Include="src\ipasir.cpp" />
<ClCompile Include="src\limit.cpp" />
<ClCompile Include="src\logging.cpp" />
<ClCompile Include="src\lookahead.cpp" />
<ClCompile Include="src\lucky.cpp" />
<ClCompile Include="src\message.cpp" />
<ClCompile Include="src\minimize.cpp" />
Expand Down Expand Up @@ -297,6 +299,7 @@
<ClInclude Include="src\queue.hpp" />
<ClInclude Include="src\radix.hpp" />
<ClInclude Include="src\random.hpp" />
<ClInclude Include="src\range.hpp" />
<ClInclude Include="src\reluctant.hpp" />
<ClInclude Include="src\resources.hpp" />
<ClInclude Include="src\score.hpp" />
Expand Down
9 changes: 9 additions & 0 deletions CaDiCaL.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@
<ClCompile Include="src\external.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\contract.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\lookahead.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\ccadical.h">
Expand Down Expand Up @@ -383,5 +389,8 @@
<ClInclude Include="src\pal-win\sys\mman.h">
<Filter>Windows PAL</Filter>
</ClInclude>
<ClInclude Include="src\range.hpp">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
14 changes: 11 additions & 3 deletions src/pal-win/unistd.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,19 @@ int getrusage(int who, struct rusage* usage)

long sysconf(int name)
{
assert(name == _SC_PAGESIZE);

SYSTEM_INFO si;
GetSystemInfo(&si);
return si.dwPageSize;

switch (name)
{
case _SC_PAGESIZE:
return si.dwPageSize;
case _SC_NPROCESSORS_ONLN:
return si.dwNumberOfProcessors;
default:
assert(false);
return 0;
}
}

#undef signal
Expand Down
1 change: 1 addition & 0 deletions src/pal-win/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ int getrusage(int who, struct rusage* usage);


#define _SC_PAGESIZE 1338
#define _SC_NPROCESSORS_ONLN 1339
long sysconf(int name);

#undef min
Expand Down
3 changes: 2 additions & 1 deletion src/resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ int number_of_cores (Internal * internal)
(void) internal;
#endif

bool amd, intel, res;
bool amd, intel;
int res;

const int syscores = sysconf (_SC_NPROCESSORS_ONLN);
if (syscores > 0) MSG ("'sysconf' reports %d processors", syscores);
Expand Down
2 changes: 0 additions & 2 deletions src/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@
// the file '../VERSION' with '../scripts/update-version.sh'. The standard
// build process relies on 'VERSION' to be defined in 'build.hpp'.

#ifndef NBUILD
#ifndef VERSION
# define VERSION "1.3.0"
#endif // NBUILD
#endif // VERSION

/*------------------------------------------------------------------------*/
Expand Down

0 comments on commit 8b47b53

Please sign in to comment.