From 73445af2e7428751eb86bd60aff7da5a1f90e189 Mon Sep 17 00:00:00 2001 From: Grayson Riffe Date: Thu, 23 Jan 2025 16:49:52 -0600 Subject: [PATCH] Add precompiled header --- NothinFancy/CMakeLists.txt | 6 +++++- NothinFancy/src/Engine.cpp | 2 +- NothinFancy/src/pch.h | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 NothinFancy/src/pch.h diff --git a/NothinFancy/CMakeLists.txt b/NothinFancy/CMakeLists.txt index ab0e7c2..a16590d 100644 --- a/NothinFancy/CMakeLists.txt +++ b/NothinFancy/CMakeLists.txt @@ -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/") diff --git a/NothinFancy/src/Engine.cpp b/NothinFancy/src/Engine.cpp index 91c9df4..a17544d 100644 --- a/NothinFancy/src/Engine.cpp +++ b/NothinFancy/src/Engine.cpp @@ -1,5 +1,5 @@ // NF startup -#include +#include "pch.h" namespace nf { void test() { diff --git a/NothinFancy/src/pch.h b/NothinFancy/src/pch.h new file mode 100644 index 0000000..899f7c1 --- /dev/null +++ b/NothinFancy/src/pch.h @@ -0,0 +1,35 @@ +// NF precompiled header +#pragma once + +// IO and strings +#include +#include +#include +#include +#include +#include + +// Containers +#include +#include +#include +#include +#include +#include +#include +#include + +// Multithreading +#include +#include +#include +#include +#include + +// Miscellaneous +#include +#include +#include +#include +#include +#include