# File generated with https://github.com/jonathanpoelen/cpp-compiler-options

set(_JLN_COLOR_VALUES default auto never always)
set(_JLN_CONTROL_FLOW_VALUES default off on branch return allow_bugs)
set(_JLN_COVERAGE_VALUES default off on)
set(_JLN_CPU_VALUES default generic native)
set(_JLN_DEBUG_VALUES default off on line_tables_only gdb lldb sce)
set(_JLN_DIAGNOSTICS_FORMAT_VALUES default fixits patch print_source_range_info)
set(_JLN_DIAGNOSTICS_SHOW_TEMPLATE_TREE_VALUES default off on)
set(_JLN_ELIDE_TYPE_VALUES default off on)
set(_JLN_EXCEPTIONS_VALUES default off on)
set(_JLN_FIX_COMPILER_ERROR_VALUES default off on)
set(_JLN_LINKER_VALUES default bfd gold lld native)
set(_JLN_LTO_VALUES default off on fat thin)
set(_JLN_MSVC_ISYSTEM_VALUES default anglebrackets include_and_caexcludepath)
set(_JLN_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL_VALUES default off on)
set(_JLN_OPTIMIZATION_VALUES default 0 g 1 2 3 fast size)
set(_JLN_PEDANTIC_VALUES default off on as_error)
set(_JLN_PIE_VALUES default off on pic)
set(_JLN_RELRO_VALUES default off on full)
set(_JLN_REPRODUCIBLE_BUILD_WARNINGS_VALUES default off on)
set(_JLN_RTTI_VALUES default off on)
set(_JLN_SANITIZERS_VALUES default off on)
set(_JLN_SANITIZERS_EXTRA_VALUES default off thread pointer)
set(_JLN_SHADOW_WARNINGS_VALUES default off on local compatible_local all)
set(_JLN_STACK_PROTECTOR_VALUES default off on strong all)
set(_JLN_STL_DEBUG_VALUES default off on allow_broken_abi allow_broken_abi_and_bugs assert_as_exception)
set(_JLN_STL_FIX_VALUES default off on)
set(_JLN_SUGGESTIONS_VALUES default off on)
set(_JLN_WARNINGS_VALUES default off on strict very_strict)
set(_JLN_WARNINGS_AS_ERROR_VALUES default off on basic)
set(_JLN_WHOLE_PROGRAM_VALUES default off on strip_all)
set(_JLN_VERBOSE_VALUES on off)
set(_JLN_AUTO_PROFILE_VALUES on off)
set(_JLN_DISABLE_OTHERS_VALUES on off)


set(JLN_COLOR "${JLN_COLOR}" CACHE STRING "")
if(NOT("${JLN_COLOR}" STREQUAL ""))
  string(TOLOWER "${JLN_COLOR}" JLN_COLOR)
  if(NOT(("default" STREQUAL JLN_COLOR) OR ("auto" STREQUAL JLN_COLOR) OR ("never" STREQUAL JLN_COLOR) OR ("always" STREQUAL JLN_COLOR)))
    message(FATAL_ERROR "Unknow value \"${JLN_COLOR}\" for JLN_COLOR, expected: default, auto, never, always")
  endif()
endif()
set(JLN_CONTROL_FLOW "${JLN_CONTROL_FLOW}" CACHE STRING "")
if(NOT("${JLN_CONTROL_FLOW}" STREQUAL ""))
  string(TOLOWER "${JLN_CONTROL_FLOW}" JLN_CONTROL_FLOW)
  if(NOT(("default" STREQUAL JLN_CONTROL_FLOW) OR ("off" STREQUAL JLN_CONTROL_FLOW) OR ("on" STREQUAL JLN_CONTROL_FLOW) OR ("branch" STREQUAL JLN_CONTROL_FLOW) OR ("return" STREQUAL JLN_CONTROL_FLOW) OR ("allow_bugs" STREQUAL JLN_CONTROL_FLOW)))
    message(FATAL_ERROR "Unknow value \"${JLN_CONTROL_FLOW}\" for JLN_CONTROL_FLOW, expected: default, off, on, branch, return, allow_bugs")
  endif()
endif()
set(JLN_COVERAGE "${JLN_COVERAGE}" CACHE STRING "")
if(NOT("${JLN_COVERAGE}" STREQUAL ""))
  string(TOLOWER "${JLN_COVERAGE}" JLN_COVERAGE)
  if(NOT(("default" STREQUAL JLN_COVERAGE) OR ("off" STREQUAL JLN_COVERAGE) OR ("on" STREQUAL JLN_COVERAGE)))
    message(FATAL_ERROR "Unknow value \"${JLN_COVERAGE}\" for JLN_COVERAGE, expected: default, off, on")
  endif()
endif()
set(JLN_CPU "${JLN_CPU}" CACHE STRING "")
if(NOT("${JLN_CPU}" STREQUAL ""))
  string(TOLOWER "${JLN_CPU}" JLN_CPU)
  if(NOT(("default" STREQUAL JLN_CPU) OR ("generic" STREQUAL JLN_CPU) OR ("native" STREQUAL JLN_CPU)))
    message(FATAL_ERROR "Unknow value \"${JLN_CPU}\" for JLN_CPU, expected: default, generic, native")
  endif()
endif()
set(JLN_DEBUG "${JLN_DEBUG}" CACHE STRING "")
if(NOT("${JLN_DEBUG}" STREQUAL ""))
  string(TOLOWER "${JLN_DEBUG}" JLN_DEBUG)
  if(NOT(("default" STREQUAL JLN_DEBUG) OR ("off" STREQUAL JLN_DEBUG) OR ("on" STREQUAL JLN_DEBUG) OR ("line_tables_only" STREQUAL JLN_DEBUG) OR ("gdb" STREQUAL JLN_DEBUG) OR ("lldb" STREQUAL JLN_DEBUG) OR ("sce" STREQUAL JLN_DEBUG)))
    message(FATAL_ERROR "Unknow value \"${JLN_DEBUG}\" for JLN_DEBUG, expected: default, off, on, line_tables_only, gdb, lldb, sce")
  endif()
endif()
set(JLN_DIAGNOSTICS_FORMAT "${JLN_DIAGNOSTICS_FORMAT}" CACHE STRING "")
if(NOT("${JLN_DIAGNOSTICS_FORMAT}" STREQUAL ""))
  string(TOLOWER "${JLN_DIAGNOSTICS_FORMAT}" JLN_DIAGNOSTICS_FORMAT)
  if(NOT(("default" STREQUAL JLN_DIAGNOSTICS_FORMAT) OR ("fixits" STREQUAL JLN_DIAGNOSTICS_FORMAT) OR ("patch" STREQUAL JLN_DIAGNOSTICS_FORMAT) OR ("print_source_range_info" STREQUAL JLN_DIAGNOSTICS_FORMAT)))
    message(FATAL_ERROR "Unknow value \"${JLN_DIAGNOSTICS_FORMAT}\" for JLN_DIAGNOSTICS_FORMAT, expected: default, fixits, patch, print_source_range_info")
  endif()
endif()
set(JLN_DIAGNOSTICS_SHOW_TEMPLATE_TREE "${JLN_DIAGNOSTICS_SHOW_TEMPLATE_TREE}" CACHE STRING "")
if(NOT("${JLN_DIAGNOSTICS_SHOW_TEMPLATE_TREE}" STREQUAL ""))
  string(TOLOWER "${JLN_DIAGNOSTICS_SHOW_TEMPLATE_TREE}" JLN_DIAGNOSTICS_SHOW_TEMPLATE_TREE)
  if(NOT(("default" STREQUAL JLN_DIAGNOSTICS_SHOW_TEMPLATE_TREE) OR ("off" STREQUAL JLN_DIAGNOSTICS_SHOW_TEMPLATE_TREE) OR ("on" STREQUAL JLN_DIAGNOSTICS_SHOW_TEMPLATE_TREE)))
    message(FATAL_ERROR "Unknow value \"${JLN_DIAGNOSTICS_SHOW_TEMPLATE_TREE}\" for JLN_DIAGNOSTICS_SHOW_TEMPLATE_TREE, expected: default, off, on")
  endif()
endif()
set(JLN_ELIDE_TYPE "${JLN_ELIDE_TYPE}" CACHE STRING "")
if(NOT("${JLN_ELIDE_TYPE}" STREQUAL ""))
  string(TOLOWER "${JLN_ELIDE_TYPE}" JLN_ELIDE_TYPE)
  if(NOT(("default" STREQUAL JLN_ELIDE_TYPE) OR ("off" STREQUAL JLN_ELIDE_TYPE) OR ("on" STREQUAL JLN_ELIDE_TYPE)))
    message(FATAL_ERROR "Unknow value \"${JLN_ELIDE_TYPE}\" for JLN_ELIDE_TYPE, expected: default, off, on")
  endif()
endif()
set(JLN_EXCEPTIONS "${JLN_EXCEPTIONS}" CACHE STRING "")
if(NOT("${JLN_EXCEPTIONS}" STREQUAL ""))
  string(TOLOWER "${JLN_EXCEPTIONS}" JLN_EXCEPTIONS)
  if(NOT(("default" STREQUAL JLN_EXCEPTIONS) OR ("off" STREQUAL JLN_EXCEPTIONS) OR ("on" STREQUAL JLN_EXCEPTIONS)))
    message(FATAL_ERROR "Unknow value \"${JLN_EXCEPTIONS}\" for JLN_EXCEPTIONS, expected: default, off, on")
  endif()
endif()
set(JLN_FIX_COMPILER_ERROR "${JLN_FIX_COMPILER_ERROR}" CACHE STRING "")
if(NOT("${JLN_FIX_COMPILER_ERROR}" STREQUAL ""))
  string(TOLOWER "${JLN_FIX_COMPILER_ERROR}" JLN_FIX_COMPILER_ERROR)
  if(NOT(("default" STREQUAL JLN_FIX_COMPILER_ERROR) OR ("off" STREQUAL JLN_FIX_COMPILER_ERROR) OR ("on" STREQUAL JLN_FIX_COMPILER_ERROR)))
    message(FATAL_ERROR "Unknow value \"${JLN_FIX_COMPILER_ERROR}\" for JLN_FIX_COMPILER_ERROR, expected: default, off, on")
  endif()
endif()
set(JLN_LINKER "${JLN_LINKER}" CACHE STRING "")
if(NOT("${JLN_LINKER}" STREQUAL ""))
  string(TOLOWER "${JLN_LINKER}" JLN_LINKER)
  if(NOT(("default" STREQUAL JLN_LINKER) OR ("bfd" STREQUAL JLN_LINKER) OR ("gold" STREQUAL JLN_LINKER) OR ("lld" STREQUAL JLN_LINKER) OR ("native" STREQUAL JLN_LINKER)))
    message(FATAL_ERROR "Unknow value \"${JLN_LINKER}\" for JLN_LINKER, expected: default, bfd, gold, lld, native")
  endif()
endif()
set(JLN_LTO "${JLN_LTO}" CACHE STRING "")
if(NOT("${JLN_LTO}" STREQUAL ""))
  string(TOLOWER "${JLN_LTO}" JLN_LTO)
  if(NOT(("default" STREQUAL JLN_LTO) OR ("off" STREQUAL JLN_LTO) OR ("on" STREQUAL JLN_LTO) OR ("fat" STREQUAL JLN_LTO) OR ("thin" STREQUAL JLN_LTO)))
    message(FATAL_ERROR "Unknow value \"${JLN_LTO}\" for JLN_LTO, expected: default, off, on, fat, thin")
  endif()
endif()
set(JLN_MSVC_ISYSTEM "${JLN_MSVC_ISYSTEM}" CACHE STRING "")
if(NOT("${JLN_MSVC_ISYSTEM}" STREQUAL ""))
  string(TOLOWER "${JLN_MSVC_ISYSTEM}" JLN_MSVC_ISYSTEM)
  if(NOT(("default" STREQUAL JLN_MSVC_ISYSTEM) OR ("anglebrackets" STREQUAL JLN_MSVC_ISYSTEM) OR ("include_and_caexcludepath" STREQUAL JLN_MSVC_ISYSTEM)))
    message(FATAL_ERROR "Unknow value \"${JLN_MSVC_ISYSTEM}\" for JLN_MSVC_ISYSTEM, expected: default, anglebrackets, include_and_caexcludepath")
  endif()
