-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# memtest | ||
|
||
AtomicReference may leak memory in Kotlin Native. The only way to test if memory is leaked is to | ||
run a debug executable on the command line. This will return non-zero if there is an error, including | ||
memory leaks. Running `build` on this project is sufficient, as it builds and runs the application, and | ||
fails if the app fails. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apply plugin: 'org.jetbrains.kotlin.multiplatform' | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
kotlin { | ||
// For ARM, should be changed to iosArm32 or iosArm64 | ||
// For Linux, should be changed to e.g. linuxX64 | ||
// For MacOS, should be changed to e.g. macosX64 | ||
// For Windows, should be changed to e.g. mingwX64 | ||
macosX64("macos") { | ||
compilations.main { | ||
// Comment to generate Kotlin/Native library (KLIB) instead of executable file: | ||
outputKinds("executable") | ||
// Change to specify fully qualified name of your application's entry point: | ||
entryPoint 'sample.main' | ||
} | ||
} | ||
|
||
sourceSets { | ||
// Note: To enable common source sets please comment out 'kotlin.import.noCommonSourceSets' property | ||
// in gradle.properties file and re-import your project in IDE. | ||
macosMain { | ||
dependencies { | ||
implementation project(":stately") | ||
} | ||
} | ||
macosTest { | ||
} | ||
} | ||
} | ||
|
||
task runProgram { | ||
def buildType = 'DEBUG' // Change to 'DEBUG' to run application with debug symbols. | ||
dependsOn kotlin.targets.macos.compilations.main.linkTaskName('EXECUTABLE', buildType) | ||
doLast { | ||
def programFile = kotlin.targets.macos.compilations.main.getBinary('EXECUTABLE', buildType) | ||
exec { | ||
executable programFile | ||
args '' | ||
} | ||
} | ||
} | ||
|
||
tasks.build.dependsOn runProgram |