cmake_modules/CMakeDeterminePascalCompiler.cmake
branchcmake_pascal
changeset 8834 edceeafff671
parent 8764 f16bcb3dba9e
child 8852 0576439ef859
equal deleted inserted replaced
8831:06562cd68897 8834:edceeafff671
    41 ENDIF(NOT CMAKE_Pascal_COMPILER)
    41 ENDIF(NOT CMAKE_Pascal_COMPILER)
    42 MARK_AS_ADVANCED(CMAKE_Pascal_COMPILER)
    42 MARK_AS_ADVANCED(CMAKE_Pascal_COMPILER)
    43 
    43 
    44 GET_FILENAME_COMPONENT(COMPILER_LOCATION "${CMAKE_Pascal_COMPILER}" PATH)
    44 GET_FILENAME_COMPONENT(COMPILER_LOCATION "${CMAKE_Pascal_COMPILER}" PATH)
    45 
    45 
    46 #FIND_PROGRAM(GNAT_EXECUTABLE_BUILDER NAMES gnatmake PATHS ${COMPILER_LOCATION} )
       
    47 FIND_PROGRAM(CMAKE_AR NAMES ar PATHS ${COMPILER_LOCATION} )
       
    48 
       
    49 FIND_PROGRAM(CMAKE_RANLIB NAMES ranlib)
       
    50 IF(NOT CMAKE_RANLIB)
       
    51    SET(CMAKE_RANLIB : CACHE INTERNAL "noop for ranlib")
       
    52 ENDIF(NOT CMAKE_RANLIB)
       
    53 MARK_AS_ADVANCED(CMAKE_RANLIB)
       
    54 
       
    55 # configure variables set in this file for fast reload later on
    46 # configure variables set in this file for fast reload later on
    56 if(${CMAKE_VERSION} VERSION_LESS 2.8.10)
    47 if(${CMAKE_VERSION} VERSION_LESS 2.8.10)
    57   CONFIGURE_FILE(${CMAKE_MODULE_PATH}/CMakePascalCompiler.cmake.in
    48   CONFIGURE_FILE(${CMAKE_MODULE_PATH}/CMakePascalCompiler.cmake.in
    58                  "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CMakePascalCompiler.cmake"
    49                  "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CMakePascalCompiler.cmake"
    59                  IMMEDIATE )
    50                  IMMEDIATE )
    61   CONFIGURE_FILE(${CMAKE_MODULE_PATH}/CMakePascalCompiler.cmake.in
    52   CONFIGURE_FILE(${CMAKE_MODULE_PATH}/CMakePascalCompiler.cmake.in
    62                 "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/${CMAKE_VERSION}/CMakePascalCompiler.cmake"
    53                 "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/${CMAKE_VERSION}/CMakePascalCompiler.cmake"
    63                  IMMEDIATE )
    54                  IMMEDIATE )
    64 endif(${CMAKE_VERSION} VERSION_LESS 2.8.10)
    55 endif(${CMAKE_VERSION} VERSION_LESS 2.8.10)
    65 
    56 
    66 MARK_AS_ADVANCED(CMAKE_AR)
       
    67 
       
    68 SET(CMAKE_Pascal_COMPILER_ENV_VAR "FPC")
    57 SET(CMAKE_Pascal_COMPILER_ENV_VAR "FPC")