From 7b61abef4662560924265357fbe8c4d50ecd389c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 24 Oct 2022 12:54:15 +0200 Subject: a --- compat/integer-types.hpp | 9 --------- editor/CMakeLists.txt | 4 ++++ editor/events.cpp | 5 ++++- editor/precomp.hpp | 18 ++++++++++++++++++ editor/update.cpp | 1 - main/CMakeLists.txt | 5 +++-- main/precomp.hpp | 15 +++++++++++++-- src/precomp.hpp | 2 -- 8 files changed, 42 insertions(+), 17 deletions(-) create mode 100644 editor/precomp.hpp diff --git a/compat/integer-types.hpp b/compat/integer-types.hpp index 14243e72..d270abda 100644 --- a/compat/integer-types.hpp +++ b/compat/integer-types.hpp @@ -1,10 +1,5 @@ #pragma once -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wlanguage-extension-token" -#endif - #ifdef _MSC_VER #ifdef _WIN64 typedef unsigned __int64 size_t; @@ -56,7 +51,3 @@ using ::uint16_t; using ::uint32_t; using ::uint64_t; } // namespace std - -#ifdef __clang__ -#pragma clang diagnostic pop -#endif diff --git a/editor/CMakeLists.txt b/editor/CMakeLists.txt index aef82fec..8e96f92b 100644 --- a/editor/CMakeLists.txt +++ b/editor/CMakeLists.txt @@ -12,4 +12,8 @@ endif() add_executable(${self} "${sources}" "${res}" "../loader/loader-impl.cpp") target_link_libraries(${self} ${PROJECT_NAME}-main) +if(FLOORMAT_PRECOMPILED-HEADERS) + target_precompile_headers(${self} PRIVATE precomp.hpp) +endif() + install(TARGETS ${self} RUNTIME DESTINATION bin) diff --git a/editor/events.cpp b/editor/events.cpp index 67a3c63c..7f7561b0 100644 --- a/editor/events.cpp +++ b/editor/events.cpp @@ -1,9 +1,12 @@ #include "app.hpp" + #include "main/floormat-main.hpp" #include "main/floormat-events.hpp" #include "src/world.hpp" -#include + #include + +#include #include namespace floormat { diff --git a/editor/precomp.hpp b/editor/precomp.hpp new file mode 100644 index 00000000..8c833594 --- /dev/null +++ b/editor/precomp.hpp @@ -0,0 +1,18 @@ +#pragma once + +#include "src/precomp.hpp" + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include diff --git a/editor/update.cpp b/editor/update.cpp index 8247b736..0f723648 100644 --- a/editor/update.cpp +++ b/editor/update.cpp @@ -2,7 +2,6 @@ #include "src/chunk.hpp" #include "main/floormat-events.hpp" #include "main/floormat-main.hpp" -#include namespace floormat { diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 77538920..a2d71a61 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -1,11 +1,12 @@ +set(self ${PROJECT_NAME}-main) file(GLOB sources "*.cpp" CONFIGURE_ARGS) link_libraries(${PROJECT_NAME}) link_libraries(Magnum::Sdl2Application Corrade::Containers Magnum::GL Magnum::Trade) link_libraries(MagnumIntegration::ImGui) -add_library(${PROJECT_NAME}-main STATIC "${sources}") +add_library(${self} STATIC "${sources}") if(FLOORMAT_PRECOMPILED-HEADERS) - target_precompile_headers(${PROJECT_NAME}-main PRIVATE precomp.hpp) + target_precompile_headers(${self} PRIVATE precomp.hpp) endif() diff --git a/main/precomp.hpp b/main/precomp.hpp index bd769578..cff156e7 100644 --- a/main/precomp.hpp +++ b/main/precomp.hpp @@ -2,9 +2,20 @@ #include "src/precomp.hpp" -#include #include - #include + +#include +#include +#include +#include +#include +#include #include #include + +#include +#include +#include + +#include diff --git a/src/precomp.hpp b/src/precomp.hpp index 4ff5d8a7..126643f3 100644 --- a/src/precomp.hpp +++ b/src/precomp.hpp @@ -1,8 +1,6 @@ #pragma once #include "compat/prelude.hpp" -#include "compat/defs.hpp" -#include "compat/assert.hpp" #include #include -- cgit v1.2.3