Skip to content
Permalink
Browse files

- temporary solution to fix build of non-MSVC targets

Precompilation of prefix header for GCC and Clang requires some efforts thanks to CMake which doesn't support this feature out of the box
Existing thirparty solutions must be tuned to our needs, and our configuration should be adjusted to a chosen module
  • Loading branch information...
alexey-lysiuk committed Aug 22, 2019
1 parent a56bdda commit c3edfdd946de0db3054add7d323bb4c44dde2aa5
Showing with 10 additions and 7 deletions.
  1. +6 −1 src/CMakeLists.txt
  2. +2 −0 src/g_pch.h
  3. +1 −1 src/maploader/glnodes.cpp
  4. +1 −0 src/utility/files.h
  5. +0 −5 src/utility/palette.cpp
@@ -1328,7 +1328,12 @@ else()
set( NOT_COMPILED_SOURCE_FILES ${NOT_COMPILED_SOURCE_FILES} ${VM_JIT_SOURCES} )
endif()

enable_precompiled_headers( g_pch.h PCH_SOURCES )
if( MSVC )
enable_precompiled_headers( g_pch.h PCH_SOURCES )
else()
# Temporary solution for compilers other than MSVC
set_source_files_properties( ${PCH_SOURCES} PROPERTIES COMPILE_FLAGS "-include g_pch.h" )
endif()

add_executable( zdoom WIN32 MACOSX_BUNDLE
${HEADER_FILES}
@@ -16,8 +16,10 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <cassert>
#ifdef _MSC_VER
#include <direct.h>
#include <io.h>
#endif // _MSC_VER
#include <limits>
#include <memory>
#include <tuple>
@@ -1153,7 +1153,7 @@ UNSAFE_CCMD(clearnodecache)

if (!ScanDirectory(list, path))
{
Printf("Unable to scan node cache directory %s\n", path);
Printf("Unable to scan node cache directory %s\n", path.GetChars());
return;
}

@@ -36,6 +36,7 @@
#ifndef FILES_H
#define FILES_H

#include <stddef.h>
#include <stdio.h>
#include <stdint.h>
#include <functional>
@@ -35,11 +35,6 @@
#include "palette.h"
#include "palentry.h"

#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>

/****************************/
/* Palette management stuff */
/****************************/

0 comments on commit c3edfdd

Please sign in to comment.
You can’t perform that action at this time.