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.msvc.MsvcToolchainConfig
|
||||||
import org.doomedsociety.gradlecpp.toolchain.icc.Icc
|
import org.doomedsociety.gradlecpp.toolchain.icc.Icc
|
||||||
import org.doomedsociety.gradlecpp.toolchain.icc.IccCompilerPlugin
|
import org.doomedsociety.gradlecpp.toolchain.icc.IccCompilerPlugin
|
||||||
|
import org.doomedsociety.gradlecpp.gcc.GccToolchainConfig
|
||||||
import org.gradle.nativeplatform.NativeBinarySpec
|
import org.gradle.nativeplatform.NativeBinarySpec
|
||||||
import org.gradle.nativeplatform.NativeLibrarySpec
|
import org.gradle.nativeplatform.NativeLibrarySpec
|
||||||
|
|
||||||
apply plugin: 'cpp'
|
apply plugin: 'cpp'
|
||||||
apply plugin: IccCompilerPlugin
|
apply plugin: IccCompilerPlugin
|
||||||
|
apply plugin: GccCompilerPlugin
|
||||||
|
|
||||||
void setupToolchain(NativeBinarySpec b) {
|
void setupToolchain(NativeBinarySpec b) {
|
||||||
def cfg = rootProject.createToolchainConfig(b)
|
def cfg = rootProject.createToolchainConfig(b)
|
||||||
@ -27,9 +29,11 @@ model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
toolChains {
|
toolChains {
|
||||||
visualCpp(VisualCpp) {
|
visualCpp(VisualCpp)
|
||||||
}
|
if (project.hasProperty("useGcc")) {
|
||||||
icc(Icc) {
|
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) {
|
static void regamedll_tests_src(def h) {
|
||||||
h.regamedll_tests_src(CppSourceSet) {
|
h.regamedll_tests_src(CppSourceSet) {
|
||||||
source {
|
source {
|
||||||
@ -291,7 +301,12 @@ model {
|
|||||||
sources {
|
sources {
|
||||||
RegamedllSrc.regamedll_pch(it)
|
RegamedllSrc.regamedll_pch(it)
|
||||||
RegamedllSrc.regamedll_src(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) }
|
binaries.all { NativeBinarySpec b -> project.setupToolchain(b) }
|
||||||
|
Loading…
Reference in New Issue
Block a user