diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-10 08:52:32 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-10 10:35:00 +0200 |
commit | fdcff54e1d845343cdfe39040aac6f7ff9b4163a (patch) | |
tree | db8de10a96b8022f43761c74a2d58453e3380d93 | |
parent | 8c867fac69fa9da0370000fa170cad1e22702ce5 (diff) |
cmake: remove precompiled headers
They were having problems including fmtlib and robin_map.
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | draw/CMakeLists.txt | 3 | ||||
-rw-r--r-- | editor/CMakeLists.txt | 7 | ||||
-rw-r--r-- | editor/precomp.hpp | 25 | ||||
-rw-r--r-- | loader/precomp.hpp | 7 | ||||
-rw-r--r-- | main/CMakeLists.txt | 14 | ||||
-rw-r--r-- | main/precomp.hpp | 22 | ||||
-rw-r--r-- | serialize/CMakeLists.txt | 4 | ||||
-rw-r--r-- | serialize/precomp.hpp | 4 | ||||
-rw-r--r-- | src/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/precomp.hpp | 50 | ||||
-rw-r--r-- | test/CMakeLists.txt | 3 | ||||
-rw-r--r-- | test/precomp.hpp | 13 | ||||
-rw-r--r-- | userconfig-sthalik@Windows-GNU.cmake | 5 |
14 files changed, 1 insertions, 162 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b32e214e..813da7de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,9 +48,6 @@ if(CMAKE_BUILD_TYPE STREQUAL "") endif() endif() -set(FLOORMAT_PRECOMPILED-HEADERS ON CACHE BOOL - "Use precompiled headers while building the floormat.") - function(sets type) set(i 0) list(LENGTH ARGN max) diff --git a/draw/CMakeLists.txt b/draw/CMakeLists.txt index 843a6cc3..2c12289d 100644 --- a/draw/CMakeLists.txt +++ b/draw/CMakeLists.txt @@ -2,6 +2,3 @@ set(self floormat-draw) file(GLOB sources "*.cpp" CONFIGURE_ARGS) add_library(${self} OBJECT "${sources}") target_link_libraries(${self} PUBLIC Magnum::GL) -if(FLOORMAT_PRECOMPILED-HEADERS) - target_precompile_headers(${self} REUSE_FROM floormat) -endif() diff --git a/editor/CMakeLists.txt b/editor/CMakeLists.txt index f94c21e1..306c95f4 100644 --- a/editor/CMakeLists.txt +++ b/editor/CMakeLists.txt @@ -23,16 +23,9 @@ if(NOT SDL2_INCLUDE_DIRS) get_target_property(SDL2_INCLUDE_DIRS SDL2::SDL2 INTERFACE_INCLUDE_DIRECTORIES) endif() endif() -if(FLOORMAT_PRECOMPILED-HEADERS) - include_directories("${SDL2_INCLUDE_DIRS}") -endif() set_property(SOURCE "events.cpp" APPEND PROPERTY INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}") add_executable(${self} dummy.cc) target_link_libraries(${self} PRIVATE ${self}_o floormat-main floormat-serialize floormat-draw floormat) -if(FLOORMAT_PRECOMPILED-HEADERS) - target_precompile_headers(${self}_o PRIVATE precomp.hpp) -endif() - install(TARGETS ${self} RUNTIME DESTINATION bin) diff --git a/editor/precomp.hpp b/editor/precomp.hpp deleted file mode 100644 index c0167163..00000000 --- a/editor/precomp.hpp +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include "src/precomp.hpp" -#include "entity/metadata.hpp" -#include "entity/accessor.hpp" - -#include "src/entity.hpp" -#include "src/chunk.hpp" -#include "src/world.hpp" -#include "src/global-coords.hpp" -#include "src/anim-atlas.hpp" - -#include "app.hpp" -#include "imgui-raii.hpp" - -#include <cstdlib> -#include <map> - -#include <Corrade/Containers/BitArrayView.h> -#include <Corrade/Utility/Arguments.h> -#include <Magnum/ImGuiIntegration/Context.hpp> - -#if __has_include(<SDL.h>) -#include <Magnum/Platform/Sdl2Application.h> -#endif diff --git a/loader/precomp.hpp b/loader/precomp.hpp deleted file mode 100644 index 4ebd56b2..00000000 --- a/loader/precomp.hpp +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once -#include "../src/precomp.hpp" -#include <Corrade/PluginManager/PluginManager.h> -#include <Corrade/Utility/Implementation/ErrorString.h> -#include <Magnum/Trade/AbstractImporter.h> -#include <Magnum/Trade/ImageData.h> -#include <Magnum/Trade/AbstractImageConverter.h> diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 50e1bc91..fe32d1d5 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -8,17 +8,5 @@ target_link_libraries(${self} PUBLIC Magnum::GL Magnum::Trade fmt::fmt + tsl::robin_map ) - -if(NOT SDL2_INCLUDE_DIRS) - if(NOT TARGET SDL2::SDL2) - find_package(SDL2 QUIET REQUIRED) - else() - get_target_property(SDL2_INCLUDE_DIRS SDL2::SDL2 INTERFACE_INCLUDE_DIRECTORIES) - endif() -endif() -include_directories("${SDL2_INCLUDE_DIRS}") - -if(FLOORMAT_PRECOMPILED-HEADERS) - target_precompile_headers(${self} PRIVATE precomp.hpp) -endif() diff --git a/main/precomp.hpp b/main/precomp.hpp deleted file mode 100644 index 3f60a071..00000000 --- a/main/precomp.hpp +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once -#include "src/precomp.hpp" -#include "floormat/main.hpp" -#include "floormat/app.hpp" -#include "floormat/settings.hpp" -#include "main-impl.hpp" - -#include <Magnum/Timeline.h> -#include <Magnum/GL/DebugOutput.h> -#include <Magnum/GL/DefaultFramebuffer.h> -#include <Magnum/GL/Framebuffer.h> -#include <Magnum/GL/Renderbuffer.h> -#include <Magnum/GL/RenderbufferFormat.h> - -#include <fmt/format.h> -#include <fmt/compile.h> - -#if __has_include(<SDL.h>) -#include <Magnum/Platform/Sdl2Application.h> -#include <SDL_keycode.h> -#include <SDL_events.h> -#endif diff --git a/serialize/CMakeLists.txt b/serialize/CMakeLists.txt index 1813ba90..45d7704e 100644 --- a/serialize/CMakeLists.txt +++ b/serialize/CMakeLists.txt @@ -22,7 +22,3 @@ endif() if(WIN32) target_link_libraries(${self} PUBLIC ntdll) endif() - -if(FLOORMAT_PRECOMPILED-HEADERS) - target_precompile_headers(${self} PRIVATE precomp.hpp) -endif() diff --git a/serialize/precomp.hpp b/serialize/precomp.hpp deleted file mode 100644 index 23c79b16..00000000 --- a/serialize/precomp.hpp +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once -#include "../src/precomp.hpp" -#include <nlohmann/json_fwd.hpp> -#include <nlohmann/json.hpp> diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fb16a230..a03235e8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -8,6 +8,3 @@ target_link_libraries( Magnum::Shaders fmt::fmt ) -if(FLOORMAT_PRECOMPILED-HEADERS) - target_precompile_headers(${self} PRIVATE precomp.hpp) -endif() diff --git a/src/precomp.hpp b/src/precomp.hpp deleted file mode 100644 index b4cf310a..00000000 --- a/src/precomp.hpp +++ /dev/null @@ -1,50 +0,0 @@ -#pragma once - -#include "compat/prelude.hpp" -#include "compat/integer-types.hpp" -#include "compat/defs.hpp" -#include "compat/assert.hpp" - -#if __has_include(<fmt/core.h>) -#include "compat/exception.hpp" -#endif - -#ifdef __GNUG__ -#pragma GCC system_header -#endif - -#include <concepts> -#include <memory> -#include <type_traits> -#include <utility> -#include <algorithm> - -#include <tuple> -#include <bitset> -#include <array> -#include <vector> -#include <unordered_map> - -#include <Corrade/Containers/Array.h> -#include <Corrade/Containers/ArrayViewStl.h> -#include <Corrade/Containers/Pointer.h> -#include <Corrade/Containers/String.h> -#include <Corrade/Containers/StringView.h> - -#include <Corrade/Containers/PairStl.h> -#include <Corrade/Containers/TripleStl.h> - -#include <Corrade/Utility/Debug.h> -#include <Corrade/Utility/Path.h> - -#include <Magnum/Magnum.h> -#include <Magnum/Math/Vector2.h> -#include <Magnum/Math/Vector3.h> -#include <Magnum/Math/Vector4.h> -#include <Magnum/Math/Color.h> -#include <Magnum/GL/AbstractShaderProgram.h> -#include <Magnum/GL/Buffer.h> -#include <Magnum/GL/Mesh.h> -#include <Magnum/GL/Renderer.h> -#include <Magnum/GL/Texture.h> -#include <Magnum/Trade/ImageData.h> diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 11e3fb09..bca15714 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -17,9 +17,6 @@ endif() add_executable(${self} dummy.cc) target_link_libraries(${self} ${self}_o floormat-serialize floormat) -if(FLOORMAT_PRECOMPILED-HEADERS) - target_precompile_headers(${self}_o PRIVATE precomp.hpp) -endif() install(TARGETS ${self} RUNTIME DESTINATION bin) set(save-dir "${CMAKE_BINARY_DIR}/test/save") diff --git a/test/precomp.hpp b/test/precomp.hpp deleted file mode 100644 index 2e5871cd..00000000 --- a/test/precomp.hpp +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once -#include "../src/precomp.hpp" - -#if 1 -#ifdef __APPLE__ -#include <Magnum/Platform/WindowlessCglApplication.h> -#elif defined _WIN32 -#include <Magnum/Platform/WindowlessWglApplication.h> -#else -#include <Magnum/Platform/WindowlessGlxApplication.h> -#endif -#endif -#include <Magnum/Platform/GLContext.h> diff --git a/userconfig-sthalik@Windows-GNU.cmake b/userconfig-sthalik@Windows-GNU.cmake index b37ff1d1..754085c1 100644 --- a/userconfig-sthalik@Windows-GNU.cmake +++ b/userconfig-sthalik@Windows-GNU.cmake @@ -19,13 +19,8 @@ set(OpenCV_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../opentrack-depends/opencv/build-gc if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") add_definitions(-D_GLIBCXX_ASSERTIONS) - sets(BOOL FLOORMAT_PRECOMPILED-HEADERS OFF) -else() - sets(BOOL FLOORMAT_PRECOMPILED-HEADERS ON) endif() -sets(BOOL FLOORMAT_PRECOMPILED-HEADERS ON) - # for building submodule dependencies function(fm-userconfig-external) add_compile_options( |