endif()
set(JLN_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL "${JLN_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL}" CACHE STRING "")
if(NOT("${JLN_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL}" STREQUAL ""))
  string(TOLOWER "${JLN_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL}" JLN_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL)
  if(NOT(("default" STREQUAL JLN_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL) OR ("off" STREQUAL JLN_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL) OR ("on" STREQUAL JLN_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL)))
    message(FATAL_ERROR "Unknow value \"${JLN_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL}\" for JLN_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL, expected: default, off, on")
  endif()
endif()
set(JLN_OPTIMIZATION "${JLN_OPTIMIZATION}" CACHE STRING "")
if(NOT("${JLN_OPTIMIZATION}" STREQUAL ""))
  string(TOLOWER "${JLN_OPTIMIZATION}" JLN_OPTIMIZATION)
  if(NOT(("default" STREQUAL JLN_OPTIMIZATION) OR ("0" STREQUAL JLN_OPTIMIZATION) OR ("g" STREQUAL JLN_OPTIMIZATION) OR ("1" STREQUAL JLN_OPTIMIZATION) OR ("2" STREQUAL JLN_OPTIMIZATION) OR ("3" STREQUAL JLN_OPTIMIZATION) OR ("fast" STREQUAL JLN_OPTIMIZATION) OR ("size" STREQUAL JLN_OPTIMIZATION)))
    message(FATAL_ERROR "Unknow value \"${JLN_OPTIMIZATION}\" for JLN_OPTIMIZATION, expected: default, 0, g, 1, 2, 3, fast, size")
  endif()
endif()
set(JLN_PEDANTIC "${JLN_PEDANTIC}" CACHE STRING "")
if(NOT("${JLN_PEDANTIC}" STREQUAL ""))
  string(TOLOWER "${JLN_PEDANTIC}" JLN_PEDANTIC)
  if(NOT(("default" STREQUAL JLN_PEDANTIC) OR ("off" STREQUAL JLN_PEDANTIC) OR ("on" STREQUAL JLN_PEDANTIC) OR ("as_error" STREQUAL JLN_PEDANTIC)))
    message(FATAL_ERROR "Unknow value \"${JLN_PEDANTIC}\" for JLN_PEDANTIC, expected: default, off, on, as_error")
  endif()
endif()
set(JLN_PIE "${JLN_PIE}" CACHE STRING "")
if(NOT("${JLN_PIE}" STREQUAL ""))
  string(TOLOWER "${JLN_PIE}" JLN_PIE)
  if(NOT(("default" STREQUAL JLN_PIE) OR ("off" STREQUAL JLN_PIE) OR ("on" STREQUAL JLN_PIE) OR ("pic" STREQUAL JLN_PIE)))
    message(FATAL_ERROR "Unknow value \"${JLN_PIE}\" for JLN_PIE, expected: default, off, on, pic")
  endif()
endif()
set(JLN_RELRO "${JLN_RELRO}" CACHE STRING "")
if(NOT("${JLN_RELRO}" STREQUAL ""))
  string(TOLOWER "${JLN_RELRO}" JLN_RELRO)
  if(NOT(("default" STREQUAL JLN_RELRO) OR ("off" STREQUAL JLN_RELRO) OR ("on" STREQUAL JLN_RELRO) OR ("full" STREQUAL JLN_RELRO)))
    message(FATAL_ERROR "Unknow value \"${JLN_RELRO}\" for JLN_RELRO, expected: default, off, on, full")
  endif()
endif()
set(JLN_REPRODUCIBLE_BUILD_WARNINGS "${JLN_REPRODUCIBLE_BUILD_WARNINGS}" CACHE STRING "")
if(NOT("${JLN_REPRODUCIBLE_BUILD_WARNINGS}" STREQUAL ""))
  string(TOLOWER "${JLN_REPRODUCIBLE_BUILD_WARNINGS}" JLN_REPRODUCIBLE_BUILD_WARNINGS)
  if(NOT(("default" STREQUAL JLN_REPRODUCIBLE_BUILD_WARNINGS) OR ("off" STREQUAL JLN_REPRODUCIBLE_BUILD_WARNINGS) OR ("on" STREQUAL JLN_REPRODUCIBLE_BUILD_WARNINGS)))
    message(FATAL_ERROR "Unknow value \"${JLN_REPRODUCIBLE_BUILD_WARNINGS}\" for JLN_REPRODUCIBLE_BUILD_WARNINGS, expected: default, off, on")
  endif()
endif()
set(JLN_RTTI "${JLN_RTTI}" CACHE STRING "")
if(NOT("${JLN_RTTI}" STREQUAL ""))
  string(TOLOWER "${JLN_RTTI}" JLN_RTTI)
  if(NOT(("default" STREQUAL JLN_RTTI) OR ("off" STREQUAL JLN_RTTI) OR ("on" STREQUAL JLN_RTTI)))
    message(FATAL_ERROR "Unknow value \"${JLN_RTTI}\" for JLN_RTTI, expected: default, off, on")
  endif()
endif()
set(JLN_SANITIZERS "${JLN_SANITIZERS}" CACHE STRING "")
if(NOT("${JLN_SANITIZERS}" STREQUAL ""))
  string(TOLOWER "${JLN_SANITIZERS}" JLN_SANITIZERS)
  if(NOT(("default" STREQUAL JLN_SANITIZERS) OR ("off" STREQUAL JLN_SANITIZERS) OR ("on" STREQUAL JLN_SANITIZERS)))
    message(FATAL_ERROR "Unknow value \"${JLN_SANITIZERS}\" for JLN_SANITIZERS, expected: default, off, on")
  endif()
endif()
set(JLN_SANITIZERS_EXTRA "${JLN_SANITIZERS_EXTRA}" CACHE STRING "")
if(NOT("${JLN_SANITIZERS_EXTRA}" STREQUAL ""))
  string(TOLOWER "${JLN_SANITIZERS_EXTRA}" JLN_SANITIZERS_EXTRA)
  if(NOT(("default" STREQUAL JLN_SANITIZERS_EXTRA) OR ("off" STREQUAL JLN_SANITIZERS_EXTRA) OR ("thread" STREQUAL JLN_SANITIZERS_EXTRA) OR ("pointer" STREQUAL JLN_SANITIZERS_EXTRA)))
    message(FATAL_ERROR "Unknow value \"${JLN_SANITIZERS_EXTRA}\" for JLN_SANITIZERS_EXTRA, expected: default, off, thread, pointer")
  endif()
endif()
set(JLN_SHADOW_WARNINGS "${JLN_SHADOW_WARNINGS}" CACHE STRING "")
if(NOT("${JLN_SHADOW_WARNINGS}" STREQUAL ""))
  string(TOLOWER "${JLN_SHADOW_WARNINGS}" JLN_SHADOW_WARNINGS)
  if(NOT(("default" STREQUAL JLN_SHADOW_WARNINGS) OR ("off" STREQUAL JLN_SHADOW_WARNINGS) OR ("on" STREQUAL JLN_SHADOW_WARNINGS) OR ("local" STREQUAL JLN_SHADOW_WARNINGS) OR ("compatible_local" STREQUAL JLN_SHADOW_WARNINGS) OR ("all" STREQUAL JLN_SHADOW_WARNINGS)))
    message(FATAL_ERROR "Unknow value \"${JLN_SHADOW_WARNINGS}\" for JLN_SHADOW_WARNINGS, expected: default, off, on, local, compatible_local, all")
  endif()
endif()
set(JLN_STACK_PROTECTOR "${JLN_STACK_PROTECTOR}" CACHE STRING "")
if(NOT("${JLN_STACK_PROTECTOR}" STREQUAL ""))
  string(TOLOWER "${JLN_STACK_PROTECTOR}" JLN_STACK_PROTECTOR)
  if(NOT(("default" STREQUAL JLN_STACK_PROTECTOR) OR ("off" STREQUAL JLN_STACK_PROTECTOR) OR ("on" STREQUAL JLN_STACK_PROTECTOR) OR ("strong" STREQUAL JLN_STACK_PROTECTOR) OR ("all" STREQUAL JLN_STACK_PROTECTOR)))
    message(FATAL_ERROR "Unknow value \"${JLN_STACK_PROTECTOR}\" for JLN_STACK_PROTECTOR, expected: default, off, on, strong, all")
  endif()
endif()
set(JLN_STL_DEBUG "${JLN_STL_DEBUG}" CACHE STRING "")
if(NOT("${JLN_STL_DEBUG}" STREQUAL ""))
  string(TOLOWER "${JLN_STL_DEBUG}" JLN_STL_DEBUG)
  if(NOT(("default" STREQUAL JLN_STL_DEBUG) OR ("off" STREQUAL JLN_STL_DEBUG) OR ("on" STREQUAL JLN_STL_DEBUG) OR ("allow_broken_abi" STREQUAL JLN_STL_DEBUG) OR ("allow_broken_abi_and_bugs" STREQUAL JLN_STL_DEBUG) OR ("assert_as_exception" STREQUAL JLN_STL_DEBUG)))
    message(FATAL_ERROR "Unknow value \"${JLN_STL_DEBUG}\" for JLN_STL_DEBUG, expected: default, off, on, allow_broken_abi, allow_broken_abi_and_bugs, assert_as_exception")
  endif()
endif()
set(JLN_STL_FIX "${JLN_STL_FIX}" CACHE STRING "")
if(NOT("${JLN_STL_FIX}" STREQUAL ""))
  string(TOLOWER "${JLN_STL_FIX}" JLN_STL_FIX)
  if(NOT(("default" STREQUAL JLN_STL_FIX) OR ("off" STREQUAL JLN_STL_FIX) OR ("on" STREQUAL JLN_STL_FIX)))
    message(FATAL_ERROR "Unknow value \"${JLN_STL_FIX}\" for JLN_STL_FIX, expected: default, off, on")
  endif()
endif()
set(JLN_SUGGESTIONS "${JLN_SUGGESTIONS}" CACHE STRING "")
if(NOT("${JLN_SUGGESTIONS}" STREQUAL ""))
  string(TOLOWER "${JLN_SUGGESTIONS}" JLN_SUGGESTIONS)
  if(NOT(("default" STREQUAL JLN_SUGGESTIONS) OR ("off" STREQUAL JLN_SUGGESTIONS) OR ("on" STREQUAL JLN_SUGGESTIONS)))
    message(FATAL_ERROR "Unknow value \"${JLN_SUGGESTIONS}\" for JLN_SUGGESTIONS, expected: default, off, on")
  endif()
endif()
set(JLN_WARNINGS "${JLN_WARNINGS}" CACHE STRING "")
if(NOT("${JLN_WARNINGS}" STREQUAL ""))
  string(TOLOWER "${JLN_WARNINGS}" JLN_WARNINGS)
  if(NOT(("default" STREQUAL JLN_WARNINGS) OR ("off" STREQUAL JLN_WARNINGS) OR ("on" STREQUAL JLN_WARNINGS) OR ("strict" STREQUAL JLN_WARNINGS) OR ("very_strict" STREQUAL JLN_WARNINGS)))
    message(FATAL_ERROR "Unknow value \"${JLN_WARNINGS}\" for JLN_WARNINGS, expected: default, off, on, strict, very_strict")
  endif()
endif()
set(JLN_WARNINGS_AS_ERROR "${JLN_WARNINGS_AS_ERROR}" CACHE STRING "")
if(NOT("${JLN_WARNINGS_AS_ERROR}" STREQUAL ""))
  string(TOLOWER "${JLN_WARNINGS_AS_ERROR}" JLN_WARNINGS_AS_ERROR)
  if(NOT(("default" STREQUAL JLN_WARNINGS_AS_ERROR) OR ("off" STREQUAL JLN_WARNINGS_AS_ERROR) OR ("on" STREQUAL JLN_WARNINGS_AS_ERROR) OR ("basic" STREQUAL JLN_WARNINGS_AS_ERROR)))
    message(FATAL_ERROR "Unknow value \"${JLN_WARNINGS_AS_ERROR}\" for JLN_WARNINGS_AS_ERROR, expected: default, off, on, basic")
  endif()
