From f805a19f8770bf051fa741558b10928fc612e01b Mon Sep 17 00:00:00 2001 From: Jakub Filak Date: Wed, 29 Oct 2014 18:11:29 +0100 Subject: [PATCH] Support test suite output files for multiple Java versions Related to #42 Conflicts: test/CMakeLists.txt --- test/CMakeLists.txt | 3 +++ test/outputs/CMakeLists.txt | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5bb2b2d..b7818d6 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -5,6 +5,9 @@ set(SERVER_URL "http://localhost") find_package(Java REQUIRED) +set(JAVA_TESTOUTPUT_VER java-${Java_VERSION_MAJOR}.${Java_VERSION_MINOR}) +message("Requires testsuite ver: ${JAVA_TESTOUTPUT_VER}") + subdirs(outputs) function(_get_target_names variable) diff --git a/test/outputs/CMakeLists.txt b/test/outputs/CMakeLists.txt index ede3758..0ab44f2 100644 --- a/test/outputs/CMakeLists.txt +++ b/test/outputs/CMakeLists.txt @@ -14,5 +14,9 @@ foreach(infileName ${inFiles}) set(infile "${CMAKE_CURRENT_SOURCE_DIR}/${infileName}") endif() + if(EXISTS "${infile}.${JAVA_TESTOUTPUT_VER}") + set(infile "${infile}.${JAVA_TESTOUTPUT_VER}") + endif() + configure_file("${infile}" "${outfile}") endforeach(infileName) -- 1.8.3.1