Avatar
🏃
1 results for Gtest
  • J’ai donc voulu faire l’installation de gtest : https://github.com/google/googletest sur un serveur en Fédora 17 mais sans succès.

    # wget https://github.com/google/googletest/archive/master.zip # unzip master.zip # cd googletest-master/# mkdir mybuild# cat ../CMakeLists.txtcmake_minimum_required(VERSION 2.8.8) if (CMAKE_VERSION VERSION_LESS "3.1")  add_definitions(-std=c++11)else()  set(CMAKE_CXX_STANDARD 11)  set(CMAKE_CXX_STANDARD_REQUIRED ON)  set(CMAKE_CXX_EXTENSIONS OFF)endif() if (POLICY CMP0048)  cmake_policy(SET CMP0048 NEW)endif (POLICY CMP0048) project(googletest-distribution)set(GOOGLETEST_VERSION 1.9.0) enable_testing() include(CMakeDependentOption)include(GNUInstallDirs) #Note that googlemock target already builds googletestoption(BUILD_GMOCK "Builds the googlemock subproject" ON)option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) if(BUILD_GMOCK)  add_subdirectory( googlemock )else()  add_subdirectory( googletest )endif() # uname -aLinux fedora17-64b 3.3.4-5.fc17.x86_64 #1 SMP Mon May 7 17:29:34 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux # rpm -qa | grep "cmake"cmake-2.8.9-1.fc17.x86_64 # cmake -G"Unix Makefiles" ..-- The C compiler identification is GNU 4.7.2-- The CXX compiler identification is GNU 4.7.2-- Check for working C compiler: /bin/gcc-- Check for working C compiler: /bin/gcc -- works-- Detecting C compiler ABI info-- Detecting C compiler ABI info - done-- Check for working CXX compiler: /bin/c++-- Check for working CXX compiler: /bin/c++ -- works-- Detecting CXX compiler ABI info-- Detecting CXX compiler ABI info - done-- Found PythonInterp: /bin/python (found version "2.7.3")-- Looking for include file pthread.h-- Looking for include file pthread.h - found-- Looking for pthread_create-- Looking for pthread_create - not found.-- Looking for pthread_create in pthreads-- Looking for pthread_create in pthreads - not found-- Looking for pthread_create in pthread-- Looking for pthread_create in pthread - found-- Found Threads: TRUECMake Error at /usr/share/cmake/Modules/WriteBasicConfigVersionFile.cmake:39 (message):  No VERSION specified for WRITE_BASIC_CONFIG_VERSION_FILE()Call Stack (most recent call first):  /usr/share/cmake/Modules/CMakePackageConfigHelpers.cmake:152 (write_basic_config_version_file)  googletest/CMakeLists.txt:96 (write_basic_package_version_file)  -- Configuring incomplete, errors occurred!# cat ../CMakeLists.txt cmake_minimum_required(VERSION 2.8.8) if (CMAKE_VERSION VERSION_LESS "3.1")  add_definitions(-std=c++11)else()  set(CMAKE_CXX_STANDARD 11)  set(CMAKE_CXX_STANDARD_REQUIRED ON)  set(CMAKE_CXX_EXTENSIONS OFF)endif() if (POLICY CMP0048)  cmake_policy(SET CMP0048 NEW)endif (POLICY CMP0048) project(googletest-distribution)#set(CMAKE_PROJECT_VERSION_SET_BY_PROJECT_COMMAND FALSE)set(GOOGLETEST_VERSION 1.9.0) if("${CVF_VERSION}" STREQUAL "")    if ("${GOOGLETEST_VERSION}" STREQUAL "")      message(FATAL_ERROR "No VERSION specified for WRITE_BASIC_CONFIG_VERSION_FILE()")    else()      set(CVF_VERSION "${GOOGLETEST_VERSION}")    endif()endif() if("${CVF_VERSION}" STREQUAL "")    message(FATAL_ERROR "No VERSION specified for WRITE_BASIC_CONFIG_VERSION_FILE()")else() endif() enable_testing() include(CMakeDependentOption)include(GNUInstallDirs) #Note that googlemock target already builds googletestoption(BUILD_GMOCK "Builds the googlemock subproject" ON)option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) if(BUILD_GMOCK)  add_subdirectory( googlemock )else()  add_subdirectory( googletest )endif()

    Dans le fichier la version minimum semble être 2.8.8 et j’ai la version 2.8.9-1. J’ai essayé de forcer la variable mais sans succès. 

    gtest Created Wed, 19 Dec 2018 00:00:00 +0000