Skip to content
Snippets Groups Projects
Select Git revision
  • 4239f27f117b803fa99fa07f18308f70b8923a47
  • master default protected
  • v1.8.3
  • v1.8.2
  • v1.8.1
  • v1.8.0
  • v1.7.0
  • v1.6.2
  • v1.6.1
  • v1.6.0
  • v1.5.1
  • v1.5.0
  • v1.4.0
  • v1.3.0
  • v1.2.0
  • v1.1.0
  • v1.1.0rc2
  • v1.1.0rc1
  • v1.0.1
  • v1.0.0
  • v1.0.0b1
  • v0.2.0
22 results

setup.py

Blame
  • CMakeLists.txt 14.06 KiB
    #
    # Copyright 2013-2017 Software Radio Systems Limited
    #
    # This file is part of srsLTE
    #
    # srsLTE is free software: you can redistribute it and/or modify
    # it under the terms of the GNU Affero General Public License as
    # published by the Free Software Foundation, either version 3 of
    # the License, or (at your option) any later version.
    #
    # srsLTE is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    # GNU Affero General Public License for more details.
    #
    # A copy of the GNU Affero General Public License can be found in
    # the LICENSE file in the top-level directory of this distribution
    # and at http://www.gnu.org/licenses/.
    #
    
    
    ########################################################################
    # Prevent in-tree builds
    ########################################################################
    if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
        message(FATAL_ERROR "Prevented in-tree build. This is bad practice.")
    endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
    
    
    ########################################################################
    # Project setup
    ########################################################################
    cmake_minimum_required(VERSION 2.6)
    project( SRSLTE )
    message( STATUS "CMAKE_SYSTEM: " ${CMAKE_SYSTEM} )
    message( STATUS "CMAKE_SYSTEM_PROCESSOR: " ${CMAKE_SYSTEM_PROCESSOR} )
    message( STATUS "CMAKE_CXX_COMPILER: " ${CMAKE_CXX_COMPILER} )
    
    list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules")
    include(SRSLTEVersion) #sets version information
    include(SRSLTEPackage) #setup cpack
    
    include(CTest)
    set(CTEST_MEMORYCHECK_COMMAND valgrind)
    set(CTEST_MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full" )
    
    configure_file(
        "${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake.in"
        "${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake"
        IMMEDIATE @ONLY)
    
    if(NOT CMAKE_BUILD_TYPE)
       set(CMAKE_BUILD_TYPE Release)
       message(STATUS "Build type not specified: defaulting to Release.")
    endif(NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
    
    # Generate CMake to include build information
    configure_file(
      ${CMAKE_SOURCE_DIR}/cmake/modules/SRSLTEbuildinfo.cmake.in
      ${CMAKE_BINARY_DIR}/SRSLTEbuildinfo.cmake
    )
    
    ########################################################################
    # Options
    ########################################################################
    option(ENABLE_SRSUE    "Build srsUE application"                  ON)
    option(ENABLE_SRSENB   "Build srsENB application"                 ON)
    option(ENABLE_SRSEPC   "Build srsEPC application"                 ON)
    option(DISABLE_SIMD    "disable simd instructions"                OFF)