endif()
set(JLN_WHOLE_PROGRAM "${JLN_WHOLE_PROGRAM}" CACHE STRING "")
if(NOT("${JLN_WHOLE_PROGRAM}" STREQUAL ""))
  string(TOLOWER "${JLN_WHOLE_PROGRAM}" JLN_WHOLE_PROGRAM)
  if(NOT(("default" STREQUAL JLN_WHOLE_PROGRAM) OR ("off" STREQUAL JLN_WHOLE_PROGRAM) OR ("on" STREQUAL JLN_WHOLE_PROGRAM) OR ("strip_all" STREQUAL JLN_WHOLE_PROGRAM)))
    message(FATAL_ERROR "Unknow value \"${JLN_WHOLE_PROGRAM}\" for JLN_WHOLE_PROGRAM, expected: default, off, on, strip_all")
  endif()
endif()
set(JLN_VERBOSE ${JLN_VERBOSE} CACHE STRING "")
set(JLN_AUTO_PROFILE ${JLN_AUTO_PROFILE} CACHE STRING "")
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
  set(_JLN_BUILD_TYPE "Debug")
  set(_JLN_BUILD_TYPE_PARSER "Debug")
else()
  set(_JLN_BUILD_TYPE ${CMAKE_BUILD_TYPE})
  string(TOLOWER ${CMAKE_BUILD_TYPE} _JLN_BUILD_TYPE_PARSER)
endif()

function(jln_parse_arguments prefix one_value_keywords)
  if(${ARGC} LESS 3)
    return()
  endif()

  set(SAME_BUILD_TYPE 1)
  foreach(ival RANGE 3 ${ARGC} 2)
    math(EXPR i ${ival}-1)
    set(name ${ARGV${i}})
    if(${name} STREQUAL "BUILD_TYPE")
      string(TOLOWER "${ARGV${ival}}" type)
      if(${_JLN_BUILD_TYPE_PARSER} STREQUAL "${type}")
        set(SAME_BUILD_TYPE 1)
      else()
        set(SAME_BUILD_TYPE 0)
      endif()
    else()
      list(FIND one_value_keywords "${name}" INDEX)
      if(${INDEX} EQUAL -1)
        message(FATAL_ERROR "Unknown '${name}' parameter")
      endif()

      set(value "${ARGV${ival}}")
      string(TOLOWER "${value}" lowercase_value)
      list(FIND _JLN_${name}_VALUES "${lowercase_value}" INDEX)
      if(${INDEX} EQUAL -1)
        if(${name} STREQUAL "CXX_VAR" OR ${name} STREQUAL "LINK_VAR")
          if(SAME_BUILD_TYPE)
            set("${prefix}_${name}" ${value} PARENT_SCOPE)
          endif()
        else()
          list(JOIN _JLN_${name}_VALUES ", " values)
          message(FATAL_ERROR "Parameter '${name}': Unknown '${value}', expected: ${values}")
        endif()
      elseif(SAME_BUILD_TYPE)
        set("${prefix}_${name}" ${lowercase_value} PARENT_SCOPE)
      endif()
    endif()
  endforeach()
endfunction()

set(JLN_CXX_IS_INITIALIZED 0 CACHE BOOL "private" FORCE)


