mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 14:50:10 -06:00
Tests: enable Java tests if javac is a recurse symlink
There are distros (OS Elbrus 6.x, 7.x, Ubuntu 21.x) where javac is a recurse symlink, like /usr/bin/javac -> /etc/alternatives/javac -> /usr/lib/jvm/.../bin/javac. On these distros, Java tests were not run, because Tests/CMakeLists.txt was not able to handle this case correctly. Now an additional stage of resolving symlinks is added, and these distros have Java tests running.
This commit is contained in:
@@ -3371,7 +3371,8 @@ if(BUILD_TESTING)
|
||||
set(JavaExportImport_BUILD_OPTIONS -DCMake_TEST_NESTED_MAKE_PROGRAM:FILEPATH=${CMake_TEST_EXPLICIT_MAKE_PROGRAM})
|
||||
ADD_TEST_MACRO(JavaExportImport JavaExportImport)
|
||||
|
||||
get_filename_component(JNIPATH ${Java_JAVAC_EXECUTABLE} PATH)
|
||||
get_filename_component(JAVACPATH ${Java_JAVAC_EXECUTABLE} REALPATH)
|
||||
get_filename_component(JNIPATH ${JAVACPATH} PATH)
|
||||
find_file(JNI_H jni.h
|
||||
"${JNIPATH}/../include"
|
||||
"${JNIPATH}/../java/include")
|
||||
|
||||
Reference in New Issue
Block a user