Removed pch.h:
- Under linux pch.h won't work as expected, instead it will slow down build time. In order to fix this, target_precompile_headers cmake function must have every header that will be used in pch.hxx generation. - Using the opportunity i've removed headers that aren't essential in precompiled header
This commit is contained in:
@@ -18,7 +18,17 @@ file(GLOB SRC
|
||||
)
|
||||
|
||||
add_library(squirrel-template SHARED ${SRC})
|
||||
target_precompile_headers(squirrel-template PRIVATE "src/pch.h")
|
||||
|
||||
target_compile_definitions(squirrel-template
|
||||
PRIVATE
|
||||
SCRAT_EXPORT
|
||||
)
|
||||
|
||||
target_precompile_headers(squirrel-template
|
||||
PRIVATE
|
||||
"src/api/module_api.h"
|
||||
"src/api/squirrel_api.h"
|
||||
)
|
||||
|
||||
target_include_directories(squirrel-template
|
||||
INTERFACE
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "module_api.h"
|
||||
|
||||
namespace SqModule
|
||||
{
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#define QUOTIFY(arg) #arg
|
||||
#define STRINGIFY(arg) QUOTIFY(arg)
|
||||
|
||||
#define SCRAT_EXPORT // Used to get SQRAT_API macro for sqmodule_load func (export function)
|
||||
|
||||
#include "api/module_api.h"
|
||||
#include "api/squirrel_api.h"
|
||||
#include "sqrat.h"
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include <sqrat.h>
|
||||
|
||||
extern "C" SQRESULT SQRAT_API sqmodule_load(HSQUIRRELVM vm, HSQAPI api)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user