Add precompiled header

This commit is contained in:
Grayson Riffe 2025-01-23 16:49:52 -06:00
parent 9b6e333652
commit 73445af2e7
3 changed files with 41 additions and 2 deletions

View File

@ -1,5 +1,9 @@
# NF library CMakeLists.txt
add_library(NothinFancy STATIC "src/Engine.cpp" "src/include/nf.h")
add_library(NothinFancy STATIC "src/Engine.cpp" "src/include/nf.h" "src/pch.h")
# Use C++20
set_property(TARGET NothinFancy PROPERTY CXX_STANDARD 20)
# Use precompiled header
target_precompile_headers(NothinFancy PUBLIC "src/pch.h")
target_include_directories(NothinFancy PUBLIC "src/")

View File

@ -1,5 +1,5 @@
// NF startup
#include <iostream>
#include "pch.h"
namespace nf {
void test() {

35
NothinFancy/src/pch.h Normal file
View File

@ -0,0 +1,35 @@
// NF precompiled header
#pragma once
// IO and strings
#include <iostream>
#include <fstream>
#include <filesystem>
#include <sstream>
#include <string>
#include <format>
// Containers
#include <vector>
#include <array>
#include <queue>
#include <stack>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
// Multithreading
#include <thread>
#include <mutex>
#include <atomic>
#include <future>
#include <condition_variable>
// Miscellaneous
#include <chrono>
#include <utility>
#include <memory>
#include <algorithm>
#include <numbers>
#include <random>