file (GLOB examplesources *.cpp)
foreach (examplesourcefile ${examplesources})
  get_filename_component (exename ${examplesourcefile} NAME_WE)
  add_executable (${exename} ${examplesourcefile})
  set_property (TARGET ${exename} PROPERTY CXX_STANDARD 11)
  set_property (TARGET ${exename} PROPERTY CXX_STANDARD_REQUIRED ON)
  set_property (TARGET ${exename} PROPERTY CXX_EXTENSIONS OFF)
  target_link_libraries (${exename} taocpp::pegtl)
  if (MSVC)
    target_compile_options (${exename} PRIVATE /W4 /WX /utf-8)
  else ()
    target_compile_options (${exename} PRIVATE -pedantic -Wall -Wextra -Wshadow -Werror)
  endif ()
endforeach (examplesourcefile)
