Skip to content

Commit

Permalink
Added all compile warnings, warnings as errors
Browse files Browse the repository at this point in the history
  • Loading branch information
visrealm committed Sep 4, 2023
1 parent 4b749c8 commit 94f2ed9
Show file tree
Hide file tree
Showing 4 changed files with 416 additions and 450 deletions.
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,20 @@ if (NOT BUILD_SHARED_LIBS)
add_definitions(-DVR_EMU_LCD_STATIC)
endif()


project(vrEmuLcd)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/)

if (PROJECT_IS_TOP_LEVEL)
if(MSVC)
add_compile_options(/W4 /WX)
add_compile_options(/arch:AVX2 /Ox)
else()
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
add_compile_options(-march=native)
endif()
endif()

include(CTest)

add_subdirectory(src)
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

if (DEFINED EMSCRIPTEN)
if (PROJECT_IS_TOP_LEVEL AND DEFINED EMSCRIPTEN)
add_executable(vrEmuLcd vrEmuLcd.c)
set_target_properties(vrEmuLcd PROPERTIES COMPILE_FLAGS "-Os -s SIDE_MODULE=1 ")
set_target_properties(vrEmuLcd PROPERTIES LINK_FLAGS "-Os -s EXPORT_NAME='vrEmuLcdModule' -s EXPORTED_RUNTIME_METHODS=['ccall','cwrap'] --no-entry")
Expand Down
Loading

0 comments on commit 94f2ed9

Please sign in to comment.