Commit ff758de7 authored by COULAUD Olivier's avatar COULAUD Olivier
Browse files

Add AVX or SSE flags in scalfmm_cxx_flags

Push scalfmm_cxx_flags in ScalFMMConfig.cmake
parent 2265be2b
...@@ -283,12 +283,12 @@ if( ScalFMM_USE_SSE ) ...@@ -283,12 +283,12 @@ if( ScalFMM_USE_SSE )
TRY_COMPILE(COMPILE_SSE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_MODULE_PATH}/compileTestSse.cpp COMPILE_DEFINITIONS "${CMAKE_CXX_FLAGS} ${SSE_FLAGS}" OUTPUT_VARIABLE COMPILE_SSE_OUTPUT) TRY_COMPILE(COMPILE_SSE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_MODULE_PATH}/compileTestSse.cpp COMPILE_DEFINITIONS "${CMAKE_CXX_FLAGS} ${SSE_FLAGS}" OUTPUT_VARIABLE COMPILE_SSE_OUTPUT)
IF(${COMPILE_SSE}) IF(${COMPILE_SSE})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SSE_FLAGS}") SET(ScaLFMM_CXX_FLAGS "${ScaLFMM_CXX_FLAGS} ${SSE_FLAGS}")
TRY_COMPILE(COMPILE_RESULT_VAR ${CMAKE_CURRENT_BINARY_DIR} TRY_COMPILE(COMPILE_RESULT_VAR ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_MODULE_PATH}/checkSSEpe.cpp COMPILE_DEFINITIONS "${CMAKE_CXX_FLAGS} ${SSE_FLAGS}") ${CMAKE_MODULE_PATH}/checkSSEpe.cpp COMPILE_DEFINITIONS "${CMAKE_CXX_FLAGS} ${SSE_FLAGS}")
IF( NOT ${COMPILE_RESULT_VAR}) IF( NOT ${COMPILE_RESULT_VAR})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__SSEPE_INTEL_COMPILER") SET(ScaLFMM_CXX_FLAGS "${ScaLFMM_CXX_FLAGS} -D__SSEPE_INTEL_COMPILER")
ENDIF() ENDIF()
# SET(ScalFMM_USE_AVX OFF) # SET(ScalFMM_USE_AVX OFF)
ELSE(${COMPILE_SSE}) ELSE(${COMPILE_SSE})
...@@ -307,12 +307,12 @@ if(ScalFMM_USE_AVX) ...@@ -307,12 +307,12 @@ if(ScalFMM_USE_AVX)
TRY_COMPILE(COMPILE_AVX ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_MODULE_PATH}/compileTestAvx.cpp COMPILE_DEFINITIONS "${CMAKE_CXX_FLAGS} ${AVX_FLAGS}" OUTPUT_VARIABLE COMPILE_AVX_OUTPUT) TRY_COMPILE(COMPILE_AVX ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_MODULE_PATH}/compileTestAvx.cpp COMPILE_DEFINITIONS "${CMAKE_CXX_FLAGS} ${AVX_FLAGS}" OUTPUT_VARIABLE COMPILE_AVX_OUTPUT)
IF(${COMPILE_AVX}) IF(${COMPILE_AVX})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${AVX_FLAGS}") SET(ScaLFMM_CXX_FLAGS "${ScaLFMM_CXX_FLAGS} ${AVX_FLAGS}")
# SET( ScalFMM_USE_SSE OFF FORCE) # ne marche pas # SET( ScalFMM_USE_SSE OFF FORCE) # ne marche pas
TRY_COMPILE(COMPILE_RESULT_AVSPE ${CMAKE_CURRENT_BINARY_DIR} TRY_COMPILE(COMPILE_RESULT_AVSPE ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_MODULE_PATH}/checkAVXpe.cpp COMPILE_DEFINITIONS "${CMAKE_CXX_FLAGS} ") ${CMAKE_MODULE_PATH}/checkAVXpe.cpp COMPILE_DEFINITIONS "${CMAKE_CXX_FLAGS} ")
IF( NOT ${COMPILE_RESULT_AVSPE}) IF( NOT ${COMPILE_RESULT_AVSPE})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__AVXPE_INTEL_COMPILER") SET(ScaLFMM_CXX_FLAGS "${ScaLFMM_CXX_FLAGS} -D__AVXPE_INTEL_COMPILER")
ENDIF() ENDIF()
MESSAGE(STATUS ${CMAKE_CXX_FLAGS} ) MESSAGE(STATUS ${CMAKE_CXX_FLAGS} )
...@@ -498,6 +498,9 @@ MESSAGE( STATUS "ScalFMM_USE_LOG = ${ScalFMM_USE_LOG}" ) ...@@ -498,6 +498,9 @@ MESSAGE( STATUS "ScalFMM_USE_LOG = ${ScalFMM_USE_LOG}" )
# Use Assert # Use Assert
MESSAGE( STATUS "ScalFMM_USE_ASSERT = ${ScalFMM_USE_ASSERT}" ) MESSAGE( STATUS "ScalFMM_USE_ASSERT = ${ScalFMM_USE_ASSERT}" )
# #
MESSAGE(STATUS "CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS}")
SET(CMAKE_CXX_FLAGS "${ScaLFMM_CXX_FLAGS} ${CMAKE_CXX_FLAGS}")
MESSAGE(STATUS "CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS}") MESSAGE(STATUS "CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS}")
MESSAGE(STATUS "ScaLFMM_CXX_FLAGS = ${ScaLFMM_CXX_FLAGS}") MESSAGE(STATUS "ScaLFMM_CXX_FLAGS = ${ScaLFMM_CXX_FLAGS}")
MESSAGE(STATUS "SCALFMM_LIBRARIES = ${SCALFMM_LIBRARIES}") MESSAGE(STATUS "SCALFMM_LIBRARIES = ${SCALFMM_LIBRARIES}")
......
...@@ -16,6 +16,7 @@ SET(ScalFMM_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include") ...@@ -16,6 +16,7 @@ SET(ScalFMM_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include")
SET(ScalFMM_LIBRARIES_DIR "@CMAKE_INSTALL_PREFIX@/lib") SET(ScalFMM_LIBRARIES_DIR "@CMAKE_INSTALL_PREFIX@/lib")
SET(ScalFMM_LIBRARIES_ADD "@SCALFMM_LIBRARIES@") SET(ScalFMM_LIBRARIES_ADD "@SCALFMM_LIBRARIES@")
SET(ScalFMM_LIBRARY_NAME "@scalfmm_lib@") SET(ScalFMM_LIBRARY_NAME "@scalfmm_lib@")
SET(ScaLFMM_CXX_FLAGS "@ScaLFMM_CXX_FLAGS@")
# #
SET(ScalFMM_SOURCE_DIR "@ScalFMM_SOURCE_DIR@") SET(ScalFMM_SOURCE_DIR "@ScalFMM_SOURCE_DIR@")
SET(ScalFMM_BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@") SET(ScalFMM_BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@")
...@@ -36,8 +37,8 @@ SET(ScalFMM_USE_ADDONS "@ScalFMM_USE_ADDONS@") ...@@ -36,8 +37,8 @@ SET(ScalFMM_USE_ADDONS "@ScalFMM_USE_ADDONS@")
SET(ScalFMM_USE_LOG "@ScalFMM_USE_LOG@") SET(ScalFMM_USE_LOG "@ScalFMM_USE_LOG@")
SET(ScalFMM_USE_FFT "@ScalFMM_USE_FFT@") SET(ScalFMM_USE_FFT "@ScalFMM_USE_FFT@")
SET(ScalFMM_USE_STARPU "@ScalFMM_USE_STARPU@") SET(ScalFMM_USE_STARPU "@ScalFMM_USE_STARPU@")
#SET(ScalFMM_USE_SSE "@ScalFMM_USE_SSE@") SET(ScalFMM_USE_SSE "@ScalFMM_USE_SSE@")
#SET(ScalFMM_USE_AVX "@ScalFMM_USE_AVX@") SET(ScalFMM_USE_AVX "@ScalFMM_USE_AVX@")
# #
SET(ScalFMM_DOC_TAGS "@CMAKE_BINARY_DIR@/Doc/scalfmm.tag") SET(ScalFMM_DOC_TAGS "@CMAKE_BINARY_DIR@/Doc/scalfmm.tag")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment