Build: Add usepch option to use precompiled headers
This commit is contained in:
8
tests/Engine/ClientModules.hpp
Normal file
8
tests/Engine/ClientModules.hpp
Normal file
@@ -0,0 +1,8 @@
|
||||
// used for precompiled headers generation
|
||||
#include <Engine/Modules.hpp>
|
||||
#include <Nazara/Audio.hpp>
|
||||
#include <Nazara/Graphics.hpp>
|
||||
#include <Nazara/OpenGLRenderer.hpp>
|
||||
#include <Nazara/Platform.hpp>
|
||||
#include <Nazara/VulkanRenderer.hpp>
|
||||
#include <Nazara/Widgets.hpp>
|
||||
8
tests/Engine/Modules.hpp
Normal file
8
tests/Engine/Modules.hpp
Normal file
@@ -0,0 +1,8 @@
|
||||
// used for precompiled headers generation
|
||||
#include <Nazara/Core.hpp>
|
||||
#include <Nazara/Math.hpp>
|
||||
#include <Nazara/Network.hpp>
|
||||
#include <Nazara/Physics2D.hpp>
|
||||
#include <Nazara/Physics3D.hpp>
|
||||
#include <Nazara/Shader.hpp>
|
||||
#include <Nazara/Utility.hpp>
|
||||
@@ -24,16 +24,20 @@ if has_config("tests") then
|
||||
add_files("Engine/**.cpp")
|
||||
add_includedirs(".")
|
||||
|
||||
--[[if xmake.version():ge("2.5.9") then
|
||||
add_rules("c++.unity_build")
|
||||
end]]
|
||||
|
||||
target("NazaraClientUnitTests")
|
||||
add_deps("NazaraAudio")
|
||||
add_files("main_client.cpp")
|
||||
|
||||
if has_config("usepch") then
|
||||
set_pcxxheader("Engine/ClientModules.hpp")
|
||||
end
|
||||
|
||||
target("NazaraUnitTests")
|
||||
add_files("main.cpp")
|
||||
remove_headerfiles("Engine/Audio/**")
|
||||
remove_files("Engine/Audio/**")
|
||||
|
||||
if has_config("usepch") then
|
||||
set_pcxxheader("Engine/Modules.hpp")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user