Project

General

Profile

avx_only_where_needed.patch

Szilárd Páll, 03/01/2013 01:15 PM

View differences:

src/gmxlib/CMakeLists.txt
113 113

  
114 114
# NONBONDED_SOURCES is imported from the nonbonded subdirectory.
115 115
add_library(gmx ${GMXLIB_SOURCES} ${BLAS_SOURCES} ${LAPACK_SOURCES} ${THREAD_MPI_SRC} ${NONBONDED_SOURCES})
116

  
117
set(FILES_NEEDING_AVX "bondfree.c;${NONBONDED_SOURCES}")
118
set_source_files_properties(${FILES_NEEDING_AVX} PROPERTIES COMPILE_FLAGS "-mavx")
119

  
116 120
target_link_libraries(gmx ${GMX_GPU_LIBRARIES} ${GMX_EXTRA_LIBRARIES} ${FFT_LIBRARIES} ${THREAD_LIB} ${OpenMP_SHARED_LINKER_FLAGS})
117 121
if(USE_VERSION_H)
118 122
	add_dependencies(gmx gmx_version) 
src/mdlib/CMakeLists.txt
76 76
set_target_properties(md PROPERTIES OUTPUT_NAME "${MD_PREFIX}md${GMX_LIBS_SUFFIX}" SOVERSION ${SOVERSION} INSTALL_NAME_DIR "${LIB_INSTALL_DIR}"
77 77
    COMPILE_FLAGS "${OpenMP_C_FLAGS}")
78 78

  
79
set(FILES_NEEDING_AVX "nbnxn_kernels/nbnxn_kernel_simd_4xn.c;nbnxn_kernels/nbnxn_kernel_simd_2xnn.c;nbnxn_atomdata.c;pme.c;nbnxn_search.c")
80
set_source_files_properties(${FILES_NEEDING_AVX} PROPERTIES COMPILE_FLAGS "-mavx")
81

  
79 82
install(TARGETS md DESTINATION ${LIB_INSTALL_DIR} COMPONENT libraries)
80 83

  
81 84
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libmd.pc.cmakein ${CMAKE_CURRENT_BINARY_DIR}/libmd.pc @ONLY)