message: CMake: Use target_compile_options
  Modifying CXX_FLAGS is legacy; idiomatic CMake should use
  target_compile_options. We also change the CMake setup to define -Werror
  etc for gcc builds as well.
diff: @@ -3,10 +3,6 @@ cmake_minimum_required(VERSION 3.0)
  option(BUILD_DEMO "Build demo" OFF)
  -if(MSVC)
  - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /WX")
  -endif(MSVC)
  -
  set(SOURCES
  src/meshoptimizer.h
  src/indexcodec.cpp
  @@ -26,6 +22,12 @@ set(SOURCES
  add_library(meshoptimizer STATIC ${SOURCES})
  target_include_directories(meshoptimizer INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/src")
  +if(MSVC)
  + target_compile_options(meshoptimizer PRIVATE /W4 /WX)
  +else()
  + target_compile_options(meshoptimizer PRIVATE -Wall -Wextra -Werror)
  +endif()
  +
  if(BUILD_DEMO)
  add_executable(demo demo/main.cpp demo/miniz.cpp demo/objparser.cpp)
  target_link_libraries(demo meshoptimizer)
  