• Stars
    star
    158
  • Rank 237,131 (Top 5 %)
  • Language CMake
  • Created over 10 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Visual Studio and GCC precompiled header macro for 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.

More Repositories

1

ocra

One-Click Ruby Application Builder
Ruby
821
star
2

lasercut-box-openscad

OpenSCAD module for generating cutting plans for boxes
OpenSCAD
44
star
3

creole

Creole-to-HTML converter
Ruby
29
star
4

eclipse-linecopypaste

Eclipse Plugin to Copy/Paste lines when nothing is selected
Java
14
star
5

w32time

Command line utility to measure process running and CPU times
C
9
star
6

AutoHotkeyScripts

Personal AutoHotkey Scripts
AutoHotkey
6
star
7

rpi-mems-sensor

Raspberry Pi Driver for MEMS Sensor Evaluation Board
C
4
star
8

puttykey

PuTTY Key Parser/Formatter
Ruby
3
star
9

webfractals

Multi-core Mandelbrot/Julia Fractal Generator in Javascript
JavaScript
3
star
10

racert

Very fast traceroute tool for Windows
C++
2
star
11

home

Personal configuration files
Emacs Lisp
2
star
12

swserial

Arduino/ESP8266 Software Serial Implementation
Makefile
2
star
13

rakeruby4win

Rakefile to build Ruby using MingW on Windows
Ruby
2
star
14

grc-rs

Generic Colouriser in Rust
Rust
2
star
15

wunow

Install Windows Updates now from the command line
C#
1
star
16

openscad-modules

OpenSCAD
1
star
17

loadwrap

Hooks for wrapping load of Ruby code in your own methods before they are run by Ruby
Ruby
1
star
18

linux-font-madness

Shell
1
star
19

veth-examples

Example scripts for configure network namespaces with veth devices
Shell
1
star
20

raspi-off-button

Daemon that powers off an Raspberry PI power off on GPIO signal
C
1
star
21

ESP8266CMD

ESP8266 (Core for Arduino) Command handler
C++
1
star
22

foliage

Ruby decision/condition coverage analysis
Ruby
1
star
23

QtSkeleton

Qt Project Skeleton (CMake, UI, Resource, Icon)
CMake
1
star
24

inst

Hacks for installing some Windows software
Ruby
1
star
25

eagle-lbr

Personal Eagle Library Creations
1
star