# init default values
# jln_init_flags([<jln-option> <default_value>]... [AUTO_PROFILE on] [VERBOSE on] [BUILD_TYPE type conditioned-options])
# AUTO_PROFILE: enables options based on CMAKE_BUILD_TYPE (assumes "Debug" if CMAKE_BUILD_TYPE is empty)
# BUILD_TYPE: enables following options only if ${CMAKE_BUILD_TYPE} has the same value (CMAKE_BUILD_TYPE assumed to Debug if empty)
# Example:
#   jln_init_flags(
#       SUGGESTIONS on
#
#       BUILD_TYPE debug SANITIZERS on
#       BUILD_TYPE release LTO on
#   )
function(jln_init_flags)
  jln_parse_arguments(JLN_DEFAULT_FLAG "VERBOSE;COLOR;CONTROL_FLOW;COVERAGE;CPU;DEBUG;DIAGNOSTICS_FORMAT;DIAGNOSTICS_SHOW_TEMPLATE_TREE;ELIDE_TYPE;EXCEPTIONS;FIX_COMPILER_ERROR;LINKER;LTO;MSVC_ISYSTEM;MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL;OPTIMIZATION;PEDANTIC;PIE;RELRO;REPRODUCIBLE_BUILD_WARNINGS;RTTI;SANITIZERS;SANITIZERS_EXTRA;SHADOW_WARNINGS;STACK_PROTECTOR;STL_DEBUG;STL_FIX;SUGGESTIONS;WARNINGS;WARNINGS_AS_ERROR;WHOLE_PROGRAM;AUTO_PROFILE" ${ARGN})

  if(DEFINED JLN_DEFAULT_FLAG_VERBOSE)
    set(JLN_VERBOSE_D ${JLN_DEFAULT_FLAG_VERBOSE})
  elseif("${JLN_VERBOSE}" STREQUAL "")
    set(JLN_VERBOSE_D "")
  else()
    string(TOLOWER "${JLN_VERBOSE}" JLN_VERBOSE_D)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_AUTO_PROFILE)
    set(JLN_AUTO_PROFILE_D ${JLN_DEFAULT_FLAG_AUTO_PROFILE})
  elseif("${JLN_AUTO_PROFILE}" STREQUAL "")
    set(JLN_AUTO_PROFILE_D "")
  else()
    string(TOLOWER "${JLN_AUTO_PROFILE}" JLN_AUTO_PROFILE_D)
  endif()

  if("${JLN_AUTO_PROFILE_D}" STREQUAL "on")

    if("Debug" STREQUAL "${_JLN_BUILD_TYPE}")
      if(NOT DEFINED JLN_DEFAULT_FLAG_CONTROL_FLOW)
        set(JLN_DEFAULT_FLAG_CONTROL_FLOW "on")
      endif()
      if(NOT DEFINED JLN_DEFAULT_FLAG_DEBUG)
        set(JLN_DEFAULT_FLAG_DEBUG "on")
      endif()
      if(NOT DEFINED JLN_DEFAULT_FLAG_SANITIZERS)
        set(JLN_DEFAULT_FLAG_SANITIZERS "on")
      endif()
      if(NOT DEFINED JLN_DEFAULT_FLAG_STL_DEBUG)
        set(JLN_DEFAULT_FLAG_STL_DEBUG "on")
      endif()
    endif()

    if("RelWithDebInfo" STREQUAL "${_JLN_BUILD_TYPE}")
      if(NOT DEFINED JLN_DEFAULT_FLAG_DEBUG)
        set(JLN_DEFAULT_FLAG_DEBUG "on")
      endif()
      if(NOT DEFINED JLN_DEFAULT_FLAG_LINKER)
        set(JLN_DEFAULT_FLAG_LINKER "native")
      endif()
      if(NOT DEFINED JLN_DEFAULT_FLAG_LTO)
        set(JLN_DEFAULT_FLAG_LTO "on")
      endif()
      if(NOT DEFINED JLN_DEFAULT_FLAG_OPTIMIZATION)
        set(JLN_DEFAULT_FLAG_OPTIMIZATION "g")
      endif()
    endif()

    if("MinSizeRel" STREQUAL "${_JLN_BUILD_TYPE}")
      if(NOT DEFINED JLN_DEFAULT_FLAG_CPU)
        set(JLN_DEFAULT_FLAG_CPU "native")
      endif()
      if(NOT DEFINED JLN_DEFAULT_FLAG_LINKER)
        set(JLN_DEFAULT_FLAG_LINKER "native")
      endif()
      if(NOT DEFINED JLN_DEFAULT_FLAG_LTO)
        set(JLN_DEFAULT_FLAG_LTO "on")
      endif()
      if(NOT DEFINED JLN_DEFAULT_FLAG_OPTIMIZATION)
        set(JLN_DEFAULT_FLAG_OPTIMIZATION "size")
      endif()
    endif()

    if("Release" STREQUAL "${_JLN_BUILD_TYPE}")
      if(NOT DEFINED JLN_DEFAULT_FLAG_CPU)
        set(JLN_DEFAULT_FLAG_CPU "native")
      endif()
      if(NOT DEFINED JLN_DEFAULT_FLAG_LINKER)
        set(JLN_DEFAULT_FLAG_LINKER "native")
      endif()
      if(NOT DEFINED JLN_DEFAULT_FLAG_LTO)
        set(JLN_DEFAULT_FLAG_LTO "on")
      endif()
      if(NOT DEFINED JLN_DEFAULT_FLAG_OPTIMIZATION)
        set(JLN_DEFAULT_FLAG_OPTIMIZATION "2")
      endif()
    endif()
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_COLOR)
    set(JLN_COLOR_D ${JLN_DEFAULT_FLAG_COLOR} CACHE STRING "private" FORCE)
  elseif("${JLN_COLOR}" STREQUAL "")
    set(JLN_COLOR_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_COLOR_D "${JLN_COLOR}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_CONTROL_FLOW)
    set(JLN_CONTROL_FLOW_D ${JLN_DEFAULT_FLAG_CONTROL_FLOW} CACHE STRING "private" FORCE)
  elseif("${JLN_CONTROL_FLOW}" STREQUAL "")
    set(JLN_CONTROL_FLOW_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_CONTROL_FLOW_D "${JLN_CONTROL_FLOW}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_COVERAGE)
    set(JLN_COVERAGE_D ${JLN_DEFAULT_FLAG_COVERAGE} CACHE STRING "private" FORCE)
  elseif("${JLN_COVERAGE}" STREQUAL "")
    set(JLN_COVERAGE_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_COVERAGE_D "${JLN_COVERAGE}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_CPU)
    set(JLN_CPU_D ${JLN_DEFAULT_FLAG_CPU} CACHE STRING "private" FORCE)
  elseif("${JLN_CPU}" STREQUAL "")
    set(JLN_CPU_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_CPU_D "${JLN_CPU}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_DEBUG)
    set(JLN_DEBUG_D ${JLN_DEFAULT_FLAG_DEBUG} CACHE STRING "private" FORCE)
  elseif("${JLN_DEBUG}" STREQUAL "")
    set(JLN_DEBUG_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_DEBUG_D "${JLN_DEBUG}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_DIAGNOSTICS_FORMAT)
    set(JLN_DIAGNOSTICS_FORMAT_D ${JLN_DEFAULT_FLAG_DIAGNOSTICS_FORMAT} CACHE STRING "private" FORCE)
  elseif("${JLN_DIAGNOSTICS_FORMAT}" STREQUAL "")
    set(JLN_DIAGNOSTICS_FORMAT_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_DIAGNOSTICS_FORMAT_D "${JLN_DIAGNOSTICS_FORMAT}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_DIAGNOSTICS_SHOW_TEMPLATE_TREE)
    set(JLN_DIAGNOSTICS_SHOW_TEMPLATE_TREE_D ${JLN_DEFAULT_FLAG_DIAGNOSTICS_SHOW_TEMPLATE_TREE} CACHE STRING "private" FORCE)
  elseif("${JLN_DIAGNOSTICS_SHOW_TEMPLATE_TREE}" STREQUAL "")
    set(JLN_DIAGNOSTICS_SHOW_TEMPLATE_TREE_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_DIAGNOSTICS_SHOW_TEMPLATE_TREE_D "${JLN_DIAGNOSTICS_SHOW_TEMPLATE_TREE}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_ELIDE_TYPE)
    set(JLN_ELIDE_TYPE_D ${JLN_DEFAULT_FLAG_ELIDE_TYPE} CACHE STRING "private" FORCE)
  elseif("${JLN_ELIDE_TYPE}" STREQUAL "")
    set(JLN_ELIDE_TYPE_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_ELIDE_TYPE_D "${JLN_ELIDE_TYPE}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_EXCEPTIONS)
    set(JLN_EXCEPTIONS_D ${JLN_DEFAULT_FLAG_EXCEPTIONS} CACHE STRING "private" FORCE)
  elseif("${JLN_EXCEPTIONS}" STREQUAL "")
    set(JLN_EXCEPTIONS_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_EXCEPTIONS_D "${JLN_EXCEPTIONS}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_FIX_COMPILER_ERROR)
    set(JLN_FIX_COMPILER_ERROR_D ${JLN_DEFAULT_FLAG_FIX_COMPILER_ERROR} CACHE STRING "private" FORCE)
  elseif("${JLN_FIX_COMPILER_ERROR}" STREQUAL "")
    set(JLN_FIX_COMPILER_ERROR_D "on" CACHE STRING "private" FORCE)
  else()
    set(JLN_FIX_COMPILER_ERROR_D "${JLN_FIX_COMPILER_ERROR}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_LINKER)
    set(JLN_LINKER_D ${JLN_DEFAULT_FLAG_LINKER} CACHE STRING "private" FORCE)
  elseif("${JLN_LINKER}" STREQUAL "")
    set(JLN_LINKER_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_LINKER_D "${JLN_LINKER}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_LTO)
    set(JLN_LTO_D ${JLN_DEFAULT_FLAG_LTO} CACHE STRING "private" FORCE)
  elseif("${JLN_LTO}" STREQUAL "")
    set(JLN_LTO_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_LTO_D "${JLN_LTO}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_MSVC_ISYSTEM)
    set(JLN_MSVC_ISYSTEM_D ${JLN_DEFAULT_FLAG_MSVC_ISYSTEM} CACHE STRING "private" FORCE)
  elseif("${JLN_MSVC_ISYSTEM}" STREQUAL "")
    set(JLN_MSVC_ISYSTEM_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_MSVC_ISYSTEM_D "${JLN_MSVC_ISYSTEM}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL)
    set(JLN_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL_D ${JLN_DEFAULT_FLAG_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL} CACHE STRING "private" FORCE)
  elseif("${JLN_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL}" STREQUAL "")
    set(JLN_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL_D "${JLN_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_OPTIMIZATION)
    set(JLN_OPTIMIZATION_D ${JLN_DEFAULT_FLAG_OPTIMIZATION} CACHE STRING "private" FORCE)
  elseif("${JLN_OPTIMIZATION}" STREQUAL "")
    set(JLN_OPTIMIZATION_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_OPTIMIZATION_D "${JLN_OPTIMIZATION}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_PEDANTIC)
    set(JLN_PEDANTIC_D ${JLN_DEFAULT_FLAG_PEDANTIC} CACHE STRING "private" FORCE)
  elseif("${JLN_PEDANTIC}" STREQUAL "")
    set(JLN_PEDANTIC_D "on" CACHE STRING "private" FORCE)
  else()
    set(JLN_PEDANTIC_D "${JLN_PEDANTIC}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_PIE)
    set(JLN_PIE_D ${JLN_DEFAULT_FLAG_PIE} CACHE STRING "private" FORCE)
  elseif("${JLN_PIE}" STREQUAL "")
    set(JLN_PIE_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_PIE_D "${JLN_PIE}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_RELRO)
    set(JLN_RELRO_D ${JLN_DEFAULT_FLAG_RELRO} CACHE STRING "private" FORCE)
  elseif("${JLN_RELRO}" STREQUAL "")
    set(JLN_RELRO_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_RELRO_D "${JLN_RELRO}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_REPRODUCIBLE_BUILD_WARNINGS)
    set(JLN_REPRODUCIBLE_BUILD_WARNINGS_D ${JLN_DEFAULT_FLAG_REPRODUCIBLE_BUILD_WARNINGS} CACHE STRING "private" FORCE)
  elseif("${JLN_REPRODUCIBLE_BUILD_WARNINGS}" STREQUAL "")
    set(JLN_REPRODUCIBLE_BUILD_WARNINGS_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_REPRODUCIBLE_BUILD_WARNINGS_D "${JLN_REPRODUCIBLE_BUILD_WARNINGS}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_RTTI)
    set(JLN_RTTI_D ${JLN_DEFAULT_FLAG_RTTI} CACHE STRING "private" FORCE)
  elseif("${JLN_RTTI}" STREQUAL "")
    set(JLN_RTTI_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_RTTI_D "${JLN_RTTI}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_SANITIZERS)
    set(JLN_SANITIZERS_D ${JLN_DEFAULT_FLAG_SANITIZERS} CACHE STRING "private" FORCE)
  elseif("${JLN_SANITIZERS}" STREQUAL "")
    set(JLN_SANITIZERS_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_SANITIZERS_D "${JLN_SANITIZERS}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_SANITIZERS_EXTRA)
    set(JLN_SANITIZERS_EXTRA_D ${JLN_DEFAULT_FLAG_SANITIZERS_EXTRA} CACHE STRING "private" FORCE)
  elseif("${JLN_SANITIZERS_EXTRA}" STREQUAL "")
    set(JLN_SANITIZERS_EXTRA_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_SANITIZERS_EXTRA_D "${JLN_SANITIZERS_EXTRA}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_SHADOW_WARNINGS)
    set(JLN_SHADOW_WARNINGS_D ${JLN_DEFAULT_FLAG_SHADOW_WARNINGS} CACHE STRING "private" FORCE)
  elseif("${JLN_SHADOW_WARNINGS}" STREQUAL "")
    set(JLN_SHADOW_WARNINGS_D "off" CACHE STRING "private" FORCE)
  else()
    set(JLN_SHADOW_WARNINGS_D "${JLN_SHADOW_WARNINGS}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_STACK_PROTECTOR)
    set(JLN_STACK_PROTECTOR_D ${JLN_DEFAULT_FLAG_STACK_PROTECTOR} CACHE STRING "private" FORCE)
  elseif("${JLN_STACK_PROTECTOR}" STREQUAL "")
    set(JLN_STACK_PROTECTOR_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_STACK_PROTECTOR_D "${JLN_STACK_PROTECTOR}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_STL_DEBUG)
    set(JLN_STL_DEBUG_D ${JLN_DEFAULT_FLAG_STL_DEBUG} CACHE STRING "private" FORCE)
  elseif("${JLN_STL_DEBUG}" STREQUAL "")
    set(JLN_STL_DEBUG_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_STL_DEBUG_D "${JLN_STL_DEBUG}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_STL_FIX)
    set(JLN_STL_FIX_D ${JLN_DEFAULT_FLAG_STL_FIX} CACHE STRING "private" FORCE)
  elseif("${JLN_STL_FIX}" STREQUAL "")
    set(JLN_STL_FIX_D "on" CACHE STRING "private" FORCE)
  else()
    set(JLN_STL_FIX_D "${JLN_STL_FIX}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_SUGGESTIONS)
    set(JLN_SUGGESTIONS_D ${JLN_DEFAULT_FLAG_SUGGESTIONS} CACHE STRING "private" FORCE)
  elseif("${JLN_SUGGESTIONS}" STREQUAL "")
    set(JLN_SUGGESTIONS_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_SUGGESTIONS_D "${JLN_SUGGESTIONS}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_WARNINGS)
    set(JLN_WARNINGS_D ${JLN_DEFAULT_FLAG_WARNINGS} CACHE STRING "private" FORCE)
  elseif("${JLN_WARNINGS}" STREQUAL "")
    set(JLN_WARNINGS_D "on" CACHE STRING "private" FORCE)
  else()
    set(JLN_WARNINGS_D "${JLN_WARNINGS}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_WARNINGS_AS_ERROR)
    set(JLN_WARNINGS_AS_ERROR_D ${JLN_DEFAULT_FLAG_WARNINGS_AS_ERROR} CACHE STRING "private" FORCE)
  elseif("${JLN_WARNINGS_AS_ERROR}" STREQUAL "")
    set(JLN_WARNINGS_AS_ERROR_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_WARNINGS_AS_ERROR_D "${JLN_WARNINGS_AS_ERROR}" CACHE STRING "private" FORCE)
  endif()

  if(DEFINED JLN_DEFAULT_FLAG_WHOLE_PROGRAM)
    set(JLN_WHOLE_PROGRAM_D ${JLN_DEFAULT_FLAG_WHOLE_PROGRAM} CACHE STRING "private" FORCE)
  elseif("${JLN_WHOLE_PROGRAM}" STREQUAL "")
    set(JLN_WHOLE_PROGRAM_D "default" CACHE STRING "private" FORCE)
  else()
    set(JLN_WHOLE_PROGRAM_D "${JLN_WHOLE_PROGRAM}" CACHE STRING "private" FORCE)
  endif()

  if("${JLN_VERBOSE_D}" STREQUAL "on" OR "${JLN_VERBOSE_D}" STREQUAL "1")
    message(STATUS "JLN_AUTO_PROFILE = ${JLN_AUTO_PROFILE_D}	[off, on]")
    message(STATUS "JLN_COLOR = ${JLN_COLOR_D}	[default, auto, never, always]")
    message(STATUS "JLN_CONTROL_FLOW = ${JLN_CONTROL_FLOW_D}	[default, off, on, branch, return, allow_bugs]")
    message(STATUS "JLN_COVERAGE = ${JLN_COVERAGE_D}	[default, off, on]")
    message(STATUS "JLN_CPU = ${JLN_CPU_D}	[default, generic, native]")
    message(STATUS "JLN_DEBUG = ${JLN_DEBUG_D}	[default, off, on, line_tables_only, gdb, lldb, sce]")
    message(STATUS "JLN_DIAGNOSTICS_FORMAT = ${JLN_DIAGNOSTICS_FORMAT_D}	[default, fixits, patch, print_source_range_info]")
    message(STATUS "JLN_DIAGNOSTICS_SHOW_TEMPLATE_TREE = ${JLN_DIAGNOSTICS_SHOW_TEMPLATE_TREE_D}	[default, off, on]")
    message(STATUS "JLN_ELIDE_TYPE = ${JLN_ELIDE_TYPE_D}	[default, off, on]")
    message(STATUS "JLN_EXCEPTIONS = ${JLN_EXCEPTIONS_D}	[default, off, on]")
    message(STATUS "JLN_FIX_COMPILER_ERROR = ${JLN_FIX_COMPILER_ERROR_D}	[default, off, on]")
    message(STATUS "JLN_LINKER = ${JLN_LINKER_D}	[default, bfd, gold, lld, native]")
    message(STATUS "JLN_LTO = ${JLN_LTO_D}	[default, off, on, fat, thin]")
    message(STATUS "JLN_MSVC_ISYSTEM = ${JLN_MSVC_ISYSTEM_D}	[default, anglebrackets, include_and_caexcludepath]")
    message(STATUS "JLN_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL = ${JLN_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL_D}	[default, off, on]")
    message(STATUS "JLN_OPTIMIZATION = ${JLN_OPTIMIZATION_D}	[default, 0, g, 1, 2, 3, fast, size]")
    message(STATUS "JLN_PEDANTIC = ${JLN_PEDANTIC_D}	[default, off, on, as_error]")
    message(STATUS "JLN_PIE = ${JLN_PIE_D}	[default, off, on, pic]")
    message(STATUS "JLN_RELRO = ${JLN_RELRO_D}	[default, off, on, full]")
    message(STATUS "JLN_REPRODUCIBLE_BUILD_WARNINGS = ${JLN_REPRODUCIBLE_BUILD_WARNINGS_D}	[default, off, on]")
    message(STATUS "JLN_RTTI = ${JLN_RTTI_D}	[default, off, on]")
    message(STATUS "JLN_SANITIZERS = ${JLN_SANITIZERS_D}	[default, off, on]")
    message(STATUS "JLN_SANITIZERS_EXTRA = ${JLN_SANITIZERS_EXTRA_D}	[default, off, thread, pointer]")
    message(STATUS "JLN_SHADOW_WARNINGS = ${JLN_SHADOW_WARNINGS_D}	[default, off, on, local, compatible_local, all]")
    message(STATUS "JLN_STACK_PROTECTOR = ${JLN_STACK_PROTECTOR_D}	[default, off, on, strong, all]")
    message(STATUS "JLN_STL_DEBUG = ${JLN_STL_DEBUG_D}	[default, off, on, allow_broken_abi, allow_broken_abi_and_bugs, assert_as_exception]")
    message(STATUS "JLN_STL_FIX = ${JLN_STL_FIX_D}	[default, off, on]")
    message(STATUS "JLN_SUGGESTIONS = ${JLN_SUGGESTIONS_D}	[default, off, on]")
    message(STATUS "JLN_WARNINGS = ${JLN_WARNINGS_D}	[default, off, on, strict, very_strict]")
    message(STATUS "JLN_WARNINGS_AS_ERROR = ${JLN_WARNINGS_AS_ERROR_D}	[default, off, on, basic]")
    message(STATUS "JLN_WHOLE_PROGRAM = ${JLN_WHOLE_PROGRAM_D}	[default, off, on, strip_all]")
  endif()

  set(JLN_CXX_IS_INITIALIZED 1 CACHE BOOL "private" FORCE)

endfunction()

if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
  set(JLN_GCC_CXX_COMPILER 1)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  if(MSVC)
    set(JLN_CLANG_CL_CXX_COMPILER 1)
  else()
    set(JLN_CLANG_CXX_COMPILER 1)
  endif()
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
  set(JLN_MSVC_CXX_COMPILER 1)
endif()

if(CMAKE_HOST_APPLE)
  set(JLN_LD64_CXX_LINKER 1)
elseif(CMAKE_LINKER MATCHES "lld-link")
  set(JLN_LLD_LINK_CXX_LINKER 1)
endif()
    
# jln_target_interface(<libname> {INTERFACE|PUBLIC|PRIVATE} [<jln-option> <value>]... [DISABLE_OTHERS on|off] [BUILD_TYPE type])
# BUILD_TYPE: enables following options only if ${CMAKE_BUILD_TYPE} has the same value (CMAKE_BUILD_TYPE assumed to Debug if empty)
function(jln_target_interface name type)
  jln_flags(CXX_VAR cxx LINK_VAR link ${ARGN})
  add_library(${name} ${type})
  target_link_options(${name} ${type} ${link})
  target_compile_options(${name} ${type} ${cxx})
endfunction()

# jln_flags(CXX_VAR <out-variable> LINK_VAR <out-variable> [<jln-option> <value>]... [DISABLE_OTHERS on|off] [BUILD_TYPE type])
# BUILD_TYPE: enables following options only if ${CMAKE_BUILD_TYPE} has the same value (CMAKE_BUILD_TYPE assumed to Debug if empty)
function(jln_flags)
  if(NOT JLN_CXX_IS_INITIALIZED)
    jln_init_flags()
  endif()
  set(CXX_FLAGS "")
  set(LINK_LINK "")
  jln_parse_arguments(JLN_FLAGS "DISABLE_OTHERS;CXX_VAR;LINK_VAR;COLOR;CONTROL_FLOW;COVERAGE;CPU;DEBUG;DIAGNOSTICS_FORMAT;DIAGNOSTICS_SHOW_TEMPLATE_TREE;ELIDE_TYPE;EXCEPTIONS;FIX_COMPILER_ERROR;LINKER;LTO;MSVC_ISYSTEM;MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL;OPTIMIZATION;PEDANTIC;PIE;RELRO;REPRODUCIBLE_BUILD_WARNINGS;RTTI;SANITIZERS;SANITIZERS_EXTRA;SHADOW_WARNINGS;STACK_PROTECTOR;STL_DEBUG;STL_FIX;SUGGESTIONS;WARNINGS;WARNINGS_AS_ERROR;WHOLE_PROGRAM" ${ARGN})

  if(NOT DEFINED JLN_FLAGS_COLOR)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_COLOR "default")
    else()
      set(JLN_FLAGS_COLOR "${JLN_COLOR_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_CONTROL_FLOW)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_CONTROL_FLOW "default")
    else()
      set(JLN_FLAGS_CONTROL_FLOW "${JLN_CONTROL_FLOW_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_COVERAGE)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_COVERAGE "default")
    else()
      set(JLN_FLAGS_COVERAGE "${JLN_COVERAGE_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_CPU)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_CPU "default")
    else()
      set(JLN_FLAGS_CPU "${JLN_CPU_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_DEBUG)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_DEBUG "default")
    else()
      set(JLN_FLAGS_DEBUG "${JLN_DEBUG_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_DIAGNOSTICS_FORMAT)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_DIAGNOSTICS_FORMAT "default")
    else()
      set(JLN_FLAGS_DIAGNOSTICS_FORMAT "${JLN_DIAGNOSTICS_FORMAT_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_DIAGNOSTICS_SHOW_TEMPLATE_TREE)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_DIAGNOSTICS_SHOW_TEMPLATE_TREE "default")
    else()
      set(JLN_FLAGS_DIAGNOSTICS_SHOW_TEMPLATE_TREE "${JLN_DIAGNOSTICS_SHOW_TEMPLATE_TREE_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_ELIDE_TYPE)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_ELIDE_TYPE "default")
    else()
      set(JLN_FLAGS_ELIDE_TYPE "${JLN_ELIDE_TYPE_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_EXCEPTIONS)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_EXCEPTIONS "default")
    else()
      set(JLN_FLAGS_EXCEPTIONS "${JLN_EXCEPTIONS_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_FIX_COMPILER_ERROR)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_FIX_COMPILER_ERROR "on")
    else()
      set(JLN_FLAGS_FIX_COMPILER_ERROR "${JLN_FIX_COMPILER_ERROR_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_LINKER)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_LINKER "default")
    else()
      set(JLN_FLAGS_LINKER "${JLN_LINKER_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_LTO)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_LTO "default")
    else()
      set(JLN_FLAGS_LTO "${JLN_LTO_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_MSVC_ISYSTEM)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_MSVC_ISYSTEM "default")
    else()
      set(JLN_FLAGS_MSVC_ISYSTEM "${JLN_MSVC_ISYSTEM_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL "default")
    else()
      set(JLN_FLAGS_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL "${JLN_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_OPTIMIZATION)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_OPTIMIZATION "default")
    else()
      set(JLN_FLAGS_OPTIMIZATION "${JLN_OPTIMIZATION_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_PEDANTIC)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_PEDANTIC "on")
    else()
      set(JLN_FLAGS_PEDANTIC "${JLN_PEDANTIC_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_PIE)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_PIE "default")
    else()
      set(JLN_FLAGS_PIE "${JLN_PIE_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_RELRO)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_RELRO "default")
    else()
      set(JLN_FLAGS_RELRO "${JLN_RELRO_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_REPRODUCIBLE_BUILD_WARNINGS)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_REPRODUCIBLE_BUILD_WARNINGS "default")
    else()
      set(JLN_FLAGS_REPRODUCIBLE_BUILD_WARNINGS "${JLN_REPRODUCIBLE_BUILD_WARNINGS_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_RTTI)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_RTTI "default")
    else()
      set(JLN_FLAGS_RTTI "${JLN_RTTI_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_SANITIZERS)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_SANITIZERS "default")
    else()
      set(JLN_FLAGS_SANITIZERS "${JLN_SANITIZERS_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_SANITIZERS_EXTRA)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_SANITIZERS_EXTRA "default")
    else()
      set(JLN_FLAGS_SANITIZERS_EXTRA "${JLN_SANITIZERS_EXTRA_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_SHADOW_WARNINGS)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_SHADOW_WARNINGS "off")
    else()
      set(JLN_FLAGS_SHADOW_WARNINGS "${JLN_SHADOW_WARNINGS_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_STACK_PROTECTOR)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_STACK_PROTECTOR "default")
    else()
      set(JLN_FLAGS_STACK_PROTECTOR "${JLN_STACK_PROTECTOR_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_STL_DEBUG)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_STL_DEBUG "default")
    else()
      set(JLN_FLAGS_STL_DEBUG "${JLN_STL_DEBUG_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_STL_FIX)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_STL_FIX "on")
    else()
      set(JLN_FLAGS_STL_FIX "${JLN_STL_FIX_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_SUGGESTIONS)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_SUGGESTIONS "default")
    else()
      set(JLN_FLAGS_SUGGESTIONS "${JLN_SUGGESTIONS_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_WARNINGS)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_WARNINGS "on")
    else()
      set(JLN_FLAGS_WARNINGS "${JLN_WARNINGS_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_WARNINGS_AS_ERROR)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_WARNINGS_AS_ERROR "default")
    else()
      set(JLN_FLAGS_WARNINGS_AS_ERROR "${JLN_WARNINGS_AS_ERROR_D}")
    endif()
  endif()

  if(NOT DEFINED JLN_FLAGS_WHOLE_PROGRAM)
    if(JLN_FLAGS_DISABLE_OTHERS)
      set(JLN_FLAGS_WHOLE_PROGRAM "default")
    else()
      set(JLN_FLAGS_WHOLE_PROGRAM "${JLN_WHOLE_PROGRAM_D}")
    endif()
  endif()

  if (  ( JLN_GCC_CXX_COMPILER OR JLN_CLANG_CXX_COMPILER OR JLN_CLANG_CL_CXX_COMPILER ) )
    if (  NOT ( JLN_FLAGS_WARNINGS STREQUAL "default") )
      if (  JLN_FLAGS_WARNINGS STREQUAL "off" )
        list(APPEND CXX_FLAGS  "-w")
      else()
        if (  JLN_GCC_CXX_COMPILER )
          list(APPEND CXX_FLAGS  "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wdisabled-optimization" "-Wfloat-equal" "-Wformat-security" "-Wformat=2" "-Wmissing-include-dirs" "-Wpacked" "-Wredundant-decls" "-Wundef" "-Wunused-macros" "-Winvalid-pch" "-Wpointer-arith" "-Wmissing-declarations" "-Wnon-virtual-dtor" "-Wold-style-cast" "-Woverloaded-virtual")
          if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7" ) )
            list(APPEND CXX_FLAGS  "-Wsuggest-attribute=noreturn" "-Wzero-as-null-pointer-constant" "-Wlogical-op" "-Wvector-operation-performance" "-Wdouble-promotion" "-Wtrampolines")
            if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8" ) )
              list(APPEND CXX_FLAGS  "-Wuseless-cast")
              if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9" ) )
                list(APPEND CXX_FLAGS  "-Wconditionally-supported" "-Wfloat-conversion")
                if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.1" ) )
                  list(APPEND CXX_FLAGS  "-Wformat-signedness" "-Warray-bounds=2" "-Wstrict-null-sentinel" "-Wsuggest-override")
                  if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1" ) )
                    list(APPEND CXX_FLAGS  "-Wduplicated-cond" "-Wnull-dereference")
                    if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.0" ) )
                      list(APPEND CXX_FLAGS  "-Waligned-new")
                      if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.1" ) )
                        list(APPEND CXX_FLAGS  "-Walloc-zero" "-Walloca" "-Wformat-overflow=2" "-Wduplicated-branches")
                        if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0" ) )
                          list(APPEND CXX_FLAGS  "-Wclass-memaccess")
                        endif()
                      endif()
                    endif()
                  endif()
                endif()
              endif()
            endif()
          endif()
        else()
          if (  ( JLN_CLANG_CXX_COMPILER OR JLN_CLANG_CL_CXX_COMPILER ) )
            list(APPEND CXX_FLAGS  "-Weverything" "-Wno-documentation" "-Wno-documentation-unknown-command" "-Wno-newline-eof" "-Wno-c++98-compat" "-Wno-c++98-compat-pedantic" "-Wno-mismatched-tags" "-Wno-padded" "-Wno-global-constructors" "-Wno-weak-vtables" "-Wno-exit-time-destructors" "-Wno-covered-switch-default" "-Wno-switch-default" "-Wno-switch-enum")
            if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.9" ) )
              list(APPEND CXX_FLAGS  "-Wno-undefined-var-template")
              if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0" ) )
                list(APPEND CXX_FLAGS  "-Wno-inconsistent-missing-destructor-override")
                if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0" ) )
                  list(APPEND CXX_FLAGS  "-Wno-ctad-maybe-unsupported")
                endif()
              endif()
            endif()
          endif()
        endif()
        if (  ( JLN_FLAGS_WARNINGS STREQUAL "strict" OR JLN_FLAGS_WARNINGS STREQUAL "very_strict" ) )
          list(APPEND CXX_FLAGS  "-Wconversion")
          if (  ( JLN_GCC_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0" ) ) )
            list(APPEND CXX_FLAGS  "-Wcast-align=strict")
          endif()
        else()
          if (  ( JLN_CLANG_CXX_COMPILER OR JLN_CLANG_CL_CXX_COMPILER ) )
            list(APPEND CXX_FLAGS  "-Wno-conversion" "-Wno-sign-conversion")
          endif()
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_WARNINGS_AS_ERROR STREQUAL "default") )
      if (  JLN_FLAGS_WARNINGS_AS_ERROR STREQUAL "on" )
        list(APPEND CXX_FLAGS  "-Werror")
      else()
        if (  JLN_FLAGS_WARNINGS_AS_ERROR STREQUAL "basic" )
          list(APPEND CXX_FLAGS  "-Werror=return-type" "-Werror=init-self")
          if (  ( JLN_GCC_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.1" ) ) )
            list(APPEND CXX_FLAGS  "-Werror=array-bounds" "-Werror=logical-op" "-Werror=logical-not-parentheses")
          else()
            if (  ( JLN_CLANG_CXX_COMPILER OR JLN_CLANG_CL_CXX_COMPILER ) )
              list(APPEND CXX_FLAGS  "-Werror=array-bounds" "-Werror=division-by-zero")
              if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.4" ) )
                list(APPEND CXX_FLAGS  "-Werror=logical-not-parentheses")
                if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.6" ) )
                  list(APPEND CXX_FLAGS  "-Werror=delete-incomplete")
                  if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.0" ) )
                    list(APPEND CXX_FLAGS  "-Werror=dynamic-class-memaccess")
                  endif()
                endif()
              endif()
            endif()
          endif()
        else()
          list(APPEND CXX_FLAGS  "-Wno-error")
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_SUGGESTIONS STREQUAL "default") )
      if (  NOT ( JLN_FLAGS_SUGGESTIONS STREQUAL "off" ) )
        if (  JLN_GCC_CXX_COMPILER )
          list(APPEND CXX_FLAGS  "-Wsuggest-attribute=pure" "-Wsuggest-attribute=const")
          if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0" ) )
            list(APPEND CXX_FLAGS  "-Wsuggest-final-types" "-Wsuggest-final-methods")
            if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.1" ) )
              list(APPEND CXX_FLAGS  "-Wnoexcept")
            endif()
          endif()
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_SANITIZERS STREQUAL "default") )
      if (  JLN_FLAGS_SANITIZERS STREQUAL "off" )
        list(APPEND CXX_FLAGS  "-fno-sanitize=all")
        list(APPEND LINK_FLAGS  "-fno-sanitize=all")
      else()
        if (  JLN_CLANG_CL_CXX_COMPILER )
          list(APPEND CXX_FLAGS  "-fsanitize=undefined" "-fsanitize=address" "-fsanitize-address-use-after-scope")
        else()
          if (  JLN_CLANG_CXX_COMPILER )
            if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.1" ) )
              list(APPEND CXX_FLAGS  "-fsanitize=undefined" "-fsanitize=address" "-fsanitize-address-use-after-scope" "-fno-omit-frame-pointer" "-fno-optimize-sibling-calls")
              list(APPEND LINK_FLAGS  "-fsanitize=undefined" "-fsanitize=address")
              if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.4" ) )
                list(APPEND CXX_FLAGS  "-fsanitize=leak")
                list(APPEND LINK_FLAGS  "-fsanitize=leak")
              endif()
            endif()
          else()
            if (  JLN_GCC_CXX_COMPILER )
              if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8" ) )
                list(APPEND CXX_FLAGS  "-fsanitize=address" "-fno-omit-frame-pointer" "-fno-optimize-sibling-calls")
                list(APPEND LINK_FLAGS  "-fsanitize=address")
                if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9" ) )
                  list(APPEND CXX_FLAGS  "-fsanitize=undefined" "-fsanitize=leak")
                  list(APPEND LINK_FLAGS  "-fsanitize=undefined" "-fsanitize=leak")
                endif()
              endif()
            endif()
          endif()
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_CONTROL_FLOW STREQUAL "default") )
      if (  JLN_FLAGS_CONTROL_FLOW STREQUAL "off" )
        if (  ( JLN_GCC_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0" ) ) )
          list(APPEND CXX_FLAGS  "-fcf-protection=none")
        else()
          if (  JLN_CLANG_CL_CXX_COMPILER )
            list(APPEND CXX_FLAGS  "-fcf-protection=none" "-fno-sanitize-cfi-cross-dso")
          endif()
        endif()
        if (  JLN_CLANG_CXX_COMPILER )
          list(APPEND CXX_FLAGS  "-fno-sanitize=cfi")
          list(APPEND LINK_FLAGS  "-fno-sanitize=cfi")
        endif()
      else()
        if (  ( ( JLN_GCC_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0" ) ) OR JLN_CLANG_CL_CXX_COMPILER ) )
          if (  JLN_FLAGS_CONTROL_FLOW STREQUAL "branch" )
            list(APPEND CXX_FLAGS  "-fcf-protection=branch")
          else()
            if (  JLN_FLAGS_CONTROL_FLOW STREQUAL "return" )
              list(APPEND CXX_FLAGS  "-fcf-protection=return")
            else()
              list(APPEND CXX_FLAGS  "-fcf-protection=full")
            endif()
          endif()
        else()
          if (  ( JLN_FLAGS_CONTROL_FLOW STREQUAL "allow_bugs" AND JLN_CLANG_CXX_COMPILER ) )
            list(APPEND CXX_FLAGS  "-fsanitize=cfi" "-fvisibility=hidden" "-flto")
            list(APPEND LINK_FLAGS  "-fsanitize=cfi" "-flto")
          endif()
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_COLOR STREQUAL "default") )
      if (  ( ( JLN_GCC_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9" ) ) OR JLN_CLANG_CXX_COMPILER OR JLN_CLANG_CL_CXX_COMPILER ) )
        if (  JLN_FLAGS_COLOR STREQUAL "auto" )
          list(APPEND CXX_FLAGS  "-fdiagnostics-color=auto")
        else()
          if (  JLN_FLAGS_COLOR STREQUAL "never" )
            list(APPEND CXX_FLAGS  "-fdiagnostics-color=never")
          else()
            if (  JLN_FLAGS_COLOR STREQUAL "always" )
              list(APPEND CXX_FLAGS  "-fdiagnostics-color=always")
            endif()
          endif()
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_REPRODUCIBLE_BUILD_WARNINGS STREQUAL "default") )
      if (  ( JLN_GCC_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9" ) ) )
        if (  JLN_FLAGS_REPRODUCIBLE_BUILD_WARNINGS STREQUAL "on" )
          list(APPEND CXX_FLAGS  "-Wdate-time")
        else()
          list(APPEND CXX_FLAGS  "-Wno-date-time")
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_DIAGNOSTICS_FORMAT STREQUAL "default") )
      if (  JLN_FLAGS_DIAGNOSTICS_FORMAT STREQUAL "fixits" )
        if (  ( ( JLN_GCC_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.0" ) ) OR ( JLN_CLANG_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0" ) ) OR ( JLN_CLANG_CL_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0" ) ) ) )
          list(APPEND CXX_FLAGS  "-fdiagnostics-parseable-fixits")
        endif()
      else()
        if (  JLN_FLAGS_DIAGNOSTICS_FORMAT STREQUAL "patch" )
          if (  ( JLN_GCC_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.0" ) ) )
            list(APPEND CXX_FLAGS  "-fdiagnostics-generate-patch")
          endif()
        else()
          if (  JLN_FLAGS_DIAGNOSTICS_FORMAT STREQUAL "print_source_range_info" )
            if (  JLN_CLANG_CXX_COMPILER )
              list(APPEND CXX_FLAGS  "-fdiagnostics-print-source-range-info")
            endif()
          endif()
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_FIX_COMPILER_ERROR STREQUAL "default") )
      if (  JLN_FLAGS_FIX_COMPILER_ERROR STREQUAL "on" )
        if (  JLN_GCC_CXX_COMPILER )
          if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7" ) )
            list(APPEND CXX_FLAGS  "-Werror=narrowing")
            if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.1" ) )
              list(APPEND CXX_FLAGS  "-Werror=literal-suffix")
            endif()
          endif()
        endif()
        list(APPEND CXX_FLAGS  "-Werror=write-strings")
      else()
        if (  ( JLN_CLANG_CXX_COMPILER OR JLN_CLANG_CL_CXX_COMPILER ) )
          list(APPEND CXX_FLAGS  "-Wno-error=c++11-narrowing" "-Wno-reserved-user-defined-literal")
        endif()
      endif()
    endif()
  endif()
  if (  ( JLN_GCC_CXX_COMPILER OR JLN_CLANG_CXX_COMPILER ) )
    if (  NOT ( JLN_FLAGS_COVERAGE STREQUAL "default") )
      if (  JLN_FLAGS_COVERAGE STREQUAL "on" )
        list(APPEND CXX_FLAGS  "--coverage")
        list(APPEND LINK_FLAGS  "--coverage")
        if (  JLN_CLANG_CXX_COMPILER )
          list(APPEND LINK_FLAGS  "-lprofile_rt")
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_DEBUG STREQUAL "default") )
      if (  JLN_FLAGS_DEBUG STREQUAL "off" )
        list(APPEND CXX_FLAGS  "-g0")
      else()
        if (  JLN_FLAGS_DEBUG STREQUAL "gdb" )
          list(APPEND CXX_FLAGS  "-ggdb")
        else()
          if (  JLN_CLANG_CXX_COMPILER )
            if (  JLN_FLAGS_DEBUG STREQUAL "line_tables_only" )
              list(APPEND CXX_FLAGS  "-gline-tables-only")
            endif()
            if (  JLN_FLAGS_DEBUG STREQUAL "lldb" )
              list(APPEND CXX_FLAGS  "-glldb")
            else()
              if (  JLN_FLAGS_DEBUG STREQUAL "sce" )
                list(APPEND CXX_FLAGS  "-gsce")
              else()
                list(APPEND CXX_FLAGS  "-g")
              endif()
            endif()
          else()
            list(APPEND CXX_FLAGS  "-g")
          endif()
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_LINKER STREQUAL "default") )
      if (  JLN_FLAGS_LINKER STREQUAL "native" )
        if (  JLN_GCC_CXX_COMPILER )
          list(APPEND LINK_FLAGS  "-fuse-ld=gold")
        else()
          list(APPEND LINK_FLAGS  "-fuse-ld=lld")
        endif()
      else()
        if (  JLN_FLAGS_LINKER STREQUAL "bfd" )
          list(APPEND LINK_FLAGS  "-fuse-ld=bfd")
        else()
          if (  ( JLN_FLAGS_LINKER STREQUAL "gold" OR ( JLN_GCC_CXX_COMPILER AND NOT ( NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0" ) ) ) ) )
            list(APPEND LINK_FLAGS  "-fuse-ld=gold")
          else()
            if (  NOT ( JLN_FLAGS_LTO STREQUAL "default") )
              if (  ( NOT ( JLN_FLAGS_LTO STREQUAL "off" ) AND JLN_GCC_CXX_COMPILER ) )
                list(APPEND LINK_FLAGS  "-fuse-ld=gold")
              else()
                list(APPEND LINK_FLAGS  "-fuse-ld=lld")
              endif()
            else()
              list(APPEND LINK_FLAGS  "-fuse-ld=lld")
            endif()
          endif()
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_LTO STREQUAL "default") )
      if (  JLN_FLAGS_LTO STREQUAL "off" )
        list(APPEND CXX_FLAGS  "-fno-lto")
        list(APPEND LINK_FLAGS  "-fno-lto")
      else()
        if (  JLN_GCC_CXX_COMPILER )
          list(APPEND CXX_FLAGS  "-flto")
          list(APPEND LINK_FLAGS  "-flto")
          if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0" ) )
            if (  NOT ( JLN_FLAGS_WARNINGS STREQUAL "default") )
              if (  NOT ( JLN_FLAGS_WARNINGS STREQUAL "off" ) )
                list(APPEND CXX_FLAGS  "-flto-odr-type-merging")
                list(APPEND LINK_FLAGS  "-flto-odr-type-merging")
              endif()
            endif()
            if (  JLN_FLAGS_LTO STREQUAL "fat" )
              list(APPEND CXX_FLAGS  "-ffat-lto-objects")
            else()
              if (  JLN_FLAGS_LTO STREQUAL "thin" )
                list(APPEND LINK_FLAGS  "-fuse-linker-plugin")
              endif()
            endif()
          endif()
        else()
          if (  ( JLN_FLAGS_LTO STREQUAL "thin" AND JLN_CLANG_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0" ) ) )
            list(APPEND CXX_FLAGS  "-flto=thin")
            list(APPEND LINK_FLAGS  "-flto=thin")
          else()
            list(APPEND CXX_FLAGS  "-flto")
            list(APPEND LINK_FLAGS  "-flto")
          endif()
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_OPTIMIZATION STREQUAL "default") )
      if (  JLN_FLAGS_OPTIMIZATION STREQUAL "0" )
        list(APPEND CXX_FLAGS  "-O0")
        list(APPEND LINK_FLAGS  "-O0")
      else()
        if (  JLN_FLAGS_OPTIMIZATION STREQUAL "g" )
          list(APPEND CXX_FLAGS  "-Og")
          list(APPEND LINK_FLAGS  "-Og")
        else()
          list(APPEND CXX_FLAGS  "-DNDEBUG")
          list(APPEND LINK_FLAGS  "-Wl,-01")
          if (  JLN_FLAGS_OPTIMIZATION STREQUAL "size" )
            list(APPEND CXX_FLAGS  "-Os")
            list(APPEND LINK_FLAGS  "-Os")
          else()
            if (  JLN_FLAGS_OPTIMIZATION STREQUAL "fast" )
              list(APPEND CXX_FLAGS  "-Ofast")
              list(APPEND LINK_FLAGS  "-Ofast")
            else()
              if (  JLN_FLAGS_OPTIMIZATION STREQUAL "1" )
                list(APPEND CXX_FLAGS  "-O1")
                list(APPEND LINK_FLAGS  "-O1")
              else()
                if (  JLN_FLAGS_OPTIMIZATION STREQUAL "2" )
                  list(APPEND CXX_FLAGS  "-O2")
                  list(APPEND LINK_FLAGS  "-O2")
                else()
                  if (  JLN_FLAGS_OPTIMIZATION STREQUAL "3" )
                    list(APPEND CXX_FLAGS  "-O3")
                    list(APPEND LINK_FLAGS  "-O3")
                  endif()
                endif()
              endif()
            endif()
          endif()
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_CPU STREQUAL "default") )
      if (  JLN_FLAGS_CPU STREQUAL "generic" )
        list(APPEND CXX_FLAGS  "-mtune=generic")
        list(APPEND LINK_FLAGS  "-mtune=generic")
      else()
        list(APPEND CXX_FLAGS  "-march=native" "-mtune=native")
        list(APPEND LINK_FLAGS  "-march=native" "-mtune=native")
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_WHOLE_PROGRAM STREQUAL "default") )
      if (  JLN_FLAGS_WHOLE_PROGRAM STREQUAL "off" )
        list(APPEND CXX_FLAGS  "-fno-whole-program")
        if (  ( JLN_CLANG_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.9" ) ) )
          list(APPEND CXX_FLAGS  "-fno-whole-program-vtables")
          list(APPEND LINK_FLAGS  "-fno-whole-program-vtables")
        endif()
      else()
        if (  JLN_LD64_CXX_LINKER )
          list(APPEND LINK_FLAGS  "-Wl,-dead_strip" "-Wl,-S")
        else()
          list(APPEND LINK_FLAGS  "-s")
          if (  JLN_FLAGS_WHOLE_PROGRAM STREQUAL "strip_all" )
            list(APPEND LINK_FLAGS  "-Wl,--gc-sections" "-Wl,--strip-all")
          endif()
        endif()
        if (  JLN_GCC_CXX_COMPILER )
          list(APPEND CXX_FLAGS  "-fwhole-program")
          list(APPEND LINK_FLAGS  "-fwhole-program")
        else()
          if (  JLN_CLANG_CXX_COMPILER )
            if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.9" ) )
              if (  NOT ( JLN_FLAGS_LTO STREQUAL "default") )
                if (  NOT ( JLN_FLAGS_LTO STREQUAL "off" ) )
                  list(APPEND CXX_FLAGS  "-fwhole-program-vtables")
                  list(APPEND LINK_FLAGS  "-fwhole-program-vtables")
                endif()
              endif()
              if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.0" ) )
                list(APPEND CXX_FLAGS  "-fforce-emit-vtables")
                list(APPEND LINK_FLAGS  "-fforce-emit-vtables")
              endif()
            endif()
          endif()
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_PEDANTIC STREQUAL "default") )
      if (  NOT ( JLN_FLAGS_PEDANTIC STREQUAL "off" ) )
        list(APPEND CXX_FLAGS  "-pedantic")
        if (  JLN_FLAGS_PEDANTIC STREQUAL "as_error" )
          list(APPEND CXX_FLAGS  "-pedantic-errors")
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_STACK_PROTECTOR STREQUAL "default") )
      if (  JLN_FLAGS_STACK_PROTECTOR STREQUAL "off" )
        list(APPEND CXX_FLAGS  "-Wno-stack-protector" "-U_FORTIFY_SOURCE")
        list(APPEND LINK_FLAGS  "-Wno-stack-protector")
      else()
        list(APPEND CXX_FLAGS  "-D_FORTIFY_SOURCE=2" "-Wstack-protector")
        if (  JLN_FLAGS_STACK_PROTECTOR STREQUAL "strong" )
          if (  ( JLN_GCC_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9" ) ) )
            list(APPEND CXX_FLAGS  "-fstack-protector-strong")
            list(APPEND LINK_FLAGS  "-fstack-protector-strong")
          else()
            if (  JLN_CLANG_CXX_COMPILER )
              list(APPEND CXX_FLAGS  "-fstack-protector-strong" "-fsanitize=safe-stack")
              list(APPEND LINK_FLAGS  "-fstack-protector-strong" "-fsanitize=safe-stack")
            endif()
          endif()
        else()
          if (  JLN_FLAGS_STACK_PROTECTOR STREQUAL "all" )
            list(APPEND CXX_FLAGS  "-fstack-protector-all")
            list(APPEND LINK_FLAGS  "-fstack-protector-all")
            if (  JLN_CLANG_CXX_COMPILER )
              list(APPEND CXX_FLAGS  "-fsanitize=safe-stack")
              list(APPEND LINK_FLAGS  "-fsanitize=safe-stack")
              if (  NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11.0" ) )
                list(APPEND CXX_FLAGS  "-fstack-clash-protection")
                list(APPEND LINK_FLAGS  "-fstack-clash-protection")
              endif()
            endif()
          else()
            list(APPEND CXX_FLAGS  "-fstack-protector")
            list(APPEND LINK_FLAGS  "-fstack-protector")
          endif()
        endif()
        if (  JLN_CLANG_CXX_COMPILER )
          list(APPEND CXX_FLAGS  "-fsanitize=shadow-call-stack")
          list(APPEND LINK_FLAGS  "-fsanitize=shadow-call-stack")
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_RELRO STREQUAL "default") )
      if (  JLN_FLAGS_RELRO STREQUAL "off" )
        list(APPEND LINK_FLAGS  "-Wl,-z,norelro")
      else()
        if (  JLN_FLAGS_RELRO STREQUAL "on" )
          list(APPEND LINK_FLAGS  "-Wl,-z,relro")
        else()
          if (  JLN_FLAGS_RELRO STREQUAL "full" )
            list(APPEND LINK_FLAGS  "-Wl,-z,relro,-z,now")
          endif()
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_PIE STREQUAL "default") )
      if (  JLN_FLAGS_PIE STREQUAL "off" )
        list(APPEND LINK_FLAGS  "-no-pic")
      else()
        if (  JLN_FLAGS_PIE STREQUAL "on" )
          list(APPEND LINK_FLAGS  "-pie")
        else()
          if (  JLN_FLAGS_PIE STREQUAL "pic" )
            list(APPEND CXX_FLAGS  "-fPIC")
          endif()
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_STL_DEBUG STREQUAL "default") )
      if (  NOT ( JLN_FLAGS_STL_DEBUG STREQUAL "off" ) )
        if (  JLN_FLAGS_STL_DEBUG STREQUAL "assert_as_exception" )
          list(APPEND CXX_FLAGS  "-D_LIBCPP_DEBUG_USE_EXCEPTIONS")
        endif()
        if (  ( JLN_FLAGS_STL_DEBUG STREQUAL "allow_broken_abi" OR JLN_FLAGS_STL_DEBUG STREQUAL "allow_broken_abi_and_bugs" ) )
          if (  JLN_CLANG_CXX_COMPILER )
            if (  ( NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0" ) OR JLN_FLAGS_STL_DEBUG STREQUAL "allow_broken_abi_and_bugs" ) )
              list(APPEND CXX_FLAGS  "-D_LIBCPP_DEBUG=1")
            endif()
          endif()
          list(APPEND CXX_FLAGS  "-D_GLIBCXX_DEBUG")
        else()
          list(APPEND CXX_FLAGS  "-D_GLIBCXX_ASSERTIONS")
        endif()
        if (  NOT ( JLN_FLAGS_PEDANTIC STREQUAL "default") )
          if (  NOT ( JLN_FLAGS_PEDANTIC STREQUAL "off" ) )
            list(APPEND CXX_FLAGS  "-D_GLIBCXX_DEBUG_PEDANTIC")
          endif()
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_SHADOW_WARNINGS STREQUAL "default") )
      if (  JLN_FLAGS_SHADOW_WARNINGS STREQUAL "off" )
        list(APPEND CXX_FLAGS  "-Wno-shadow")
        if (  ( JLN_CLANG_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0" ) ) )
          list(APPEND CXX_FLAGS  "-Wno-shadow-field")
        endif()
      else()
        if (  JLN_FLAGS_SHADOW_WARNINGS STREQUAL "on" )
          list(APPEND CXX_FLAGS  "-Wshadow")
        else()
          if (  JLN_FLAGS_SHADOW_WARNINGS STREQUAL "all" )
            if (  JLN_CLANG_CXX_COMPILER )
              list(APPEND CXX_FLAGS  "-Wshadow-all")
            else()
              list(APPEND CXX_FLAGS  "-Wshadow")
            endif()
          else()
            if (  ( JLN_GCC_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.1" ) ) )
              if (  JLN_FLAGS_SHADOW_WARNINGS STREQUAL "local" )
                list(APPEND CXX_FLAGS  "-Wshadow=local")
              else()
                if (  JLN_FLAGS_SHADOW_WARNINGS STREQUAL "compatible_local" )
                  list(APPEND CXX_FLAGS  "-Wshadow=compatible-local")
                endif()
              endif()
            endif()
          endif()
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_ELIDE_TYPE STREQUAL "default") )
      if (  JLN_FLAGS_ELIDE_TYPE STREQUAL "on" )
        if (  ( JLN_GCC_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0" ) ) )
          list(APPEND CXX_FLAGS  "-felide-type")
        endif()
      else()
        if (  ( ( JLN_GCC_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0" ) ) OR ( JLN_CLANG_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.4" ) ) ) )
          list(APPEND CXX_FLAGS  "-fno-elide-type")
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_EXCEPTIONS STREQUAL "default") )
      if (  JLN_FLAGS_EXCEPTIONS STREQUAL "on" )
        list(APPEND CXX_FLAGS  "-fexceptions")
      else()
        list(APPEND CXX_FLAGS  "-fno-exceptions")
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_RTTI STREQUAL "default") )
      if (  JLN_FLAGS_RTTI STREQUAL "on" )
        list(APPEND CXX_FLAGS  "-frtti")
      else()
        list(APPEND CXX_FLAGS  "-fno-rtti")
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_DIAGNOSTICS_SHOW_TEMPLATE_TREE STREQUAL "default") )
      if (  ( ( JLN_GCC_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0" ) ) OR JLN_CLANG_CXX_COMPILER ) )
        if (  JLN_FLAGS_DIAGNOSTICS_SHOW_TEMPLATE_TREE STREQUAL "on" )
          list(APPEND CXX_FLAGS  "-fdiagnostics-show-template-tree")
        else()
          list(APPEND CXX_FLAGS  "-fno-diagnostics-show-template-tree")
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_SANITIZERS_EXTRA STREQUAL "default") )
      if (  JLN_FLAGS_SANITIZERS_EXTRA STREQUAL "thread" )
        list(APPEND CXX_FLAGS  "-fsanitize=thread")
      else()
        if (  JLN_FLAGS_SANITIZERS_EXTRA STREQUAL "pointer" )
          if (  ( JLN_GCC_CXX_COMPILER AND NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0" ) ) )
            list(APPEND CXX_FLAGS  "-fsanitize=pointer-compare" "-fsanitize=pointer-subtract")
          endif()
        endif()
      endif()
    endif()
  endif()
  if (  JLN_LLD_LINK_CXX_LINKER )
    if (  NOT ( JLN_FLAGS_LTO STREQUAL "default") )
      if (  JLN_FLAGS_LTO STREQUAL "off" )
        list(APPEND CXX_FLAGS  "-fno-lto")
      else()
        if (  JLN_FLAGS_LTO STREQUAL "thin" )
          list(APPEND CXX_FLAGS  "-flto=thin")
        else()
          list(APPEND CXX_FLAGS  "-flto")
          list(APPEND LINK_FLAGS  "-flto")
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_WHOLE_PROGRAM STREQUAL "default") )
      if (  JLN_FLAGS_WHOLE_PROGRAM STREQUAL "off" )
        list(APPEND CXX_FLAGS  "-fno-whole-program")
      else()
        if (  NOT ( JLN_FLAGS_LTO STREQUAL "default") )
          if (  NOT ( JLN_FLAGS_LTO STREQUAL "off" ) )
            list(APPEND CXX_FLAGS  "-fwhole-program-vtables")
            list(APPEND LINK_FLAGS  "-fwhole-program-vtables")
          endif()
        endif()
      endif()
    endif()
  endif()
  if (  ( JLN_MSVC_CXX_COMPILER OR JLN_CLANG_CL_CXX_COMPILER ) )
    if (  NOT ( JLN_FLAGS_STL_FIX STREQUAL "default") )
      if (  JLN_FLAGS_STL_FIX STREQUAL "on" )
        list(APPEND CXX_FLAGS  "/DNOMINMAX")
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_DEBUG STREQUAL "default") )
      if (  JLN_FLAGS_DEBUG STREQUAL "off" )
        list(APPEND CXX_FLAGS  "/DEBUG:NONE")
      else()
        list(APPEND CXX_FLAGS  "/RTC1" "/Od")
        if (  JLN_FLAGS_DEBUG STREQUAL "on" )
          list(APPEND CXX_FLAGS  "/DEBUG")
        else()
          if (  JLN_FLAGS_DEBUG STREQUAL "line_tables_only" )
            list(APPEND CXX_FLAGS  "/DEBUG:FASTLINK")
          endif()
        endif()
        if (  NOT ( JLN_FLAGS_OPTIMIZATION STREQUAL "default") )
          if (  JLN_FLAGS_OPTIMIZATION STREQUAL "g" )
            list(APPEND CXX_FLAGS  "/Zi")
          else()
            if (  NOT ( JLN_FLAGS_WHOLE_PROGRAM STREQUAL "default") )
              if (  JLN_FLAGS_WHOLE_PROGRAM STREQUAL "off" )
                list(APPEND CXX_FLAGS  "/ZI")
              else()
                list(APPEND CXX_FLAGS  "/Zi")
              endif()
            else()
              list(APPEND CXX_FLAGS  "/ZI")
            endif()
          endif()
        else()
          if (  NOT ( JLN_FLAGS_WHOLE_PROGRAM STREQUAL "default") )
            if (  JLN_FLAGS_WHOLE_PROGRAM STREQUAL "off" )
              list(APPEND CXX_FLAGS  "/ZI")
            else()
              list(APPEND CXX_FLAGS  "/Zi")
            endif()
          else()
            list(APPEND CXX_FLAGS  "/ZI")
          endif()
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_EXCEPTIONS STREQUAL "default") )
      if (  JLN_FLAGS_EXCEPTIONS STREQUAL "on" )
        list(APPEND CXX_FLAGS  "/EHsc" "/D_HAS_EXCEPTIONS=1")
      else()
        list(APPEND CXX_FLAGS  "/EHs-" "/D_HAS_EXCEPTIONS=0")
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_OPTIMIZATION STREQUAL "default") )
      if (  JLN_FLAGS_OPTIMIZATION STREQUAL "0" )
        list(APPEND CXX_FLAGS  "/Ob0" "/Od" "/Oi-" "/Oy-")
      else()
        if (  JLN_FLAGS_OPTIMIZATION STREQUAL "g" )
          list(APPEND CXX_FLAGS  "/Ob1")
        else()
          list(APPEND CXX_FLAGS  "/DNDEBUG")
          if (  JLN_FLAGS_OPTIMIZATION STREQUAL "1" )
            list(APPEND CXX_FLAGS  "/O1")
          else()
            if (  JLN_FLAGS_OPTIMIZATION STREQUAL "2" )
              list(APPEND CXX_FLAGS  "/O2")
            else()
              if (  JLN_FLAGS_OPTIMIZATION STREQUAL "3" )
                list(APPEND CXX_FLAGS  "/O2")
              else()
                if (  JLN_FLAGS_OPTIMIZATION STREQUAL "size" )
                  list(APPEND CXX_FLAGS  "/O1" "/Gw")
                else()
                  if (  JLN_FLAGS_OPTIMIZATION STREQUAL "fast" )
                    list(APPEND CXX_FLAGS  "/O2" "/fp:fast")
                  endif()
                endif()
              endif()
            endif()
          endif()
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_WHOLE_PROGRAM STREQUAL "default") )
      if (  JLN_FLAGS_WHOLE_PROGRAM STREQUAL "off" )
        list(APPEND CXX_FLAGS  "/GL-")
      else()
        list(APPEND CXX_FLAGS  "/GL" "/Gw")
        list(APPEND LINK_FLAGS  "/LTCG")
        if (  JLN_FLAGS_WHOLE_PROGRAM STREQUAL "strip_all" )
          list(APPEND LINK_FLAGS  "/OPT:REF")
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_PEDANTIC STREQUAL "default") )
      if (  NOT ( JLN_FLAGS_PEDANTIC STREQUAL "off" ) )
        list(APPEND CXX_FLAGS  "/permissive-" "/Zc:__cplusplus")
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_RTTI STREQUAL "default") )
      if (  JLN_FLAGS_RTTI STREQUAL "on" )
        list(APPEND CXX_FLAGS  "/GR")
      else()
        list(APPEND CXX_FLAGS  "/GR-")
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_STL_DEBUG STREQUAL "default") )
      if (  JLN_FLAGS_STL_DEBUG STREQUAL "off" )
        list(APPEND CXX_FLAGS  "/D_HAS_ITERATOR_DEBUGGING=0")
      else()
        list(APPEND CXX_FLAGS  "/D_DEBUG" "/D_HAS_ITERATOR_DEBUGGING=1")
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_CONTROL_FLOW STREQUAL "default") )
      if (  JLN_FLAGS_CONTROL_FLOW STREQUAL "off" )
        list(APPEND CXX_FLAGS  "/guard:cf-")
      else()
        list(APPEND CXX_FLAGS  "/guard:cf")
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_STACK_PROTECTOR STREQUAL "default") )
      if (  JLN_FLAGS_STACK_PROTECTOR STREQUAL "off" )
        list(APPEND CXX_FLAGS  "/GS-")
      else()
        list(APPEND CXX_FLAGS  "/GS" "/sdl")
        if (  JLN_FLAGS_STACK_PROTECTOR STREQUAL "strong" )
          list(APPEND CXX_FLAGS  "/RTC1")
        else()
          if (  JLN_FLAGS_STACK_PROTECTOR STREQUAL "all" )
            list(APPEND CXX_FLAGS  "/RTC1" "/RTCc")
          endif()
        endif()
      endif()
    endif()
  endif()
  if (  JLN_MSVC_CXX_COMPILER )
    if (  NOT ( JLN_FLAGS_MSVC_ISYSTEM STREQUAL "default") )
      list(APPEND CXX_FLAGS  "/experimental:external" "/external:W0")
      if (  JLN_FLAGS_MSVC_ISYSTEM STREQUAL "anglebrackets" )
        list(APPEND CXX_FLAGS  "/external:anglebrackets")
      else()
        list(APPEND CXX_FLAGS  "/external:env:INCLUDE" "/external:env:CAExcludePath")
      endif()
      if (  NOT ( JLN_FLAGS_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL STREQUAL "default") )
        if (  JLN_FLAGS_MSVC_ISYSTEM_WITH_TEMPLATE_FROM_NON_EXTERNAL STREQUAL "off" )
          list(APPEND CXX_FLAGS  "/external:template")
        else()
          list(APPEND CXX_FLAGS  "/external:template-")
        endif()
      endif()
      if (  NOT ( JLN_FLAGS_WARNINGS STREQUAL "default") )
        if (  JLN_FLAGS_WARNINGS STREQUAL "off" )
          list(APPEND CXX_FLAGS  "/W0")
        else()
          list(APPEND CXX_FLAGS  "/wd4710" "/wd4711")
          if (  NOT ( NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.21" ) ) )
            list(APPEND CXX_FLAGS  "/wd4774")
          endif()
          if (  JLN_FLAGS_WARNINGS STREQUAL "on" )
            list(APPEND CXX_FLAGS  "/W4" "/wd4244" "/wd4245")
          else()
            list(APPEND CXX_FLAGS  "/Wall" "/wd4571" "/wd4355" "/wd4548" "/wd4577" "/wd4820" "/wd5039" "/wd4464" "/wd4868" "/wd5045")
            if (  JLN_FLAGS_WARNINGS STREQUAL "strict" )
              list(APPEND CXX_FLAGS  "/wd4583" "/wd4619")
            endif()
          endif()
        endif()
      endif()
    else()
      if (  NOT ( JLN_FLAGS_WARNINGS STREQUAL "default") )
        if (  JLN_FLAGS_WARNINGS STREQUAL "off" )
          list(APPEND CXX_FLAGS  "/W0")
        else()
          if (  JLN_FLAGS_WARNINGS STREQUAL "on" )
            list(APPEND CXX_FLAGS  "/W4" "/wd4244" "/wd4245" "/wd4711")
          else()
            list(APPEND CXX_FLAGS  "/Wall" "/wd4355" "/wd4365" "/wd4514" "/wd4548" "/wd4571" "/wd4577" "/wd4625" "/wd4626" "/wd4668" "/wd4710" "/wd4711")
            if (  NOT ( NOT ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.21" ) ) )
              list(APPEND CXX_FLAGS  "/wd4774")
            endif()
            list(APPEND CXX_FLAGS  "/wd4820" "/wd5026" "/wd5027" "/wd5039" "/wd4464" "/wd4868" "/wd5045")
            if (  JLN_FLAGS_WARNINGS STREQUAL "strict" )
              list(APPEND CXX_FLAGS  "/wd4061" "/wd4266" "/wd4388" "/wd4583" "/wd4619" "/wd4623" "/wd5204")
            endif()
          endif()
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_SHADOW_WARNINGS STREQUAL "default") )
      if (  JLN_FLAGS_SHADOW_WARNINGS STREQUAL "off" )
        list(APPEND CXX_FLAGS  "/wd4456" "/wd4459")
      else()
        if (  ( JLN_FLAGS_SHADOW_WARNINGS STREQUAL "on" OR JLN_FLAGS_SHADOW_WARNINGS STREQUAL "all" ) )
          list(APPEND CXX_FLAGS  "/w4456" "/w4459")
        else()
          if (  JLN_FLAGS_SHADOW_WARNINGS STREQUAL "local" )
            list(APPEND CXX_FLAGS  "/w4456" "/wd4459")
          endif()
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_WARNINGS_AS_ERROR STREQUAL "default") )
      if (  JLN_FLAGS_WARNINGS_AS_ERROR STREQUAL "on" )
        list(APPEND CXX_FLAGS  "/WX")
        list(APPEND LINK_FLAGS  "/WX")
      else()
        if (  JLN_FLAGS_WARNINGS_AS_ERROR STREQUAL "off" )
          list(APPEND CXX_FLAGS  "/WX-")
        endif()
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_LTO STREQUAL "default") )
      if (  JLN_FLAGS_LTO STREQUAL "off" )
        list(APPEND CXX_FLAGS  "/LTCG:OFF")
      else()
        list(APPEND CXX_FLAGS  "/GL")
        list(APPEND LINK_FLAGS  "/LTCG")
      endif()
    endif()
    if (  NOT ( JLN_FLAGS_SANITIZERS STREQUAL "default") )
      if (  JLN_FLAGS_SANITIZERS STREQUAL "on" )
        list(APPEND CXX_FLAGS  "/sdl")
      else()
        if (  NOT ( JLN_FLAGS_STACK_PROTECTOR STREQUAL "default") )
          if (  NOT ( JLN_FLAGS_STACK_PROTECTOR STREQUAL "off" ) )
            list(APPEND CXX_FLAGS  "/sdl-")
          endif()
        endif()
      endif()
    endif()
  endif()
  if(JLN_FLAGS_CXX_VAR)
    set(${JLN_FLAGS_CXX_VAR} ${CXX_FLAGS} PARENT_SCOPE)
  endif()
  if(JLN_FLAGS_LINK_VAR)
    set(${JLN_FLAGS_LINK_VAR} ${LINK_FLAGS} PARENT_SCOPE)
  endif()
endfunction()
