Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
Thanks windows v3
Browse files Browse the repository at this point in the history
  • Loading branch information
OFFTKP committed Sep 4, 2023
1 parent ce0f90c commit 57b8444
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
26 changes: 10 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(THREADS_PREFER_PTHREAD_FLAG ON)
# TODO: don't always compile with -g
# TODO: compiler based
if (LINUX)
# TODO: prettify
if (WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
elseif (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2")
elseif (LINUX)
set(WARNINGS
"-Werror=return-type"
"-Werror=unused-variable"
Expand All @@ -29,18 +32,10 @@ if (LINUX)
"-Werror=shadow"
"-Werror=deprecated-declarations"
)
endif()
string(REPLACE ";" " " WARNINGS_FLAGS "${WARNINGS}")
set(CMAKE_CXX_FLAGS "-g -O2")
set(CMAKE_C_FLAGS "-g -O2")
# TODO: prettify
if (WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
endif()
if (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcrc32 ${WARNINGS_FLAGS}")
string(REPLACE ";" " " WARNINGS_FLAGS "${WARNINGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcrc32 ${WARNINGS_FLAGS} -g -O2")
else
message(FATAL_ERROR "Unsupported platform")
endif()
set(OpenGL_GL_PREFERENCE GLVND)

Expand All @@ -63,7 +58,6 @@ set(PROJECT_SOURCES
qt/keypicker.cxx
qt/nes_ppuviewer.cxx
qt/mmioviewer.cxx
src/emulator.cxx
src/global.cxx
)

Expand Down
2 changes: 1 addition & 1 deletion gb/gb_tkpwrapper.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace hydra

namespace Gameboy::QA
{
struct TestGameboy;
class TestGameboy;
}
} // namespace hydra
class MmioViewer;
Expand Down

0 comments on commit 57b8444

Please sign in to comment.