Skip to content
Permalink
Browse files

/std:c++latest for MSVC, fix bool flip, warn opts

Use `/std:c++latest` for Visual Studio because the XBRZ 1.7 code
requires at least C++17.

Replace the use of `bool++` in `GBALink.cpp` which is now apparently an
error with `bool = !bool` to flip the value.

Use `/W4` to enable a good amount of warnings in Debug mode, and `/W0`
to disable warnings entirely in release modes.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
  • Loading branch information
rkitover committed Aug 30, 2019
1 parent 234f1e9 commit 381a7bfe787907b7d92ea59da3b2c091053c64b4
Showing with 9 additions and 1 deletion.
  1. +8 −0 CMakeLists.txt
  2. +1 −1 src/gba/GBALink.cpp
@@ -610,6 +610,14 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)

set(CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE} ${MY_C_LINKER_FLAGS_STR}")
set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} ${MY_C_LINKER_FLAGS_STR}")
elseif(MSVC)
add_compile_options(/std:c++latest)

if(CMAKE_BUILD_TYPE STREQUAL Debug)
add_compile_options(/W4)
else()
add_compile_options(/W0)
endif()
endif()

# Assembler flags
@@ -2925,7 +2925,7 @@ static void UpdateCableIPC(int ticks)
}

// next cycle
transfer_direction++;
transfer_direction = !transfer_direction;
}

if (transfer_direction > linkmem->trgbas && linktime >= trtimeend[transfer_direction - 3][tspeed]) {

0 comments on commit 381a7bf

Please sign in to comment.
You can’t perform that action at this time.