Skip to content

Commit

Permalink
Still straned at the airport so there is notheng better to do than re…
Browse files Browse the repository at this point in the history
…ading cpp-best-practices and adding helpuffll compialtion flags and documentation
  • Loading branch information
KSkwarczynski committed Jul 14, 2024
1 parent 45ab283 commit 1596fa8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ endif()
# Custom commands
set( CMAKE_EXPORT_COMPILE_COMMANDS ON )

#Compile and link options
#KS: Add -Werror and maybe -Wconversion in the future
# KS: Compile and link options for more see https://github.com/cpp-best-practices/cppbestpractices/tree/master
target_compile_options(MaCh3CompilerOptions INTERFACE
-g # Generate debug information
-Wextra # Enable extra warning flags
Expand All @@ -86,6 +85,11 @@ target_compile_options(MaCh3CompilerOptions INTERFACE
-Wuninitialized # Warn about uninitialized variables
-Wnon-virtual-dtor # Warn when a class with virtual functions has a non-virtual destructor
-Woverloaded-virtual # Warn when a function declaration hides a virtual function from a base class
-Wnull-dereference # Warn if a null dereference is detected
-Wformat=2 # Warn on security issues around functions that format output (ie printf)
#-Wold-style-cast # Warn for c-style casts
#-Wconversion # Warn on type conversions that may lose data
#-Werror # Treat Warnings as Errors
)
#KS: If Debug is not defined disable it by default
DefineEnabledRequiredSwitch(MaCh3_DEBUG_ENABLED FALSE)
Expand Down

0 comments on commit 1596fa8

Please sign in to comment.