- 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
This commit is contained in:
alexey.lysiuk 2019-08-22 10:44:30 +03:00
parent a56bdda3f0
commit c3edfdd946
5 changed files with 10 additions and 7 deletions

View File

@ -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}

View File

@ -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>

View File

@ -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;
}

View File

@ -36,6 +36,7 @@
#ifndef FILES_H
#define FILES_H
#include <stddef.h>
#include <stdio.h>
#include <stdint.h>
#include <functional>

View File

@ -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 */
/****************************/