Changeset 3889 in CLRX


Ignore:
Timestamp:
Mar 10, 2018, 5:13:44 PM (4 months ago)
Author:
matszpk
Message:

CLRadeonExtender: Fixed FreeBSD support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/CMakeLists.txt

    r3888 r3889  
    7474UNSET(CMAKE_REQUIRED_FLAGS)
    7575
    76 IF(HAVE_GNU11_FLAG AND HAVE_GNU11_IOSTREAM)
    77     SET(CPP_STANDARD "-std=gnu++11")
    78     SET(HAVE_GNU11 1)
    79 ELSE(HAVE_GNU11_FLAG AND HAVE_GNU11_IOSTREAM)
    80     SET(CPP_STANDARD "-std=c++11")
    81 ENDIF(HAVE_GNU11_FLAG AND HAVE_GNU11_IOSTREAM)
     76IF("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
     77    # FreeBSD support
     78    MESSAGE(STATUS "Add -stdlib=libc++ for FreeBSD")
     79    SET(CPP_STANDARD "-std=c++11 -stdlib=libc++")
     80ELSE("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
     81    IF(HAVE_GNU11_FLAG AND HAVE_GNU11_IOSTREAM)
     82        SET(CPP_STANDARD "-std=gnu++11")
     83        SET(HAVE_GNU11 1)
     84    ELSE(HAVE_GNU11_FLAG AND HAVE_GNU11_IOSTREAM)
     85        SET(CPP_STANDARD "-std=c++11")
     86    ENDIF(HAVE_GNU11_FLAG AND HAVE_GNU11_IOSTREAM)
     87ENDIF("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
    8288
    8389MESSAGE(STATUS "Use standard ${CPP_STANDARD} for ${CMAKE_CXX_COMPILER}")
     
    137143ENDIF(BUILD_32BIT)
    138144
    139 # FreeBSD support
    140 IF("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
    141     MESSAGE(STATUS "Add -stdlib=libc++ for FreeBSD")
    142     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
    143     SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -stdlib=libc++")
    144     SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -stdlib=libc++")
    145     SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -stdlib=libc++")
    146 ENDIF("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
    147 
    148145# check system bitness
    149146TRY_COMPILE(HAVE_64BIT "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/Check64Bit.cpp")
Note: See TracChangeset for help on using the changeset viewer.