项目作者: tsuyoshicho

项目描述 :
CMake and Clang/GCC sample project in Windows (Native CMake/LLVM/MinGW gcc/Ninja)
高级语言: CMake
项目地址: git://github.com/tsuyoshicho/cmake-example.git
创建时间: 2018-03-31T07:51:26Z
项目社区:https://github.com/tsuyoshicho/cmake-example

开源协议:GNU General Public License v3.0

下载


Project

Cmake with Clang/GCC example for windows

Support environment

Window with

  • Cmake
  • LLVM
  • MinGW (path C:\tools\mingw64)
  • Ninja

cmake/clang/gcc/(mingw32-make)/ninja add to %PATH%

build

for GCC

  1. $ cd build
  2. $ cmake -C ../gcc-cmakeinit.cmake -GNinja ../src
  3. $ <run command>

for Clang

  1. $ cd build
  2. $ cmake -C ../clang-cmakeinit.cmake -GNinja ../src
  3. $ <run command>

note:current version

Ninja build are failed; use alt ex.clang

  1. $ cmake -GNinja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS="--target=x86_64-pc-windows-gnu" ../src

Support build method (-G)

  • “MSYS Makefiles” - mingw32-make
  • “MinGW Makefiles” - mingw32-make
  • Ninja - ninja