~riderius/cpp-code

df2a4df7d848b38423a754bb5c80d7c370683947 — RIDERIUS 8 months ago 16edc28
Add compilation flags
3 files changed, 9 insertions(+), 2 deletions(-)

M .gitignore
M CMakeLists.txt
A compile_commands.json
M .gitignore => .gitignore +4 -0
@@ 46,3 46,7 @@ Release/

#CMake
build/
.cmake/

#Clangd
.clangd/

M CMakeLists.txt => CMakeLists.txt +4 -2
@@ 2,6 2,9 @@ cmake_minimum_required(VERSION 3.5)
project(cpp_code)

set(CMAKE_CXX_STANDARD 17)
SET(MYCOMPILE_FLAGS "-pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused")
message(INFO " COMPILE_FLAGS: " ${MYCOMPILE_FLAGS})
add_definitions(${MYCOMPILE_FLAGS})

# Simple progs



@@ 17,6 20,5 @@ add_executable(codetime codetime.cpp)

# Curses progs

find_package(Curses)
add_executable(screensaver screensaver.cpp)
target_link_libraries(screensaver ${CURSES_LIBRARIES})
target_link_libraries(screensaver ncursesw)

A compile_commands.json => compile_commands.json +1 -0
@@ 0,0 1,1 @@
build/compile_commands.json
\ No newline at end of file