Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 30, 2009, 12:48:20 PM (16 years ago)
Author:
rgrieder
Message:

Replaced most of the ELSE(…) and ENDIF(…) with ELSE() and ENDIF(). Kept the shorter and the spreaded ones for better clarity since that's what it originally was thought for. But I can really pollute the code when having long conditions and lots of IFs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem2/bin-config/CMakeLists.txt

    r2621 r2624  
    2525    IF(${_build_config} MATCHES "Rel")
    2626      SET(_build_config_short "Release")
    27     ELSE(${_build_config} MATCHES "Rel")
     27    ELSE()
    2828      SET(_build_config_short "Debug")
    29     ENDIF(${_build_config} MATCHES "Rel")
     29    ENDIF()
    3030    IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_build_config_short}/${_file_name})
    3131      SET(_in_file ${CMAKE_CURRENT_SOURCE_DIR}/${_build_config_short}/${_file_name})
    32     ELSE(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_build_config_short}/${_file_name})
     32    ELSE()
    3333      SET(_in_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file_name})
    34     ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_build_config_short}/${_file_name})
     34    ENDIF()
    3535
    3636    # Copy to the folder named like the build config for Visual Studio
    3737    IF(CMAKE_CONFIGURATION_TYPES)
    3838      SET(_out_file ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_build_config}/${_file_name})
    39     ELSE(CMAKE_CONFIGURATION_TYPES)
     39    ELSE()
    4040      SET(_out_file ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_file_name})
    41     ENDIF(CMAKE_CONFIGURATION_TYPES)
     41    ENDIF()
    4242    # Only copy if target file doesn't exist. This may result in problems but
    4343    # otherwise we might delete a user's config
    44     IF (NOT EXISTS ${_out_file} OR _read_only)
     44    IF(NOT EXISTS ${_out_file} OR _read_only)
    4545      CONFIGURE_FILE(${_in_file} ${_out_file} @ONLY)
    46     ENDIF (NOT EXISTS ${_out_file} OR _read_only)
     46    ENDIF()
    4747  ENDFOREACH(_build_config)
    4848ENDMACRO(CONFIGURE_FILES)
     
    5151IF(CMAKE_CONFIGURATION_TYPES)
    5252  SET(BUILD_CONFIGS ${CMAKE_CONFIGURATION_TYPES})
    53 ELSE(CMAKE_CONFIGURATION_TYPES)
     53ELSE()
    5454  SET(CONFIG_OUT_PATHS_REL ".")
    5555  SET(BUILD_CONFIGS ${CMAKE_BUILD_TYPE})
    56 ENDIF(CMAKE_CONFIGURATION_TYPES)
     56ENDIF()
    5757
    5858FOREACH(_file_name ${READ_ONLY_CONFIG_FILES})
     
    7777    SET(RUN_SCRIPT run)
    7878  ENDIF(WIN32)
    79   IF (NOT EXISTS ${CMAKE_SOURCE_DIR}/${RUN_SCRIPT})
     79  IF(NOT EXISTS ${CMAKE_SOURCE_DIR}/${RUN_SCRIPT})
    8080    CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${RUN_SCRIPT} ${CMAKE_SOURCE_DIR}/${RUN_SCRIPT} @ONLY)
    81   ENDIF (NOT EXISTS ${CMAKE_SOURCE_DIR}/${RUN_SCRIPT})
     81  ENDIF()
    8282ENDIF(NOT CMAKE_CONFIGURATION_TYPES)
Note: See TracChangeset for help on using the changeset viewer.