Add precompiled header
This commit is contained in:
1 parent
df359a712e
commit
8db25f6eb7
3 files changed
+18
-3
No files matched your search
@@ -1,5 +1,5 @@
|
|||||||
# Mainspring app CMakeLists.txt
|
# 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)
|
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)
|
set_property(TARGET Mainspring PROPERTY WIN32_EXECUTABLE FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
target_precompile_headers(Mainspring PUBLIC "src/pch.h")
|
||||||
|
|
||||||
find_package(Git)
|
find_package(Git)
|
||||||
execute_process(COMMAND ${GIT_EXECUTABLE} describe OUTPUT_VARIABLE MAINSPRING_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
execute_process(COMMAND ${GIT_EXECUTABLE} describe OUTPUT_VARIABLE MAINSPRING_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
configure_file(src/version.h.in version.h)
|
configure_file(src/version.h.in version.h)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
// Mainspring main file
|
// Mainspring main file
|
||||||
#include <iostream>
|
#include "pch.h"
|
||||||
#include <format>
|
|
||||||
|
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
Reference in new issue
Block a user