From 1ddb9bf7828026f60332969c033cb247ab40b4a9 Mon Sep 17 00:00:00 2001 From: Liu Yiqun Date: Wed, 3 May 2017 12:17:40 +0000 Subject: [PATCH] Delete the configuration of fortran compiler. --- cmake/cross_compiling/android.cmake | 11 ----------- cmake/cross_compiling/raspberry_pi.cmake | 11 ----------- cmake/external/protobuf.cmake | 2 +- 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/cmake/cross_compiling/android.cmake b/cmake/cross_compiling/android.cmake index 250816714..9724c1612 100644 --- a/cmake/cross_compiling/android.cmake +++ b/cmake/cross_compiling/android.cmake @@ -129,19 +129,8 @@ IF("${CMAKE_VERSION}" VERSION_LESS "3.7.0") MESSAGE(FATAL_ERROR "Cannot find CXX compiler: ${ANDROID_CXX_COMPILER}") ENDIF() - # Fortran compiler - IF(NOT CMAKE_Fortran_COMPILER) - SET(ANDROID_Fortran_COMPILER "${ANDROID_TOOLCHAIN_PREFIX}gfortran") - ELSE() - GET_FILENAME_COMPONENT(ANDROID_Fortran_COMPILER ${CMAKE_Fortran_COMPILER}) - ENDIF() - IF(NOT EXISTS ${ANDROID_Fortran_COMPILER}) - SET(ANDROID_Fortran_COMPILER "") - ENDIF() - SET(CMAKE_C_COMPILER ${ANDROID_C_COMPILER} CACHE PATH "C compiler" FORCE) SET(CMAKE_CXX_COMPILER ${ANDROID_CXX_COMPILER} CACHE PATH "CXX compiler" FORCE) - SET(CMAKE_Fortran_COMPILER ${ANDROID_Fortran_COMPILER} CACHE PATH "Fortran compiler" FORCE) # Toolchain and ABI specific flags. SET(ANDROID_COMPILER_FLAGS "-ffunction-sections -fdata-sections -finline-limit=64") diff --git a/cmake/cross_compiling/raspberry_pi.cmake b/cmake/cross_compiling/raspberry_pi.cmake index bfd26f130..817b39f68 100644 --- a/cmake/cross_compiling/raspberry_pi.cmake +++ b/cmake/cross_compiling/raspberry_pi.cmake @@ -73,19 +73,8 @@ IF(NOT EXISTS ${RPI_CXX_COMPILER}) MESSAGE(FATAL_ERROR "Cannot find CXX compiler: ${RPI_CXX_COMPILER}") ENDIF() -# Fortran compiler -IF(NOT CMAKE_Fortran_COMPILER) - SET(RPI_Fortran_COMPILER "${RPI_TOOLCHAIN_PREFIX}gfortran") -ELSE() - GET_FILENAME_COMPONENT(RPI_Fortran_COMPILER ${CMAKE_Fortran_COMPILER} PROGRAM) -ENDIF() -IF(NOT EXISTS RPI_Fortran_COMPILER) - SET(RPI_Fortran_COMPILER "") -ENDIF() - SET(CMAKE_C_COMPILER ${RPI_C_COMPILER} CACHE PATH "C compiler" FORCE) SET(CMAKE_CXX_COMPILER ${RPI_CXX_COMPILER} CACHE PATH "CXX compiler" FORCE) -SET(CMAKE_Fortran_COMPILER ${RPI_Fortran_COMPILER} CACHE PATH "Fortran compiler" FORCE) IF(RPI_ARM_NEON) SET(RPI_C_FLAGS "${RPI_C_FLAGS} -mfpu=neon") diff --git a/cmake/external/protobuf.cmake b/cmake/external/protobuf.cmake index 3e417f123..994ba14cf 100644 --- a/cmake/external/protobuf.cmake +++ b/cmake/external/protobuf.cmake @@ -76,7 +76,6 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST) ENDFUNCTION() IF(NOT CMAKE_CROSSCOMPILING) - SET(PROTOBUF_VERSION 3.1) FIND_PACKAGE(Protobuf ${PROTOBUF_VERSION}) IF(PROTOBUF_FOUND) @@ -92,6 +91,7 @@ ELSE() CACHE FILEPATH "protobuf executable." FORCE) ENDIF() +SET(PROTOBUF_VERSION 3.1) IF(NOT PROTOBUF_FOUND) build_protobuf(protobuf FALSE) SET(PROTOBUF_INCLUDE_DIR ${protobuf_INCLUDE_DIR} -- GitLab