diff --git a/CMakeLists.txt b/CMakeLists.txt index a0b78b6..49cd831 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,14 +63,6 @@ target_compile_features(_quicktex PUBLIC cxx_std_17 c_std_11) set_project_warnings(_quicktex) set_simd_flags(_quicktex) -# Clang-specific -if (CMAKE_CXX_COMPILER_ID MATCHES ".*Clang") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=undefined") - set(PROJECT_WARNINGS ${CLANG_WARNINGS}) -endif () - if (MSVC) target_compile_options(_quicktex PUBLIC /DWIN32_LEAN_AND_MEAN=1 /DNOMINMAX=1) # prevent windows macros from stepping on everything endif() diff --git a/tools/CompilerWarnings.cmake b/tools/CompilerWarnings.cmake index eee5c35..2f2cd05 100644 --- a/tools/CompilerWarnings.cmake +++ b/tools/CompilerWarnings.cmake @@ -37,6 +37,7 @@ function(set_project_warnings project_name) /w14928 # illegal copy-initialization; more than one user-defined # conversion has been implicitly applied /permissive- # standards conformance mode for MSVC compiler. + /wd4701 # uninitialized variable checker is trigger-happy ) set(CLANG_WARNINGS @@ -52,7 +53,7 @@ function(set_project_warnings project_name) -Wunused # warn on anything being unused -Woverloaded-virtual # warn if you overload (not override) a virtual # function -# -Wpedantic # warn if non-standard C++ is used + # -Wpedantic # warn if non-standard C++ is used #-Wconversion # warn on type conversions that may lose data #-Wsign-conversion # warn on sign conversions -Wnull-dereference # warn if a null dereference is detected @@ -74,7 +75,7 @@ function(set_project_warnings project_name) -Wduplicated-branches # warn if if / else branches have duplicated code -Wlogical-op # warn about logical operations being used where bitwise were # probably wanted - -Wuseless-cast # warn if you perform a cast to the same type + # -Wuseless-cast # warn if you perform a cast to the same type ) if (MSVC)