Enabled pch in CMake.

No need to remove old pch includes.
This commit is contained in:
Muzychenko Andrey 2021-09-15 12:20:57 +03:00
parent c5b7c0ad16
commit af5a70785e
2 changed files with 16 additions and 6 deletions

View File

@ -51,7 +51,6 @@ set(SOURCE_FILES
SpaceCadetPinball/partman.h
SpaceCadetPinball/pb.cpp
SpaceCadetPinball/pb.h
SpaceCadetPinball/pch.cpp
SpaceCadetPinball/pch.h
SpaceCadetPinball/pinball.cpp
SpaceCadetPinball/pinball.h
@ -168,6 +167,22 @@ set(SOURCE_FILES
add_executable(SpaceCadetPinball ${SOURCE_FILES})
# Skip pch on foreign code
set_source_files_properties(
SpaceCadetPinball/imgui.cpp
SpaceCadetPinball/imgui_sdl.cpp
SpaceCadetPinball/imgui_draw.cpp
SpaceCadetPinball/imgui_widgets.cpp
SpaceCadetPinball/imgui_tables.cpp
SpaceCadetPinball/imgui_demo.cpp
SpaceCadetPinball/imgui_impl_sdl.cpp
PROPERTIES SKIP_PRECOMPILE_HEADERS 1
)
target_precompile_headers(SpaceCadetPinball
PUBLIC
SpaceCadetPinball/pch.h
)
target_link_libraries(SpaceCadetPinball ${SDL2_LIBRARY} ${SDL2_MIXER_LIBRARY})
# On Windows, copy DLL to output

View File

@ -1,5 +0,0 @@
// pch.cpp: source file corresponding to pre-compiled header; necessary for compilation to succeed
#include "pch.h"
// In general, ignore this file, but keep it around if you are using pre-compiled headers.