From fdcff54e1d845343cdfe39040aac6f7ff9b4163a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 10 Apr 2023 08:52:32 +0200 Subject: cmake: remove precompiled headers They were having problems including fmtlib and robin_map. --- CMakeLists.txt | 3 --- draw/CMakeLists.txt | 3 --- editor/CMakeLists.txt | 7 ----- editor/precomp.hpp | 25 ------------------ loader/precomp.hpp | 7 ----- main/CMakeLists.txt | 14 +--------- main/precomp.hpp | 22 ---------------- serialize/CMakeLists.txt | 4 --- serialize/precomp.hpp | 4 --- src/CMakeLists.txt | 3 --- src/precomp.hpp | 50 ------------------------------------ test/CMakeLists.txt | 3 --- test/precomp.hpp | 13 ---------- userconfig-sthalik@Windows-GNU.cmake | 5 ---- 14 files changed, 1 insertion(+), 162 deletions(-) delete mode 100644 editor/precomp.hpp delete mode 100644 loader/precomp.hpp delete mode 100644 main/precomp.hpp delete mode 100644 serialize/precomp.hpp delete mode 100644 src/precomp.hpp delete mode 100644 test/precomp.hpp 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 -#include - -#include -#include -#include - -#if __has_include() -#include -#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 -#include -#include -#include -#include 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 -#include -#include -#include -#include -#include - -#include -#include - -#if __has_include() -#include -#include -#include -#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 -#include 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() -#include "compat/exception.hpp" -#endif - -#ifdef __GNUG__ -#pragma GCC system_header -#endif - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include 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 -#elif defined _WIN32 -#include -#else -#include -#endif -#endif -#include 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( -- cgit v1.2.3