Skip to content

Commit

Permalink
Thunder: more warning flags added (#1685)
Browse files Browse the repository at this point in the history
Co-authored-by: Pierre Wielders <[email protected]>
  • Loading branch information
HaseenaSainul and pwielders authored Jul 5, 2024
1 parent 0994d3b commit 8968d50
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,21 @@ endif()

if(ENABLE_STRICT_COMPILER_SETTINGS)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
message(STATUS "Compiling with Clang")
set(CMAKE_STRICT_COMPILER_SETTINGS "-Wall -Wextra -Wpedantic")
set(CMAKE_STRICT_CXX_COMPILER_SETTINGS "${CMAKE_STRICT_COMPILER_SETTINGS} -Wnon-virtual-dtor")
message(FATAL_ERROR "Compiling with Clang")
set(CMAKE_STRICT_COMPILER_SETTINGS "-Weverything -Wextra -Wpedantic -Werror")
set(CMAKE_STRICT_CXX_COMPILER_SETTINGS "${CMAKE_STRICT_COMPILER_SETTINGS} -Wnon-virtual-dtor -Wmisleading-indentation")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 12)
set(CMAKE_STRICT_CXX_COMPILER_SETTINGS "${CMAKE_STRICT_CXX_COMPILER_SETTINGS} -Wrange-loop-construct")
endif()

elseif(${CMAKE_COMPILER_IS_GNUCXX})
message(STATUS "Compiling with GCC")
set(CMAKE_STRICT_COMPILER_SETTINGS "-Wall -Wextra -Wpedantic -Werror")
set(CMAKE_STRICT_CXX_COMPILER_SETTINGS "${CMAKE_STRICT_COMPILER_SETTINGS} -Wnon-virtual-dtor")
set(CMAKE_STRICT_CXX_COMPILER_SETTINGS "${CMAKE_STRICT_COMPILER_SETTINGS} -Wnon-virtual-dtor -Wmisleading-indentation")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 12)
set(CMAKE_STRICT_CXX_COMPILER_SETTINGS "${CMAKE_STRICT_CXX_COMPILER_SETTINGS} -Wrange-loop-construct")
endif()

elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
message(STATUS "Compiling with MS Visual Studio")
set(CMAKE_STRICT_COMPILER_SETTINGS "/W4")
Expand Down

0 comments on commit 8968d50

Please sign in to comment.