STYLE: use IF(NOT ...) and remove MARK_AS_ADVANCED() for variables which are
not defined here Alex
This commit is contained in:
parent
b22ae77fb8
commit
0b804cbece
|
@ -10,26 +10,23 @@ IF(NOT CMAKE_Java_COMPILER)
|
||||||
IF(CMAKE_Java_FLAGS_ENV_INIT)
|
IF(CMAKE_Java_FLAGS_ENV_INIT)
|
||||||
SET(CMAKE_Java_COMPILER_ARG1 "${CMAKE_Java_FLAGS_ENV_INIT}" CACHE STRING "First argument to Java compiler")
|
SET(CMAKE_Java_COMPILER_ARG1 "${CMAKE_Java_FLAGS_ENV_INIT}" CACHE STRING "First argument to Java compiler")
|
||||||
ENDIF(CMAKE_Java_FLAGS_ENV_INIT)
|
ENDIF(CMAKE_Java_FLAGS_ENV_INIT)
|
||||||
IF(EXISTS ${CMAKE_Java_COMPILER_INIT})
|
IF(NOT EXISTS ${CMAKE_Java_COMPILER_INIT})
|
||||||
ELSE(EXISTS ${CMAKE_Java_COMPILER_INIT})
|
|
||||||
MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_COMPILER:\n$ENV{JAVA_COMPILER}.")
|
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 ".+")
|
ENDIF($ENV{JAVA_COMPILER} MATCHES ".+")
|
||||||
|
|
||||||
IF($ENV{JAVA_RUNTIME} MATCHES ".+")
|
IF($ENV{JAVA_RUNTIME} MATCHES ".+")
|
||||||
GET_FILENAME_COMPONENT(CMAKE_Java_RUNTIME_INIT $ENV{JAVA_RUNTIME} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
|
GET_FILENAME_COMPONENT(CMAKE_Java_RUNTIME_INIT $ENV{JAVA_RUNTIME} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
|
||||||
IF(EXISTS ${CMAKE_Java_RUNTIME_INIT})
|
IF(NOT EXISTS ${CMAKE_Java_RUNTIME_INIT})
|
||||||
ELSE(EXISTS ${CMAKE_Java_RUNTIME_INIT})
|
|
||||||
MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_RUNTIME:\n$ENV{JAVA_RUNTIME}.")
|
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 ".+")
|
ENDIF($ENV{JAVA_RUNTIME} MATCHES ".+")
|
||||||
|
|
||||||
IF($ENV{JAVA_ARCHIVE} MATCHES ".+")
|
IF($ENV{JAVA_ARCHIVE} MATCHES ".+")
|
||||||
GET_FILENAME_COMPONENT(CMAKE_Java_ARCHIVE_INIT $ENV{JAVA_ARCHIVE} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
|
GET_FILENAME_COMPONENT(CMAKE_Java_ARCHIVE_INIT $ENV{JAVA_ARCHIVE} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
|
||||||
IF(EXISTS ${CMAKE_Java_ARCHIVE_INIT})
|
IF(NOT EXISTS ${CMAKE_Java_ARCHIVE_INIT})
|
||||||
ELSE(EXISTS ${CMAKE_Java_ARCHIVE_INIT})
|
|
||||||
MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_ARCHIVE:\n$ENV{JAVA_ARCHIVE}.")
|
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 ".+")
|
ENDIF($ENV{JAVA_ARCHIVE} MATCHES ".+")
|
||||||
|
|
||||||
SET(Java_BIN_PATH
|
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 variables set in this file for fast reload later on
|
||||||
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeJavaCompiler.cmake.in
|
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeJavaCompiler.cmake.in
|
||||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeJavaCompiler.cmake IMMEDIATE @ONLY)
|
${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")
|
SET(CMAKE_Java_COMPILER_ENV_VAR "JAVA_COMPILER")
|
||||||
|
|
Loading…
Reference in New Issue