ddemidov/amgcl
CMakeLists.txt
:66
target_compile_options(amgcl INTERFACE ${OpenMP_CXX_FLAGS})
target_compile_options(amgcl INTERFACE ${OpenMP_CXX_FLAGS})
target_compile_options(amgcl INTERFACE
# Compiler is GNU (g++):
$<$<CXX_COMPILER_ID:GNU>:$<BUILD_INTERFACE:-Wall;-Wextra;-Wpedantic>>
# Compiler is Clang:
$<$<CXX_COMPILER_ID:Clang>:$<BUILD_INTERFACE:-Wall;-Wextra;-Wpedantic;-Wno-c99-extensions>>
# Compiler is MSVC:
$<$<CXX_COMPILER_ID:MSVC>:/bigobj>
$<$<CXX_COMPILER_ID:MSVC>:/wd4715>
)
TARGET_COMPILE_OPTIONS(assimp PRIVATE -Wall -Werror)
#target_compile_options(basis_encoder.js PRIVATE -fno-strict-aliasing -g -O1 -fsanitize=undefined -fsanitize=address)
target_compile_options(basis_encoder_threads.js PRIVATE -fno-strict-aliasing -O3 -matomics -mbulk-memory)
target_compile_options(basis_transcoder.js PRIVATE -O3 -fno-strict-aliasing)
target_compile_options(gtest_main PRIVATE "-w")
# target_compile_options(box2d PRIVATE)
target_compile_options(${target} PRIVATE /WX)
target_compile_options(CoverageHelper PRIVATE /W4 /w44265 /WX /w44061 /w44062)
target_compile_options(standard_settings INTERFACE "/FI${CMAKE_BINARY_DIR}/config.h")
target_compile_options(
standard_settings
INTERFACE -include ${CMAKE_BINARY_DIR}/config.h
)
target_compile_options(standard_settings INTERFACE --coverage -O0 -g)
target_compile_options(CGAL::pointmatcher_support INTERFACE "-D_USE_MATH_DEFINES")
target_compile_options(${target} INTERFACE -fsanitize=address)
target_compile_options(${target} INTERFACE
"-D_SCL_SECURE_NO_DEPRECATE;-D_SCL_SECURE_NO_WARNINGS")
target_compile_options(${target} INTERFACE "/fp:strict")
target_compile_options(${target} INTERFACE "$<$<COMPILE_LANGUAGE:CXX>:/fp:strict>")
target_compile_options(${target} INTERFACE
"-features=extensions;-library=stlport4;-D_GNU_SOURCE")
target_compile_options(${target} INTERFACE "-fno-strict-aliasing" )
target_compile_options(${target} INTERFACE "-DCGAL_DO_NOT_USE_BOOST_MP")
target_compile_options(${target} INTERFACE $<$<COMPILE_LANGUAGE:CXX>:${LIST_LEDA_CXX_FLAGS}>)
target_compile_options(${target} INTERFACE ${LIST_LEDA_DEFINITIONS})
target_compile_options( ${target} PUBLIC -DNOMINMAX -DCGAL_LINKED_WITH_TBB )
target_compile_options(Chrono_core PUBLIC $<$<COMPILE_LANGUAGE:CXX>:${SIMD_FLAGS}>)
target_compile_options(Chrono_core PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler="/Zc:__cplusplus">) # without this flag the memory alignment seems to be broken
target_compile_options(Chrono_core PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-m64>)
target_compile_options(Chrono_core PUBLIC $<$<COMPILE_LANGUAGE:CXX>:/W4>)
target_compile_options(Chrono_core PUBLIC $<$<COMPILE_LANGUAGE:CXX>:/wd4100>) # unreferenced formal parameter
target_compile_options(Chrono_core PUBLIC $<$<COMPILE_LANGUAGE:CXX>:/wd4127>) # conditional expression is constant
target_compile_options(Chrono_core PUBLIC $<$<COMPILE_LANGUAGE:CXX>:/wd4251>) # class needs to have dll-interface
target_compile_options(Chrono_core PUBLIC $<$<COMPILE_LANGUAGE:CXX>:/wd4324>) # structure padded due to alignment specifier
target_compile_options(Chrono_core PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=/wd4324>) # structure padded due to alignment specifier (CUDA)
target_compile_options(Chrono_core PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=/wd4996>) # WARNING: TODO: DARIOM: CUDA Deprecation: The type will be removed in the next major release
target_compile_options(Chrono_core PUBLIC $<$<COMPILE_LANGUAGE:CXX>:/wd26451>) # arithmetic overflow
target_compile_options(Chrono_core PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-Wint-in-bool-context>)
target_compile_options(Chrono_core PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-Wno-sign-compare>)
target_compile_options(Chrono_core PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-Wno-unused-function>)
target_compile_options(yaml-cpp PUBLIC $<$<COMPILE_LANGUAGE:CXX>:/wd4267>)
target_compile_options(Chrono_ros PUBLIC $<$<COMPILE_LANGUAGE:CXX>:/wd4661>)
target_compile_options(Chrono_ros PUBLIC $<$<COMPILE_LANGUAGE:CXX>:/wd4005>)
target_compile_options(core PRIVATE "/wd4275") # non-DLL-interface class used as base for DLL-interface class
target_compile_options(vehicle PRIVATE "/wd4456") # declaration hides previous local declaration
target_compile_options(robot PRIVATE "/wd4702") # unreachable code
target_compile_options(ros PRIVATE "/wd4275") # non-DLL-interface class used as base for DLL-interface class
target_compile_options(Chrono_synchrono PRIVATE $<$<COMPILE_LANGUAGE:CXX>:/wd4661>)
target_compile_options(${TEST_CJSON} PRIVATE "-fno-sanitize=float-divide-by-zero")
target_compile_options(sm1000v5 PRIVATE "-O3")
target_compile_options(CorradeUtility INTERFACE -fno-strict-aliasing)
target_compile_options(${target} PUBLIC "-fsanitize=address")
target_compile_options(cppdap-unittests PRIVATE "/wd4244")
target_compile_options(cppdap-fuzzer PUBLIC "-fsanitize=fuzzer,address")
target_compile_options(cppdap-fuzzer PUBLIC "-fsanitize=fuzzer,memory")
target_compile_options(cppdap-fuzzer PUBLIC "-fsanitize=fuzzer,thread")
target_compile_options(cppdap-fuzzer PUBLIC "-fsanitize=fuzzer")
target_compile_options(${dbcsr_program_name} PRIVATE ${OpenMP_CXX_FLAGS})
target_compile_options(OpenMP::OpenMP_Fortran INTERFACE "-fopenmp")
target_compile_options(${PROJECT_NAME} PRIVATE /Zc:__cplusplus /Zc:inline /fp:fast /Qdiag-disable:161)
target_compile_options(${PROJECT_NAME} PRIVATE /wd5262 /wd5264)
target_compile_options(${t} PRIVATE /Wall /GR-)
target_compile_options(${t} PRIVATE "/Qspectre")
target_compile_options(${t} PRIVATE ${WarningsEXE})
target_compile_options(${t} PRIVATE "-Wno-attributes")
target_compile_options(dlib PUBLIC ${active_preprocessor_switches})
target_compile_options(dlib PUBLIC $<$<COMPILE_LANGUAGE:CXX>:${active_compile_opts}>)
target_compile_options(disabled PRIVATE /wd4189) # local variable is initialized but not referenced
target_compile_options(disabled PRIVATE -Wno-unused-variable)
target_compile_options(doxyapp PRIVATE -stdlib=libc++)
target_compile_options(${project_name} PRIVATE ${COVERAGE_COMPILER_FLAGS})
target_compile_options(spdlog PUBLIC $<$<AND:$<CXX_COMPILER_ID:MSVC>,$<NOT:$<COMPILE_LANGUAGE:CUDA>>>:/wd4251
/wd4275>)
target_compile_options(spdlog_header_only INTERFACE "/Zc:__cplusplus")
target_compile_options(spdlog_header_only
INTERFACE $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:MSVC>>:/utf-8>)
target_compile_options(EnTT BEFORE INTERFACE -stdlib=libc++)
TARGET_COMPILE_OPTIONS(${BII_BLOCK_TARGET} INTERFACE -DGTEST_ENABLE_CATCH_EXCEPTIONS_=1)
TARGET_COMPILE_OPTIONS(${BII_LIB_TARGET} PUBLIC -DFANN_DLL_EXPORTS)
target_compile_options(${TARGET} PRIVATE $<$<CONFIG:RELEASE>:-DNDEBUG>)
target_compile_options(fast_float INTERFACE -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover=all)
target_compile_options(fast_float INTERFACE /permissive-)
target_compile_options(${TEST_NAME} PUBLIC -Werror -Wall -Wextra -Weffc++)
target_compile_options(FLAC BEFORE PRIVATE "/fp:fast")
target_compile_options(FLAC BEFORE PRIVATE -fassociative-math -fno-signed-zeros -fno-trapping-math -freciprocal-math)
target_compile_options(ProjectConfig
INTERFACE
/W4
$<$<BOOL:${FLATBUFFERS_STRICT_MODE}>:
/WX # Treat all compiler warnings as errors
>
/wd4512 # C4512: assignment operator could not be generated
/wd4316 # C4316: object allocated on the heap may not be aligned
/wd4456 # C4456: hides previous local declaration
$<$<CXX_COMPILER_ID:Clang>:
/D_CRT_SECURE_NO_WARNINGS
>
)
target_compile_options(ProjectConfig
INTERFACE
-Wall
$<$<BOOL:${FLATBUFFERS_STRICT_MODE}>:
-Werror # Treat all compiler warnings as errors
-fno-rtti # Disable runtime type information
$<$<CXX_COMPILER_ID:GNU>:
# False positive string overflow
# https://github.com/google/flatbuffers/issues/7366
-Wno-error=stringop-overflow
>
>
-pedantic
-Wextra
-Wno-unused-parameter
-Wold-style-cast
-fsigned-char
-Wnon-virtual-dtor
# This isn't working for some reason: $<$<CXX_COMPILER_ID:CLANG>:
$<$<BOOL:${IS_CLANG}>:
-Wnewline-eof
-Wno-unknown-warning-option
-Wmissing-declarations
-Wzero-as-null-pointer-constant
$<$<VERSION_GREATER:$<CXX_COMPILER_VERSION>,3.8>:
-Wimplicit-fallthrough
-Wextra-semi
$<$<BOOL:${FLATBUFFERS_STRICT_MODE}>:
-Werror=unused-private-field
>
>
>
$<$<CXX_COMPILER_ID:GNU>:
$<$<VERSION_GREATER:$<CXX_COMPILER_VERSION>,4.4>:
-Wunused-result
-Wunused-parameter
-Werror=unused-parameter
-Wmissing-declarations
>
$<$<VERSION_GREATER:$<CXX_COMPILER_VERSION>,4.7>:
-Wzero-as-null-pointer-constant
>
$<$<VERSION_GREATER:$<CXX_COMPILER_VERSION>,7.0>:
-faligned-new
$<$<BOOL:${FLATBUFFERS_STRICT_MODE}>:
-Werror=implicit-fallthrough=2
>
>
$<$<VERSION_GREATER:$<CXX_COMPILER_VERSION>,8.0>:
-Wextra-semi
>
>
$<$<BOOL:${FLATBUFFERS_CODE_COVERAGE}>:
-g
-fprofile-arcs
-ftest-coverage
>
)
target_compile_options(flatbenchmark
PRIVATE
-fno-aligned-new
-Wno-deprecated-declarations
)
target_compile_options(flint PUBLIC "-mpopcnt")
target_compile_options(fltk_z PRIVATE ${msvc_warnings})
target_compile_options ( fluidsynth-assetloader
PRIVATE -v
PRIVATE -Wall
PRIVATE "$<$<CONFIG:DEBUG>:-Werror>") # Only include -Werror when building debug config
target_compile_options(header-only-test PRIVATE ${PEDANTIC_COMPILE_FLAGS})
target_compile_options(${THETARGET}
PUBLIC
/EHs # Don't catch structured exceptions with catch (...)
/GF # There are bugs with constexpr StringPiece when string pooling is disabled.
/Zc:referenceBinding # Disallow temporaries from binding to non-const lvalue references.
/Zc:rvalueCast # Enforce the standard rules for explicit type conversion.
/Zc:implicitNoexcept # Enable implicit noexcept specifications where required, such as destructors.
/Zc:strictStrings # Don't allow conversion from a string literal to mutable characters.
/Zc:threadSafeInit # Enable thread-safe function-local statics initialization.
/Zc:throwingNew # Assume operator new throws on failure.
/permissive- # Be mean, don't allow bad non-standard stuff (C++/CLI, __declspec, etc. are all left intact).
/std:${MSVC_LANGUAGE_VERSION} # Build in the requested version of C++
/utf-8 # fmt needs unicode support, which requires compiling with /utf-8
PRIVATE
/bigobj # Support objects with > 65k sections. Needed due to templates.
/favor:${MSVC_FAVORED_ARCHITECTURE} # Architecture to prefer when generating code.
/Zc:inline # Have the compiler eliminate unreferenced COMDAT functions and data before emitting the object file.
$<$<BOOL:${MSVC_ENABLE_ALL_WARNINGS}>:/Wall> # Enable all warnings if requested.
$<$<BOOL:${MSVC_ENABLE_PARALLEL_BUILD}>:/MP> # Enable multi-processor compilation if requested.
$<$<BOOL:${MSVC_ENABLE_STATIC_ANALYSIS}>:/analyze> # Enable static analysis if requested.
# Debug builds
$<$<CONFIG:DEBUG>:
/Gy- # Disable function level linking.
$<$<BOOL:${MSVC_ENABLE_DEBUG_INLINING}>:/Ob2> # Add /Ob2 if allowing inlining in debug mode.
>
# Non-debug builds
$<$<NOT:$<CONFIG:DEBUG>>:
/Gw # Optimize global data. (-fdata-sections)
/Gy # Enable function level linking. (-ffunction-sections)
/Qpar # Enable parallel code generation.
/Oi # Enable intrinsic functions.
/Ot # Favor fast code.
$<$<BOOL:${MSVC_ENABLE_LTCG}>:/GL> # Enable link time code generation.
>
)
target_compile_options(gdal_unit_test PRIVATE -O0)
target_compile_options(testssse3 PRIVATE ${GDAL_SSSE3_FLAG})
target_compile_options(testavx2 PRIVATE ${GDAL_AVX2_FLAG})
target_compile_options(${_TARGET} PRIVATE ${_res})
target_compile_options(${_target} PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${GDAL_CXX_WARNING_FLAGS}>
$<$<COMPILE_LANGUAGE:C>:${GDAL_C_WARNING_FLAGS}>)
target_compile_options(libtiff_jpeg PRIVATE /wd4324)
target_compile_options(libz PRIVATE ${GDAL_C_WARNING_FLAGS})
target_compile_options(ogrsf_generic PRIVATE ${GDAL_CXX_WARNING_FLAGS} ${WFLAG_OLD_STYLE_CAST} ${WFLAG_EFFCXX})
target_compile_options(cpl PRIVATE ${GDAL_CXX_WARNING_FLAGS} ${WFLAG_OLD_STYLE_CAST} ${WFLAG_EFFCXX})
target_compile_options(geos_developer_cxx_flags
INTERFACE
$<$<CXX_COMPILER_ID:MSVC>:-W4> # consider -analyze
$<$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Werror -pedantic -Wall -Wextra -Wno-long-long -Wcast-align -Wconversion -Wsign-conversion -Wchar-subscripts -Wdouble-promotion -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wuninitialized -Wunused-parameter -fno-common>
$<$<CXX_COMPILER_ID:GNU>:-fno-implicit-inline-templates -Wno-psabi -Wsuggest-attribute=format>
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wno-unknown-warning-option>
)
target_compile_options(geos_developer_cxx_flags INTERFACE -Wsuggest-override)