Ignore:
Timestamp:
Sep 13, 2017, 7:21:13 PM (10 months ago)
Author:
matszpk
Message:

CLRadeonExtender: Add checking C++11 Thread call_once. Add detection OpenCL in MinGW64 environment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/CMakeLists.txt

    r3325 r3370  
    247247# check for AMDAPP lib/x86 or lib/x86_64 libOpenCL.so file
    248248IF(HAVE_OPENCL)
    249     IF((CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_CL_64) AND NOT BUILD_32BIT)
     249    IF((CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR
     250        CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_CL_64) AND NOT BUILD_32BIT)
    250251        IF(EXISTS ${OPENCL_DIST_DIR}/lib/x86_64/libOpenCL.so OR
    251252            EXISTS ${OPENCL_DIST_DIR}/lib/x86_64/OpenCL.lib)
     
    263264        ENDIF(EXISTS ${OPENCL_DIST_DIR}/lib/x86/libOpenCL.so OR
    264265            EXISTS ${OPENCL_DIST_DIR}/lib/x86/OpenCL.lib)
    265     ENDIF((CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_CL_64) AND NOT BUILD_32BIT)
     266    ENDIF((CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR
     267           CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_CL_64) AND NOT BUILD_32BIT)
    266268    IF(HAVE_UBUNTU_GPUPRO)
    267269        IF((CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_CL_64) AND NOT BUILD_32BIT)
     
    305307IF(BUILD_32BIT)
    306308    MESSAGE(STATUS "This is 32-bit")
    307     TRY_COMPILE(HAVE_INT128 "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/Int128Detect.c"
    308         COMPILE_DEFINITIONS "-m32")
     309    IF(MSVC)
     310        SET(TRYCOMP_CFLAGS "")
     311        SET(TRYCOMP_CXXFLAGS "")
     312    ELSE(MSVC)
     313        SET(TRYCOMP_CFLAGS "-m32")
     314        SET(TRYCOMP_CXXFLAGS "-m32 ${CPP_STANDARD}")
     315    ENDIF(MSVC)
    309316ELSE(BUILD_32BIT)
    310     TRY_COMPILE(HAVE_INT128 "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/Int128Detect.c")
     317    IF(MSVC)
     318        SET(TRYCOMP_CFLAGS "")
     319        SET(TRYCOMP_CXXFLAGS "")
     320    ELSE(MSVC)
     321        SET(TRYCOMP_CFLAGS "")
     322        SET(TRYCOMP_CXXFLAGS "${CPP_STANDARD}")
     323    ENDIF(MSVC)
    311324ENDIF(BUILD_32BIT)
     325
     326TRY_COMPILE(HAVE_INT128 "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/Int128Detect.c"
     327            COMPILE_DEFINITIONS "${TRYCOMP_C_CFLAGS}")
     328TRY_COMPILE(HAVE_CALL_ONCE "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/ThreadOnce.cpp"
     329            COMPILE_DEFINITIONS "${TRYCOMP_CXX_CFLAGS}")
    312330
    313331IF(HAVE_INT128)
     
    316334    MESSAGE(STATUS "128-bit integer arithmetic not supported by compiler")
    317335ENDIF(HAVE_INT128)
     336
     337IF(HAVE_CALL_ONCE)
     338    MESSAGE(STATUS "Environment have C++11 std::call_once")
     339ELSE(HAVE_CALL_ONCE)
     340    MESSAGE(STATUS "Environment have no C++11 std::call_once")
     341ENDIF(HAVE_CALL_ONCE)
    318342
    319343###
Note: See TracChangeset for help on using the changeset viewer.