diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-06-18 22:01:15 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-06-18 22:01:15 (GMT) |
commit | 0b804cbece9f79dd35a95cf7c3fa44bd5bca5700 (patch) | |
tree | 7ee676649e4d54f36ab242537410c5667d35a62c /Modules/CMakeDetermineJavaCompiler.cmake | |
parent | b22ae77fb81acc3ccb3c79c69e60650b1aff0e42 (diff) | |
download | CMake-0b804cbece9f79dd35a95cf7c3fa44bd5bca5700.zip CMake-0b804cbece9f79dd35a95cf7c3fa44bd5bca5700.tar.gz CMake-0b804cbece9f79dd35a95cf7c3fa44bd5bca5700.tar.bz2 |
STYLE: use IF(NOT ...) and remove MARK_AS_ADVANCED() for variables which are
not defined here
Alex
Diffstat (limited to 'Modules/CMakeDetermineJavaCompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineJavaCompiler.cmake | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/Modules/CMakeDetermineJavaCompiler.cmake b/Modules/CMakeDetermineJavaCompiler.cmake index 3d31233..f221447 100644 --- a/Modules/CMakeDetermineJavaCompiler.cmake +++ b/Modules/CMakeDetermineJavaCompiler.cmake @@ -10,26 +10,23 @@ IF(NOT CMAKE_Java_COMPILER) IF(CMAKE_Java_FLAGS_ENV_INIT) SET(CMAKE_Java_COMPILER_ARG1 "${CMAKE_Java_FLAGS_ENV_INIT}" CACHE STRING "First argument to Java compiler") ENDIF(CMAKE_Java_FLAGS_ENV_INIT) - IF(EXISTS ${CMAKE_Java_COMPILER_INIT}) - ELSE(EXISTS ${CMAKE_Java_COMPILER_INIT}) + IF(NOT EXISTS ${CMAKE_Java_COMPILER_INIT}) MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_COMPILER:\n$ENV{JAVA_COMPILER}.") - ENDIF(EXISTS ${CMAKE_Java_COMPILER_INIT}) + ENDIF(NOT EXISTS ${CMAKE_Java_COMPILER_INIT}) ENDIF($ENV{JAVA_COMPILER} MATCHES ".+") IF($ENV{JAVA_RUNTIME} MATCHES ".+") GET_FILENAME_COMPONENT(CMAKE_Java_RUNTIME_INIT $ENV{JAVA_RUNTIME} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT) - IF(EXISTS ${CMAKE_Java_RUNTIME_INIT}) - ELSE(EXISTS ${CMAKE_Java_RUNTIME_INIT}) + IF(NOT EXISTS ${CMAKE_Java_RUNTIME_INIT}) MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_RUNTIME:\n$ENV{JAVA_RUNTIME}.") - ENDIF(EXISTS ${CMAKE_Java_RUNTIME_INIT}) + ENDIF(NOT EXISTS ${CMAKE_Java_RUNTIME_INIT}) ENDIF($ENV{JAVA_RUNTIME} MATCHES ".+") IF($ENV{JAVA_ARCHIVE} MATCHES ".+") GET_FILENAME_COMPONENT(CMAKE_Java_ARCHIVE_INIT $ENV{JAVA_ARCHIVE} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT) - IF(EXISTS ${CMAKE_Java_ARCHIVE_INIT}) - ELSE(EXISTS ${CMAKE_Java_ARCHIVE_INIT}) + IF(NOT EXISTS ${CMAKE_Java_ARCHIVE_INIT}) MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_ARCHIVE:\n$ENV{JAVA_ARCHIVE}.") - ENDIF(EXISTS ${CMAKE_Java_ARCHIVE_INIT}) + ENDIF(NOT EXISTS ${CMAKE_Java_ARCHIVE_INIT}) ENDIF($ENV{JAVA_ARCHIVE} MATCHES ".+") SET(Java_BIN_PATH @@ -85,5 +82,4 @@ MARK_AS_ADVANCED(CMAKE_Java_COMPILER) # configure variables set in this file for fast reload later on CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeJavaCompiler.cmake.in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeJavaCompiler.cmake IMMEDIATE @ONLY) -MARK_AS_ADVANCED(CMAKE_AR CMAKE_Java_COMPILER_FULLPATH) SET(CMAKE_Java_COMPILER_ENV_VAR "JAVA_COMPILER") |