diff --git a/CMakeLists.txt b/CMakeLists.txt index e5770065..02ccbec7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -165,6 +165,13 @@ foreach(TEST_CLASS ${TEST_CLASSES}) NAME ${TEST_CLASS} COMMAND zproject_selftest --continue --verbose --test ${TEST_CLASS} ) + IF (WIN32 AND CMAKE_PREFIX_PATH) + file(TO_NATIVE_PATH "${CMAKE_PREFIX_PATH}" CMAKE_PREFIX_PATH_WIN) + set_tests_properties( + ${TEST_CLASS} + PROPERTIES ENVIRONMENT "PATH=%PATH%\;${CMAKE_PREFIX_PATH_WIN}\\bin" + ) + ENDIF (WIN32 AND CMAKE_PREFIX_PATH) set_tests_properties( ${TEST_CLASS} PROPERTIES TIMEOUT ${CLASSTEST_TIMEOUT} diff --git a/zproject_class.gsl b/zproject_class.gsl index 77ac68f3..ddcd6d26 100644 --- a/zproject_class.gsl +++ b/zproject_class.gsl @@ -502,6 +502,16 @@ $(project.GENERATED_WARNING_HEADER:) // Platform definitions, must come first #include "platform.h" +// Asserts check the invariants of methods. If they're not +// fulfilled the program should fail fast. Therefore enforce them! +#ifdef NDEBUG + #undef NDEBUG + #include + #define NDEBUG +#else + #include +#endif + // External API #include "../include/$(project.header:)" diff --git a/zproject_travis.gsl b/zproject_travis.gsl index 81a62d78..db486eba 100644 --- a/zproject_travis.gsl +++ b/zproject_travis.gsl @@ -818,6 +818,10 @@ windows) choco install openjdk export JAVA_HOME="C:\\Program Files\\OpenJDK\\jdk-13.0.2" export BUILD_PREFIX=$TEMP/ci_build + # Build will fail if processes are still running at the end of the script. + # Gradle by default starts a daemon so consequtive builds are faster. + # Therefore instruct gradle not to use its daemon. + export GRADLE_OPTS=-Dorg.gradle.daemon=false cd .. @@ -834,6 +838,12 @@ windows) cmake --build . --config Release --target install cd ../.. + if [ -d "$(use.project)/bindings/jni" ]; then + cd $(use.project)/bindings/jni + ./gradlew publishToMavenLocal -PbuildPrefix=$BUILD_PREFIX --info + cd ../../.. + fi + .endfor cd $(project.name) mkdir build @@ -845,10 +855,6 @@ windows) cd $(project.name) cd bindings/jni - # Build will fail if processes are still running at the end of the script. - # Gradle by default starts a daemon so consequtive builds are faster. - # Therefore instruct gradle not to use its daemon. - export GRADLE_OPTS=-Dorg.gradle.daemon=false ./gradlew build jar -PbuildPrefix=$BUILD_PREFIX -x test --info ./gradlew publishToMavenLocal -PbuildPrefix=$BUILD_PREFIX --info