From 8c9e1ce5939737bac95cf16f59e6fc7fc856940b Mon Sep 17 00:00:00 2001 From: Andres Noetzli Date: Fri, 28 Sep 2018 08:21:32 -0700 Subject: [PATCH] cmake: Only do Java tests when unit testing on (#2551) Right now, we are adding the Java tests even when we are not building unit tests. This commit changes the build system to only add the Java tests when unit tests are enabled. There are two reasons for this change: - building a production version of CVC4 should not require JUnit - it seems more intuitive (to me at least) to disable JUnit tests when unit tests are disabled This change also simplifies building the Java bindings in our homebrew formula. --- test/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b85ecf9e7..a79e96c65 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -20,10 +20,10 @@ add_custom_target(check add_subdirectory(regress) add_subdirectory(system EXCLUDE_FROM_ALL) -if(BUILD_BINDINGS_JAVA) - add_subdirectory(java) -endif() - if(ENABLE_UNIT_TESTING) add_subdirectory(unit EXCLUDE_FROM_ALL) + + if(BUILD_BINDINGS_JAVA) + add_subdirectory(java) + endif() endif() -- 2.30.2