Ignore:
Timestamp:
Oct 4, 2014, 8:40:23 AM (5 years ago)
Author:
nmedfort
Message:

Minor revisions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/CMakeLists.txt

    r4207 r4209  
    193193  SET(ENABLE_AVX_1 "/arch:AVX1")
    194194  SET(ENABLE_AVX_2 "/arch:AVX2")
    195 ELSE() # using Clang, GCC, Intel C++, etc
     195ELSE() # using Clang, GCC, Intel C++, etc 
    196196  SET(ENABLE_SSE1 "-msse")
    197197  SET(ENABLE_SSE2 "-msse2")
     
    199199  SET(ENABLE_SSE4_1 "-msse4.1")
    200200  SET(ENABLE_SSE4_2 "-msse4.2")
    201   SET(ENABLE_AVX_1 "-mavx")
    202   SET(ENABLE_AVX_2 "-mavx2")   
     201  IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
     202    SET(ENABLE_AVX_1 "-mavx -fabi-version=6")
     203    SET(ENABLE_AVX_2 "-mavx2 -fabi-version=6") 
     204  ELSE()
     205    SET(ENABLE_AVX_1 "-mavx")
     206    SET(ENABLE_AVX_2 "-mavx2")
     207  ENDIF()
    203208ENDIF()
    204209
     
    235240endif(${LLVM_PACKAGE_VERSION} MATCHES "3.4")
    236241
    237 if (BLOCK_SIZE_256)
    238   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_S2P_AVX2 -DBLOCK_SIZE=256 -march=core-avx2 -mavx2 -m64 -fabi-version=6")
    239 endif()
     242IF (BLOCK_SIZE_256)
     243  IF("${SIMD_SUPPORT_FOUND}" STREQUAL "${ENABLE_AVX_2}")
     244    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_S2P_AVX2 -DBLOCK_SIZE=256 -march=core-avx2 -m64")
     245  ELSE()
     246    MESSAGE(FATAL_ERROR "AVX2 is required for BLOCK_SIZE=256")
     247  ENDIF()
     248ENDIF()
    240249
    241250SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O3 -DNDEBUG")
Note: See TracChangeset for help on using the changeset viewer.