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(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(CorradeUtility INTERFACE -fno-strict-aliasing)
target_compile_options(OpenMP::OpenMP_Fortran INTERFACE "-fopenmp")
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(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(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(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)
target_compile_options(googletest::googletest
INTERFACE
${GMOCK_CFLAGS}
)
target_compile_options(${target}
PRIVATE
PUBLIC
${DEFAULT_COMPILE_OPTIONS}
INTERFACE
)
target_compile_options(gsl_tests_config INTERFACE
${GSL_CPLUSPLUS_OPT}
/EHsc
/W4
/WX
$<$<CXX_COMPILER_ID:MSVC>:
/wd4996 # Use of function or classes marked [[deprecated]]
/wd26409 # CppCoreCheck - GTest
/wd26426 # CppCoreCheck - GTest
/wd26440 # CppCoreCheck - GTest
/wd26446 # CppCoreCheck - prefer gsl::at()
/wd26472 # CppCoreCheck - use gsl::narrow(_cast)
/wd26481 # CppCoreCheck - use span instead of pointer arithmetic
$<$<VERSION_LESS:$<CXX_COMPILER_VERSION>,1920>: # VS2015
/wd4189 # variable is initialized but not referenced
$<$<NOT:$<CONFIG:Debug>>: # Release, RelWithDebInfo
/wd4702 # Unreachable code
>
>
>
$<$<CXX_COMPILER_ID:Clang>:
-Weverything
-Wfloat-equal
-Wno-c++98-compat
-Wno-c++98-compat-pedantic
-Wno-covered-switch-default # GTest
-Wno-deprecated-declarations # Allow tests for [[deprecated]] elements
-Wno-global-constructors # GTest
-Wno-language-extension-token # GTest gtest-port.h
-Wno-missing-braces
-Wno-missing-prototypes
-Wno-shift-sign-overflow # GTest gtest-port.h
-Wno-undef # GTest
-Wno-used-but-marked-unused # GTest EXPECT_DEATH
-Wno-switch-default # GTest EXPECT_DEATH
$<$<EQUAL:${GSL_CXX_STANDARD},14>: # no support for [[maybe_unused]]
-Wno-unused-member-function
-Wno-unused-variable
$<$<VERSION_EQUAL:$<CXX_COMPILER_VERSION>,15.0.1>:
-Wno-deprecated # False positive in MSVC Clang 15.0.1 raises a C++17 warning
>
>
>
)
target_compile_options(gsl_tests_config INTERFACE "-Wno-reserved-identifier")
target_compile_options(gsl_tests_config INTERFACE
-fno-strict-aliasing
-Wall
-Wcast-align
-Wconversion
-Wctor-dtor-privacy
-Werror
-Wextra
-Wpedantic
-Wshadow
-Wsign-conversion
-Wfloat-equal
-Wno-deprecated-declarations # Allow tests for [[deprecated]] elements
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:
-Weverything
-Wno-c++98-compat
-Wno-c++98-compat-pedantic
-Wno-missing-braces
-Wno-covered-switch-default # GTest
-Wno-global-constructors # GTest
-Wno-missing-prototypes
-Wno-padded
-Wno-switch-default
-Wno-unknown-attributes
-Wno-used-but-marked-unused # GTest EXPECT_DEATH
-Wno-weak-vtables
$<$<EQUAL:${GSL_CXX_STANDARD},14>: # no support for [[maybe_unused]]
-Wno-unused-member-function
-Wno-unused-variable
>
>
$<$<CXX_COMPILER_ID:Clang>:
$<$<AND:$<VERSION_GREATER:$<CXX_COMPILER_VERSION>,4.99>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,6>>:
$<$<EQUAL:${GSL_CXX_STANDARD},17>:-Wno-undefined-func-template>
>
$<$<AND:$<EQUAL:${GSL_CXX_STANDARD},20>,$<OR:$<CXX_COMPILER_VERSION:11.0.0>,$<CXX_COMPILER_VERSION:10.0.0>>>:
-Wno-zero-as-null-pointer-constant # failing Clang Ubuntu 20.04 tests, seems to be a bug with clang 10.0.0
# and clang 11.0.0. (operator< is being re-written by the compiler
# as operator<=> and raising the warning)
>
>
$<$<CXX_COMPILER_ID:AppleClang>:
$<$<AND:$<VERSION_GREATER:$<CXX_COMPILER_VERSION>,9.1>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,10>>:
$<$<EQUAL:${GSL_CXX_STANDARD},17>:-Wno-undefined-func-template>
>
>
$<$<CXX_COMPILER_ID:GNU>:
-Wdouble-promotion # float implicit to double
-Wlogical-op # suspicious uses of logical operators
$<$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,6>>:
-Wduplicated-cond # duplicated if-else conditions
-Wmisleading-indentation
-Wnull-dereference
$<$<EQUAL:${GSL_CXX_STANDARD},14>: # no support for [[maybe_unused]]
-Wno-unused-variable
>
>
$<$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,7>>:
-Wduplicated-branches # identical if-else branches
>
>
)
target_compile_options(gsl_tests_config INTERFACE "-Wno-unsafe-buffer-usage")
target_compile_options(gsl_tests_config_noexcept INTERFACE
${GSL_CPLUSPLUS_OPT}
/W4
/WX
$<$<CXX_COMPILER_ID:MSVC>:
/wd4577
/wd4702
/wd26440 # CppCoreCheck - GTest
/wd26446 # CppCoreCheck - prefer gsl::at()
>
$<$<CXX_COMPILER_ID:Clang>:
-Weverything
-Wfloat-equal
-Wno-c++98-compat
-Wno-c++98-compat-pedantic
-Wno-missing-prototypes
-Wno-unknown-attributes
$<$<EQUAL:${GSL_CXX_STANDARD},14>:
$<$<VERSION_EQUAL:$<CXX_COMPILER_VERSION>,15.0.1>:
-Wno-deprecated # False positive in MSVC Clang 15.0.1 raises a C++17 warning
>
>
>
)
target_compile_options(gsl_tests_config_noexcept INTERFACE "-Wno-reserved-identifier")
target_compile_options(gsl_tests_config_noexcept INTERFACE
-fno-exceptions
-fno-strict-aliasing
-Wall
-Wcast-align
-Wconversion
-Wctor-dtor-privacy
-Werror
-Wextra
-Wpedantic
-Wshadow
-Wsign-conversion
-Wfloat-equal
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:
-Weverything
-Wno-c++98-compat
-Wno-c++98-compat-pedantic
-Wno-missing-prototypes
-Wno-unknown-attributes
-Wno-weak-vtables
>
$<$<CXX_COMPILER_ID:GNU>:
-Wdouble-promotion # float implicit to double
-Wlogical-op # suspicious uses of logical operators
-Wuseless-cast # casting to its own type
$<$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,6>>:
-Wduplicated-cond # duplicated if-else conditions
-Wmisleading-indentation
-Wnull-dereference
>
$<$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,7>>:
-Wduplicated-branches # identical if-else branches
>
$<$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,8>>:
-Wcast-align=strict # increase alignment (i.e. char* to int*)
>
>
)
target_compile_options(gsl_tests_config_noexcept INTERFACE "-Wno-unsafe-buffer-usage")
target_compile_options(HighFiveFlags
INTERFACE
-fmax-errors=${HIGHFIVE_MAX_ERRORS}
)
target_compile_options(HighFiveFlags INTERFACE -fsanitize=${HIGHFIVE_SANITIZER})
target_compile_options(HighFiveWarnings
INTERFACE
-Wpedantic
-Wcast-align
-Wdouble-promotion
)
target_compile_options(HighFiveWarnings
INTERFACE
-ftemplate-backtrace-limit=0
)
target_compile_options(lager-dev INTERFACE
-fno-omit-frame-pointer -fsanitize=address)
target_compile_options(${NAME} INTERFACE ${TPL_COMPILE_OPTIONS})
target_compile_options(${PROJECT_NAME} INTERFACE
$<$<CXX_COMPILER_ID:MSVC>:/W4>
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall -Wextra -Wpedantic -Wconversion>)
target_compile_options(
avif_enable_warnings
INTERFACE /W4 # For clang-cl, /W4 enables -Wall and -Wextra
/wd4232 # Disable: address of dllimport 'dllimport' is not static,
# identity not guaranteed
/wd4324 # Disable: structure was padded due to alignment specifier
)
target_compile_options(avif_enable_warnings INTERFACE -Wall -Wextra)
target_compile_options(avif_enable_warnings INTERFACE /WX)
target_compile_options(iio_common_config INTERFACE -Wall -Wextra -pedantic -Wno-unused-parameter)
target_compile_options(${brlib}
INTERFACE ${PC_${BRPREFIX}_CFLAGS_OTHER})
target_compile_options(std::coroutines INTERFACE ${_CXX_COROUTINES_AWAIT})
target_compile_options(miniupnpc-private INTERFACE -Wall)
target_compile_options(
Sanitizer::${sanitizer_name}_${lang}
INTERFACE $<$<COMPILE_LANGUAGE:${lang}>:${SANITIZER_FLAG}>)
target_compile_options(sse2neon INTERFACE -Wno-unused-parameter)
target_compile_options(nanovdb INTERFACE
"$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wno-invalid-offsetof>"
"$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/bigobj>")
target_compile_options(nanovdb INTERFACE
"$<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:-arch=sm_75>")
target_compile_options(vdb_tool_common INTERFACE "$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/bigobj>")
target_compile_options(vdb_tool_common INTERFACE "$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/wd4251>")
target_compile_options(vdb_tool_common INTERFACE "$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/wd4267>")
target_compile_options(parsec
PRIVATE
$<$<COMPILE_LANGUAGE:C>:${PARSEC_SANITIZE_COMPILE_OPTIONS}>
INTERFACE
#for tests and examples
$<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:C>:${PARSEC_SANITIZE_COMPILE_OPTIONS}>>)
target_compile_options(qbt_common_cfg INTERFACE
-Wall
-Wextra
-Wcast-qual
-Wcast-align
-Winvalid-pch
-Woverloaded-virtual
-Wold-style-cast
-Wnon-virtual-dtor
-pedantic
-pedantic-errors
)
target_compile_options(qbt_common_cfg INTERFACE -Wstrict-null-sentinel)
target_compile_options(qbt_common_cfg INTERFACE
-Wno-range-loop-analysis
)
target_compile_options(qbt_common_cfg INTERFACE
/guard:cf
/permissive-
/utf-8
# https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
/Zc:__cplusplus
)
target_compile_options(
${target}
PRIVATE /interface /ifcOutput ${BMI}
INTERFACE /reference scn=${BMI}
)
target_compile_options(scn_sanitizer_asan INTERFACE ${ASAN_FLAG})
target_compile_options(scn_sanitizer_ubsan INTERFACE ${UBSAN_FLAG})
target_compile_options(scn_sanitizer_msan INTERFACE ${MSAN_FLAG})
target_compile_options(scn_sanitizer_stackprotect INTERFACE ${STACKPROTECT_FLAG})
target_compile_options(scn_tests_base INTERFACE
$<$<CXX_COMPILER_ID:GNU>:
-Wno-unused>
$<$<CXX_COMPILER_ID:Clang>:
-Wno-unused-variable
-Wno-used-but-marked-unused
-Wno-gnu-zero-variadic-macro-arguments
-Wno-global-constructors
-Wno-exit-time-destructors
-Wno-weak-vtables>
)
target_compile_options(score_lib_base INTERFACE
"SHELL:-Xclang -internal-isystem -Xclang ${SCORE_SDK}/include/x86_64-unknown-linux-gnu/c++/v1"
)
target_compile_options(score_lib_base INTERFACE
-std=c++20
-fPIC
)
target_compile_options(simdjson-internal-flags INTERFACE /W0 /sdl)
target_compile_options(soci_compiler_interface
INTERFACE
"$<${soci_cxx_source}:/W4>"
"$<${soci_cxx_source}:/we4266>"
)
target_compile_options(soci_compiler_interface INTERFACE "/nologo" "/bigobj" "/utf-8")
target_compile_options(soci_compiler_interface INTERFACE "-fsanitize=undefined")
target_compile_options(soci_compiler_interface INTERFACE "-fsanitize=address")
target_compile_options(soci_compiler_interface INTERFACE "$<${soci_cxx_source}:-Wno-variadic-macros>")
target_compile_options(MySQL INTERFACE ${MySQL_CFLAGS})
target_compile_options(${kaguya_lib} INTERFACE
-Wno-noexcept-type -Wno-ignored-qualifiers -Wno-unused-parameter)
target_compile_options(${luabridge_lib} INTERFACE
-Wno-noexcept-type -Wno-ignored-qualifiers -Wno-unused-parameter)
target_compile_options(${luwra_lib} INTERFACE
-Wno-noexcept-type -Wno-ignored-qualifiers -Wno-unused-parameter)
target_compile_options(${toluapp_lib}
PRIVATE -w
INTERFACE -Wno-noexcept-type
PUBLIC -Wno-ignored-qualifiers -Wno-unused-parameter)
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(ClangModules INTERFACE
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-vfsoverlay ${CMAKE_CURRENT_BINARY_DIR}/windows-sdk-overlay.yaml>")
target_compile_options(toml11 INTERFACE "/utf-8")
target_compile_options(toml11 INTERFACE "/Zc:preprocessor")
target_compile_options(transmission::gtk_impl
INTERFACE
${GTK${GTK_VERSION}_CFLAGS_OTHER})
target_compile_options(${NAME} INTERFACE ${TPL_COMPILE_OPTIONS})
TARGET_COMPILE_OPTIONS(${NAME} INTERFACE ${TPL_COMPILE_OPTIONS})
target_compile_options(viskores_compiler_flags INTERFACE $<$<COMPILE_LANGUAGE:CXX>:/Gy>)
target_compile_options(viskores_compiler_flags INTERFACE $<$<COMPILE_LANGUAGE:CXX>:/bigobj>)
target_compile_options(viskores_compiler_flags INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler="/bigobj">)
target_compile_options(viskores_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-Wno-pass-failed>)
target_compile_options(viskores_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=-wd4127>)
target_compile_options(viskores_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-wd1478 -wd13379>)
target_compile_options(viskores_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CXX>:${cxx_flags}>)
target_compile_options(viskores_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:${cuda_flags}>)
target_compile_options(viskores_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:${display_error_nums}>)
target_compile_options(viskores_vectorization_flags
INTERFACE $<$<COMPILE_LANGUAGE:CXX>:${flags}>
)