Add precompiled header
This commit is contained in:
parent
df359a712e
commit
8db25f6eb7
@ -1,5 +1,5 @@
|
||||
# Mainspring app CMakeLists.txt
|
||||
add_executable(Mainspring WIN32 "src/Mainspring.cpp")
|
||||
add_executable(Mainspring WIN32 "src/Mainspring.cpp" "src/pch.h")
|
||||
|
||||
set_property(TARGET Mainspring PROPERTY CXX_STANDARD 20)
|
||||
|
||||
@ -9,6 +9,8 @@ if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
||||
set_property(TARGET Mainspring PROPERTY WIN32_EXECUTABLE FALSE)
|
||||
endif()
|
||||
|
||||
target_precompile_headers(Mainspring PUBLIC "src/pch.h")
|
||||
|
||||
find_package(Git)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} describe OUTPUT_VARIABLE MAINSPRING_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
configure_file(src/version.h.in version.h)
|
||||
|
@ -1,6 +1,5 @@
|
||||
// Mainspring main file
|
||||
#include <iostream>
|
||||
#include <format>
|
||||
#include "pch.h"
|
||||
|
||||
#include "version.h"
|
||||
|
||||
|
14
Mainspring/src/pch.h
Normal file
14
Mainspring/src/pch.h
Normal file
@ -0,0 +1,14 @@
|
||||
// Mainspring precompiled header
|
||||
|
||||
// IO and strings
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <format>
|
||||
|
||||
// Time
|
||||
#include <chrono>
|
||||
|
||||
// Windows
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
Loading…
x
Reference in New Issue
Block a user