title: How to remove c++ compilation flag of ninja from cmake run by VCPKG?
body: <p>I'm trying to build <a href="https://www.boost.org/doc/libs/1_75_0/doc/html/container.html" rel="nofollow noreferrer">boost-container</a> on <strong>Raspberry Pi 4</strong> with <a href="https://github.com/Microsoft/vcpkg" rel="nofollow noreferrer">VCPKG package manager</a>.
  The problem is that one of compilation flags <code>-m64</code> is invalid for compiler on rpi (but is OK for PCs), so I need to remove the flag. It is extremally hard, because VCPKG is using cmake, to build with ninja, which uses <code>b2</code> to build boost.</p>
  <p>I need to have version of VCPKG: <code>ebe505081b667a9f9a56596057f63ed20be237a5</code>. So to reproduce the problem on RPI:</p>
  <pre><code>git clone https://github.com/microsoft/vcpkg.git
  cd vcpkg/
  git checkout ebe505081b667a9f9a56596057f63ed20be237a5
  ./bootstrap-vcpkg.sh -useSystemBinaries # for that version it is necessairy for RPI
  ./vcpkg install boost-container
  </code></pre>
  <p>After running commands above above I see problem with the <code>-m64</code> flag:</p>
  <pre><code>Starting package 17/17: boost-container:x64-linux
  Building package boost-container[core]:x64-linux...
  -- Downloading https://github.com/boostorg/container/archive/boost-1.71.0.tar.gz...
  -- Extracting source /home/agh/vcpkg/downloads/boostorg-container-boost-1.71.0.tar.gz
  -- Using source at /home/agh/vcpkg/buildtrees/boost-container/src/ost-1.71.0-aa14783b9a
  -- Configuring x64-linux-dbg
  -- Configuring x64-linux-rel
  -- Building x64-linux-dbg
  CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:136 (message):
      Command failed: /usr/bin/cmake --build . --config Debug --target install -- -v
      Working Directory: /home/agh/vcpkg/buildtrees/boost-container/x64-linux-dbg
      See logs for more information:
        /home/agh/vcpkg/buildtrees/boost-container/install-x64-linux-dbg-out.log
  
  Call Stack (most recent call first):
    scripts/cmake/vcpkg_build_cmake.cmake:91 (vcpkg_execute_build_process)
    scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
    installed/x64-linux/share/boost-build/boost-modular-build.cmake:90 (vcpkg_install_cmake)
    ports/boost-container/portfile.cmake:14 (boost_modular_build)
    scripts/ports.cmake:94 (include)
  
  
  Error: Building package boost-container:x64-linux failed with: BUILD_FAILED
  Please ensure you're using the latest portfiles with `.\vcpkg update`, then
  submit an issue at https://github.com/Microsoft/vcpkg/issues including:
    Package: boost-container:x64-linux
    Vcpkg version: 2019.09.12-unknownhash
  
  Additionally, attach any relevant sections from the log files above.
  
  But the problem was:
  gcc.compile.c /home/agh/vcpkg/buildtrees/boost-container/x64-linux-dbg/boost/build/e3cde813a01d557174a1b469417f2150/alloc_lib.o
  c++: error: unrecognized command-line option ‘-m64’
  
      &quot;/usr/bin/c++&quot; -x c -m64 -pthread -O0 -fno-inline -Wall -g  -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTAINER_STATIC_LINK=1  -I&quot;../include&quot; -I&quot;/home/agh/vcpkg/installed/x64-linux/include&quot; -c -o &quot;/home/agh/vcpkg/buildtrees/boost-container/x64-linux-dbg/boost/build/e3cde813a01d557174a1b469417f2150/alloc_lib.o&quot; &quot;../src/alloc_lib.c&quot;
  
  ...failed gcc.compile.c /home/agh/vcpkg/buildtrees/boost-container/x64-linux-dbg/boost/build/e3cde813a01d557174a1b469417f2150/alloc_lib.o...
  ...failed updating 1 target...
  ...updated 5 targets...
  ninja: build stopped: subcommand failed.
  </code></pre>
  <p>I've checked working directory:</p>
  <pre><code>find /home/agh/vcpkg/buildtrees/boost-container/x64-linux-dbg -type f | xargs grep m64
  </code></pre>
  <p>but there is nothing to remove the flag I've noticed.</p>
  <p><strong>The only solution I found is to create compiler wrapper binary, which ignores only that one flag <code>-m64</code> - but I hope it is better solution to create patch to CMake of boost-contaier?</strong></p>