Skip to content

Commit

Permalink
Added NOMINMAX
Browse files Browse the repository at this point in the history
Signed-off-by: Vlad Gheorghiu <vsoftco@gmail.com>
  • Loading branch information
vsoftco committed Jan 23, 2025
1 parent 3e771a8 commit e488a60
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ jobs:
.\vcpkg\bootstrap-vcpkg.bat
.\vcpkg\vcpkg install pkgconf:x64-windows
- name: Install gmp
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
./vcpkg/vcpkg install gmp:x64-windows
elif [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install -y libgmp-dev
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install gmp
else
echo "$RUNNER_OS not supported"
exit 1
fi
# - name: Install gmp
# shell: bash
# run: |
# if [ "$RUNNER_OS" == "Windows" ]; then
# ./vcpkg/vcpkg install gmp:x64-windows
# elif [ "$RUNNER_OS" == "Linux" ]; then
# sudo apt-get install -y libgmp-dev
# elif [ "$RUNNER_OS" == "macOS" ]; then
# brew install gmp
# else
# echo "$RUNNER_OS not supported"
# exit 1
# fi

- name: Configure staq
shell: bash
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ endif()

# Windows issues with Microsoft Visual Studio
if(MSVC)
add_definitions(-DNOMINMAX)
include_directories(SYSTEM libs/third_party/pthreadwin32)
add_compile_options(/bigobj)
add_compile_options(/utf-8)
Expand Down
2 changes: 1 addition & 1 deletion libs/third_party/easy/sat2/cardinality.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ inline void create_totalizer_internal(std::vector<std::vector<int>>& dest,
uint32_t rhs, std::vector<int> const& av,
std::vector<int> const& bv) {
/* i = 0 */
uint32_t kmin = std::min(rhs, static_cast<uint32_t>(bv.size()));
uint32_t kmin = std::min(rhs, uint32_t(bv.size()));
for (auto j = 0; j < kmin; ++j) {
dest.emplace_back(std::vector<int>{-bv[j], ov[j]});
}
Expand Down

0 comments on commit e488a60

Please sign in to comment.