|
@@ -13,6 +13,7 @@ set(SRC
|
|
|
"src/Memory.c"
|
|
"src/Memory.c"
|
|
|
"src/SystemFunctions.c"
|
|
"src/SystemFunctions.c"
|
|
|
"src/Utils.c"
|
|
"src/Utils.c"
|
|
|
|
|
+ "src/Window.c"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
set(COMPILER_ARGUMENTS
|
|
set(COMPILER_ARGUMENTS
|
|
@@ -32,13 +33,18 @@ set(COMPILER_ARGUMENTS
|
|
|
-Winfinite-recursion -Wmissing-prototypes -Woverlength-strings
|
|
-Winfinite-recursion -Wmissing-prototypes -Woverlength-strings
|
|
|
-Wimplicit-fallthrough -Wmissing-declarations -Wmissing-include-dirs
|
|
-Wimplicit-fallthrough -Wmissing-declarations -Wmissing-include-dirs
|
|
|
-Wold-style-definition -Wdisabled-optimization -Wunused-const-variable
|
|
-Wold-style-definition -Wdisabled-optimization -Wunused-const-variable
|
|
|
- -Wlarger-than=1073741824 -Wdeprecated-non-prototype
|
|
|
|
|
|
|
+ -Wlarger-than=1073741824
|
|
|
-Wframe-larger-than=8388608 -Wmissing-variable-declarations
|
|
-Wframe-larger-than=8388608 -Wmissing-variable-declarations
|
|
|
- -Wzero-as-null-pointer-constant
|
|
|
|
|
-fdiagnostics-color=always -fstrict-flex-arrays=3
|
|
-fdiagnostics-color=always -fstrict-flex-arrays=3
|
|
|
-pedantic -pedantic-errors
|
|
-pedantic -pedantic-errors
|
|
|
)
|
|
)
|
|
|
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
|
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
|
|
|
|
+ if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 15.0)
|
|
|
|
|
+ set(COMPILER_ARGUMENTS ${COMPILER_ARGUMENTS}
|
|
|
|
|
+ -Wdeprecated-non-prototype
|
|
|
|
|
+ -Wzero-as-null-pointer-constant
|
|
|
|
|
+ )
|
|
|
|
|
+ endif()
|
|
|
set(COMPILER_ARGUMENTS ${COMPILER_ARGUMENTS}
|
|
set(COMPILER_ARGUMENTS ${COMPILER_ARGUMENTS}
|
|
|
-Walloc-zero -Wlogical-op -Wtrampolines
|
|
-Walloc-zero -Wlogical-op -Wtrampolines
|
|
|
-Wbidi-chars=any -Wduplicated-cond -Wnormalized=nfkc
|
|
-Wbidi-chars=any -Wduplicated-cond -Wnormalized=nfkc
|
|
@@ -54,10 +60,13 @@ elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|
|
-Wstrict-prototypes -Wbad-function-cast
|
|
-Wstrict-prototypes -Wbad-function-cast
|
|
|
-Wmissing-noreturn -Wextra-semi-stmt
|
|
-Wmissing-noreturn -Wextra-semi-stmt
|
|
|
-Wnested-externs -Wnarrowing
|
|
-Wnested-externs -Wnarrowing
|
|
|
|
|
+ -Wdeprecated-non-prototype -Wzero-as-null-pointer-constant
|
|
|
)
|
|
)
|
|
|
endif()
|
|
endif()
|
|
|
|
|
|
|
|
add_executable(${PROJECT_NAME} ${SRC})
|
|
add_executable(${PROJECT_NAME} ${SRC})
|
|
|
|
|
+add_subdirectory(thirdparty/glfw)
|
|
|
|
|
+target_link_libraries(${PROJECT_NAME} PRIVATE glfw GL)
|
|
|
target_compile_options(${PROJECT_NAME} PUBLIC ${COMPILER_ARGUMENTS})
|
|
target_compile_options(${PROJECT_NAME} PUBLIC ${COMPILER_ARGUMENTS})
|
|
|
|
|
|
|
|
add_executable(test test/Test.c)
|
|
add_executable(test test/Test.c)
|