Build: Add usepch option to use precompiled headers

This commit is contained in:
Jérôme Leclercq
2022-03-09 20:06:38 +01:00
parent 4a8ebf869b
commit 3e556a72b6
9 changed files with 40 additions and 10 deletions

View File

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