mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-27 07:05:38 +03:00
Resolved #307
This commit is contained in:
parent
e924a266b0
commit
7aeca162d6
@ -2,11 +2,13 @@ import org.doomedsociety.gradlecpp.cfg.ToolchainConfigUtils
|
||||
import org.doomedsociety.gradlecpp.msvc.MsvcToolchainConfig
|
||||
import org.doomedsociety.gradlecpp.toolchain.icc.Icc
|
||||
import org.doomedsociety.gradlecpp.toolchain.icc.IccCompilerPlugin
|
||||
import org.doomedsociety.gradlecpp.gcc.GccToolchainConfig
|
||||
import org.gradle.nativeplatform.NativeBinarySpec
|
||||
import org.gradle.nativeplatform.NativeLibrarySpec
|
||||
|
||||
apply plugin: 'cpp'
|
||||
apply plugin: IccCompilerPlugin
|
||||
apply plugin: GccCompilerPlugin
|
||||
|
||||
void setupToolchain(NativeBinarySpec b) {
|
||||
def cfg = rootProject.createToolchainConfig(b)
|
||||
@ -27,9 +29,11 @@ model {
|
||||
}
|
||||
|
||||
toolChains {
|
||||
visualCpp(VisualCpp) {
|
||||
}
|
||||
icc(Icc) {
|
||||
visualCpp(VisualCpp)
|
||||
if (project.hasProperty("useGcc")) {
|
||||
gcc(Gcc)
|
||||
} else {
|
||||
icc(Icc)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -237,6 +237,16 @@ class RegamedllSrc {
|
||||
}
|
||||
}
|
||||
|
||||
static void regamedll_tests_gcc_src(def h) {
|
||||
h.regamedll_tests_gcc_src(CppSourceSet) {
|
||||
source {
|
||||
srcDir "unittests"
|
||||
include "**/*.cpp"
|
||||
exclude "mathfun_tests.cpp"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void regamedll_tests_src(def h) {
|
||||
h.regamedll_tests_src(CppSourceSet) {
|
||||
source {
|
||||
@ -291,7 +301,12 @@ model {
|
||||
sources {
|
||||
RegamedllSrc.regamedll_pch(it)
|
||||
RegamedllSrc.regamedll_src(it)
|
||||
RegamedllSrc.regamedll_tests_src(it)
|
||||
|
||||
if (project.hasProperty("useGcc")) {
|
||||
RegamedllSrc.regamedll_tests_gcc_src(it)
|
||||
} else {
|
||||
RegamedllSrc.regamedll_tests_src(it)
|
||||
}
|
||||
}
|
||||
|
||||
binaries.all { NativeBinarySpec b -> project.setupToolchain(b) }
|
||||
|
Loading…
Reference in New Issue
Block a user