Changeset 3891 in CLRX


Ignore:
Timestamp:
Mar 11, 2018, 7:47:10 AM (9 months ago)
Author:
matszpk
Message:

CLRadeonExtender: Add info about building under FreeBSD. Add extra rpath when FreeBSD and gcc used.

Location:
CLRadeonExtender/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/CMakeLists.txt

    r3890 r3891  
    137137ENDIF(BUILD_32BIT)
    138138
     139# FreeBSD support
     140STRING(REGEX MATCH "g\\+\\+[0-9]*$" CXX_COMPILER_IS_GCC "${CMAKE_CXX_COMPILER}")
     141IF("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD" AND CXX_COMPILER_IS_GCC)
     142    IF("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "5.0.0")
     143        STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1\\2" RPATH_GCC_VER
     144                "${CMAKE_CXX_COMPILER_VERSION}")
     145    ELSE("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "5.0.0")
     146        STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" RPATH_GCC_VER
     147                "${CMAKE_CXX_COMPILER_VERSION}")
     148    ENDIF("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "5.0.0")
     149   
     150    SET(GCC_RPATH "/usr/local/lib/gcc${RPATH_GCC_VER}")
     151    MESSAGE(STATUS "Add extra rpath ${GCC_RPATH}")
     152   
     153    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-rpath=${GCC_RPATH}")
     154    SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wl,-rpath=${GCC_RPATH}")
     155    SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wl,-rpath=${GCC_RPATH}")
     156    SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO
     157            "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -Wl,-rpath=${GCC_RPATH}")
     158    SET(CMAKE_CXX_FLAGS_DEBUGCOV "${CMAKE_CXX_FLAGS_DEBUGCOV} -Wl,-rpath=${GCC_RPATH}")
     159    SET(CMAKE_CXX_FLAGS_GCCSAN "${CMAKE_CXX_FLAGS_GCCSAN} -Wl,-rpath=${GCC_RPATH}")
     160    SET(CMAKE_CXX_FLAGS_GCCSSP "${CMAKE_CXX_FLAGS_GCCSSP} -Wl,-rpath=${GCC_RPATH}")
     161ENDIF("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD" AND CXX_COMPILER_IS_GCC)
     162
    139163# check system bitness
    140164TRY_COMPILE(HAVE_64BIT "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/Check64Bit.cpp")
  • CLRadeonExtender/trunk/INSTALL

    r3835 r3891  
    9393
    9494  ctest
    95  
     95
    96962.1. Windows and MSVC
    9797
    9898CLRadeonExtender has been compiled under Windows 8.1 and Microsoft Visual Studio 2015
    9999Community version.
     100
     1012.2. FreeBSD
     102
     103Due to unknown reasons, the compilation under clang++ will be failed. We recommend to use
     104gcc compiler to build the CLRadeonExtender. You should prepend cmake command by `CXX=g++`:
     105`CXX=g++ cmake .. ....`.
    100106
    1011073. Installation
  • CLRadeonExtender/trunk/README.md

    r3835 r3891  
    132132```
    133133
     134#### FreeBSD
     135
     136Due to unknown reasons, the compilation under clang++ will be failed. We recommend to use
     137gcc compiler to build the CLRadeonExtender. You should prepend cmake command by `CXX=g++`:
     138`CXX=g++ cmake .. ....`.
     139
    134140
    135141### Installation
Note: See TracChangeset for help on using the changeset viewer.