diff --git a/cmake/cross_compiling/android.cmake b/cmake/cross_compiling/android.cmake index 25081671477edc67dcb0f6f9b3a2f2f2e13c0fb6..9724c16122ab2e6be55864c8716698c9b9d7c3f0 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 bfd26f130c1e7863532c8a3e3ca7661fc91c4f67..817b39f6833e37c340d4ee465048480cfc3db151 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 3e417f123b5f668988c6469f76ae6dc3caa421f6..994ba14cfa0044ee0d87d5c9ede4bd32fbe0e4f4 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}