All Projects → larsch → Cmake Precompiled Header

larsch / Cmake Precompiled Header

Visual Studio and GCC precompiled header macro for CMake

Labels

Projects that are alternatives of or similar to Cmake Precompiled Header

Minimal cmake example
this tries to be a minimal cmake example, that covers sources resources dependencies and packaging.
Stars: ✭ 142 (-7.19%)
Mutual labels:  cmake
Go Static Linking
Demo of how to static link a c library to some go code.
Stars: ✭ 145 (-5.23%)
Mutual labels:  cmake
Arm Cmake Toolchains
CMake toolchain configurations for ARM
Stars: ✭ 148 (-3.27%)
Mutual labels:  cmake
Ocean
A C/C++ build system/project manager written in Rust
Stars: ✭ 144 (-5.88%)
Mutual labels:  cmake
Grpc Cmake Example
gRPC C++ example with CMake
Stars: ✭ 142 (-7.19%)
Mutual labels:  cmake
Node
Credits Node is the main module that provide an opportunity to run a node and participate in CREDITS blockchain network.
Stars: ✭ 147 (-3.92%)
Mutual labels:  cmake
Reggae
Build system in D, Python, Ruby, Javascript or Lua
Stars: ✭ 141 (-7.84%)
Mutual labels:  cmake
Jinx
Embeddable scripting language for real-time applications
Stars: ✭ 150 (-1.96%)
Mutual labels:  cmake
Moderncppstarter
🚀 Kick-start your C++! A template for modern C++ projects using CMake, CI, code coverage, clang-format, reproducible dependency management and much more.
Stars: ✭ 2,381 (+1456.21%)
Mutual labels:  cmake
Logic
CMake, SystemVerilog and SystemC utilities for creating, building and testing RTL projects for FPGAs and ASICs.
Stars: ✭ 149 (-2.61%)
Mutual labels:  cmake
Modern Wasm Starter
🛸 Run C++ code on web and create blazingly fast websites! A starter template to easily create WebAssembly packages using type-safe C++ bindings with automatic TypeScript declarations.
Stars: ✭ 140 (-8.5%)
Mutual labels:  cmake
Fibos
[WIP] JavaScript Toolchain on EOS
Stars: ✭ 144 (-5.88%)
Mutual labels:  cmake
Polyfem
A polyvalent C++ FEM library
Stars: ✭ 147 (-3.92%)
Mutual labels:  cmake
Huggle3 Qt Lx
Huggle is an anti-vandalism tool for use on MediaWiki based projects
Stars: ✭ 143 (-6.54%)
Mutual labels:  cmake
Pmm
It's the C++ Package Manager Manager
Stars: ✭ 150 (-1.96%)
Mutual labels:  cmake
Multi Rtl
Multi-channel receiver with use of RTL-SDR dongles
Stars: ✭ 142 (-7.19%)
Mutual labels:  cmake
Metabench
A simple framework for compile-time benchmarks
Stars: ✭ 146 (-4.58%)
Mutual labels:  cmake
Cython Cmake Example
Utilities and example for using CMake to build Cython modules - migrated to scikit-build
Stars: ✭ 151 (-1.31%)
Mutual labels:  cmake
Androidsecurity
Android安全实践
Stars: ✭ 150 (-1.96%)
Mutual labels:  cmake
Ffmpeg Video Player
An FFmpeg and SDL Tutorial.
Stars: ✭ 149 (-2.61%)
Mutual labels:  cmake

cmake-precompiled-header

Precompiled header setup for CMake. Supported CMake generators:

  • Visual Studio
  • NMake Makefiles
  • Unix Makefiles (GCC)
  • MinGW Makefiles
  • MSYS Makefiles
  • Ninja

Usage

Create a pchheader.{c,cpp} and pchheader.h and add then to the CMake target:

add_library(target ... pchheader.cpp pchheeader.h)

pchheader.h can include all the huge header files that are used everywhere in your project:

#include <string>
#include <iostream>
#include <list>
#include <map>

pchheader.{c,cpp} should just include the header file:

#include "pchheader.h"

In your main CMakeLists.txt, include the macro file:

include(PrecompiledHeader.cmake)

Then add this line, to set up precompiled headers:

add_precompiled_header(target pchheader.h FORCEINCLUDE)

Additional documentation is in PrecompiledHeader.cmake.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].