| 1 |
From: Michael R. Crusoe <[email protected]> |
| 2 |
Subject: Enable optional executable suffix to indicate SIMD level |
| 3 |
Forwarded: https://github.com/soedinglab/hh-suite/pull/219 |
| 4 |
--- hhsuite.orig/src/CMakeLists.txt |
| 5 |
+++ hhsuite/src/CMakeLists.txt |
| 6 |
@@ -182,81 +182,81 @@ |
| 7 |
target_link_libraries(HH_OBJECTS ${OpenMP_CXX_LIBRARIES}) |
| 8 |
endif() |
| 9 |
|
| 10 |
-add_executable(hhblits hhblits_app.cpp) |
| 11 |
-target_link_libraries(hhblits HH_OBJECTS) |
| 12 |
+add_executable(hhblits${EXE_SUFFIX} hhblits_app.cpp) |
| 13 |
+target_link_libraries(hhblits${EXE_SUFFIX} HH_OBJECTS) |
| 14 |
|
| 15 |
-add_executable(hhmake hhmake.cpp) |
| 16 |
-target_link_libraries(hhmake HH_OBJECTS) |
| 17 |
+add_executable(hhmake${EXE_SUFFIX} hhmake.cpp) |
| 18 |
+target_link_libraries(hhmake${EXE_SUFFIX} HH_OBJECTS) |
| 19 |
|
| 20 |
-add_executable(hhfilter hhfilter.cpp) |
| 21 |
-target_link_libraries(hhfilter HH_OBJECTS) |
| 22 |
+add_executable(hhfilter${EXE_SUFFIX} hhfilter.cpp) |
| 23 |
+target_link_libraries(hhfilter${EXE_SUFFIX} HH_OBJECTS) |
| 24 |
|
| 25 |
-add_executable(hhsearch hhblits_app.cpp) |
| 26 |
-target_link_libraries(hhsearch HH_OBJECTS) |
| 27 |
-set_property(TARGET hhsearch PROPERTY COMPILE_FLAGS "-DHHSEARCH=1") |
| 28 |
+add_executable(hhsearch${EXE_SUFFIX} hhblits_app.cpp) |
| 29 |
+target_link_libraries(hhsearch${EXE_SUFFIX} HH_OBJECTS) |
| 30 |
+set_property(TARGET hhsearch${EXE_SUFFIX} PROPERTY COMPILE_FLAGS "-DHHSEARCH=1") |
| 31 |
|
| 32 |
-add_executable(hhalign hhblits_app.cpp) |
| 33 |
-target_link_libraries(hhalign HH_OBJECTS) |
| 34 |
-set_property(TARGET hhalign PROPERTY COMPILE_FLAGS "-DHHALIGN=1") |
| 35 |
+add_executable(hhalign${EXE_SUFFIX} hhblits_app.cpp) |
| 36 |
+target_link_libraries(hhalign${EXE_SUFFIX} HH_OBJECTS) |
| 37 |
+set_property(TARGET hhalign${EXE_SUFFIX} PROPERTY COMPILE_FLAGS "-DHHALIGN=1") |
| 38 |
|
| 39 |
-add_executable(hhconsensus hhconsensus.cpp) |
| 40 |
-target_link_libraries(hhconsensus HH_OBJECTS) |
| 41 |
+add_executable(hhconsensus${EXE_SUFFIX} hhconsensus.cpp) |
| 42 |
+target_link_libraries(hhconsensus${EXE_SUFFIX} HH_OBJECTS) |
| 43 |
|
| 44 |
add_library(A3M_COMPRESS a3m_compress.cpp) |
| 45 |
if (OPENMP_FOUND AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU") |
| 46 |
target_link_libraries(A3M_COMPRESS ${OpenMP_CXX_LIBRARIES}) |
| 47 |
endif() |
| 48 |
|
| 49 |
-add_executable(a3m_extract a3m_extract.cpp) |
| 50 |
-target_link_libraries(a3m_extract ffindex A3M_COMPRESS) |
| 51 |
+add_executable(a3m_extract${EXE_SUFFIX} a3m_extract.cpp) |
| 52 |
+target_link_libraries(a3m_extract${EXE_SUFFIX} ffindex A3M_COMPRESS) |
| 53 |
|
| 54 |
-add_executable(a3m_reduce a3m_reduce.cpp) |
| 55 |
-target_link_libraries(a3m_reduce ffindex A3M_COMPRESS) |
| 56 |
+add_executable(a3m_reduce${EXE_SUFFIX} a3m_reduce.cpp) |
| 57 |
+target_link_libraries(a3m_reduce${EXE_SUFFIX} ffindex A3M_COMPRESS) |
| 58 |
|
| 59 |
-add_executable(a3m_database_reduce a3m_database_reduce.cpp ) |
| 60 |
-target_link_libraries(a3m_database_reduce ffindex A3M_COMPRESS) |
| 61 |
+add_executable(a3m_database_reduce${EXE_SUFFIX} a3m_database_reduce.cpp ) |
| 62 |
+target_link_libraries(a3m_database_reduce${EXE_SUFFIX} ffindex A3M_COMPRESS) |
| 63 |
|
| 64 |
-add_executable(a3m_database_extract a3m_database_extract.cpp) |
| 65 |
-target_link_libraries(a3m_database_extract ffindex A3M_COMPRESS) |
| 66 |
+add_executable(a3m_database_extract${EXE_SUFFIX} a3m_database_extract.cpp) |
| 67 |
+target_link_libraries(a3m_database_extract${EXE_SUFFIX} ffindex A3M_COMPRESS) |
| 68 |
|
| 69 |
-add_executable(a3m_database_filter a3m_database_filter.cpp) |
| 70 |
-target_link_libraries(a3m_database_filter ffindex A3M_COMPRESS) |
| 71 |
+add_executable(a3m_database_filter${EXE_SUFFIX} a3m_database_filter.cpp) |
| 72 |
+target_link_libraries(a3m_database_filter${EXE_SUFFIX} ffindex A3M_COMPRESS) |
| 73 |
|
| 74 |
-add_executable(cstranslate cs/cstranslate_app.cc) |
| 75 |
-target_link_libraries(cstranslate HH_OBJECTS A3M_COMPRESS) |
| 76 |
+add_executable(cstranslate${EXE_SUFFIX} cs/cstranslate_app.cc) |
| 77 |
+target_link_libraries(cstranslate${EXE_SUFFIX} HH_OBJECTS A3M_COMPRESS) |
| 78 |
|
| 79 |
INSTALL(TARGETS |
| 80 |
- hhblits |
| 81 |
- hhmake |
| 82 |
- hhfilter |
| 83 |
- hhsearch |
| 84 |
- hhalign |
| 85 |
- hhconsensus |
| 86 |
- a3m_extract |
| 87 |
- a3m_reduce |
| 88 |
- a3m_database_reduce |
| 89 |
- a3m_database_extract |
| 90 |
- a3m_database_filter |
| 91 |
- cstranslate |
| 92 |
+ hhblits${EXE_SUFFIX} |
| 93 |
+ hhmake${EXE_SUFFIX} |
| 94 |
+ hhfilter${EXE_SUFFIX} |
| 95 |
+ hhsearch${EXE_SUFFIX} |
| 96 |
+ hhalign${EXE_SUFFIX} |
| 97 |
+ hhconsensus${EXE_SUFFIX} |
| 98 |
+ a3m_extract${EXE_SUFFIX} |
| 99 |
+ a3m_reduce${EXE_SUFFIX} |
| 100 |
+ a3m_database_reduce${EXE_SUFFIX} |
| 101 |
+ a3m_database_extract${EXE_SUFFIX} |
| 102 |
+ a3m_database_filter${EXE_SUFFIX} |
| 103 |
+ cstranslate${EXE_SUFFIX} |
| 104 |
DESTINATION bin |
| 105 |
) |
| 106 |
|
| 107 |
if (OPENMP_FOUND) |
| 108 |
- add_executable(hhblits_omp hhblits_omp.cpp) |
| 109 |
- target_link_libraries(hhblits_omp HH_OBJECTS) |
| 110 |
+ add_executable(hhblits_omp${EXE_SUFFIX} hhblits_omp.cpp) |
| 111 |
+ target_link_libraries(hhblits_omp${EXE_SUFFIX} HH_OBJECTS) |
| 112 |
|
| 113 |
- add_executable(hhsearch_omp hhblits_omp.cpp) |
| 114 |
- target_link_libraries(hhsearch_omp HH_OBJECTS) |
| 115 |
- set_property(TARGET hhsearch_omp PROPERTY COMPILE_FLAGS "-DHHSEARCH=1") |
| 116 |
+ add_executable(hhsearch_omp${EXE_SUFFIX} hhblits_omp.cpp) |
| 117 |
+ target_link_libraries(hhsearch_omp${EXE_SUFFIX} HH_OBJECTS) |
| 118 |
+ set_property(TARGET hhsearch_omp${EXE_SUFFIX} PROPERTY COMPILE_FLAGS "-DHHSEARCH=1") |
| 119 |
|
| 120 |
- add_executable(hhalign_omp hhblits_omp.cpp) |
| 121 |
- target_link_libraries(hhalign_omp HH_OBJECTS) |
| 122 |
- set_property(TARGET hhalign_omp PROPERTY COMPILE_FLAGS "-DHHALIGN=1") |
| 123 |
+ add_executable(hhalign_omp${EXE_SUFFIX} hhblits_omp.cpp) |
| 124 |
+ target_link_libraries(hhalign_omp${EXE_SUFFIX} HH_OBJECTS) |
| 125 |
+ set_property(TARGET hhalign_omp${EXE_SUFFIX} PROPERTY COMPILE_FLAGS "-DHHALIGN=1") |
| 126 |
|
| 127 |
- add_executable(hhblits_ca3m hhblits_ca3m.cpp) |
| 128 |
- target_link_libraries (hhblits_ca3m HH_OBJECTS) |
| 129 |
+ add_executable(hhblits_ca3m${EXE_SUFFIX} hhblits_ca3m.cpp) |
| 130 |
+ target_link_libraries (hhblits_ca3m${EXE_SUFFIX} HH_OBJECTS) |
| 131 |
|
| 132 |
- INSTALL(TARGETS hhblits_omp hhsearch_omp hhalign_omp hhblits_ca3m DESTINATION bin) |
| 133 |
+ INSTALL(TARGETS hhblits_omp${EXE_SUFFIX} hhsearch_omp${EXE_SUFFIX} hhalign_omp${EXE_SUFFIX} hhblits_ca3m${EXE_SUFFIX} DESTINATION bin) |
| 134 |
endif () |
| 135 |
|
| 136 |
if (${CHECK_MPI}) |
| 137 |
@@ -264,27 +264,27 @@ |
| 138 |
if (MPI_CXX_FOUND) |
| 139 |
include_directories(${MPI_CXX_INCLUDE_PATH}) |
| 140 |
|
| 141 |
- add_executable(hhblits_mpi hhblits_mpi.cpp) |
| 142 |
- target_link_libraries(hhblits_mpi HH_OBJECTS mpq ${MPI_CXX_LIBRARIES}) |
| 143 |
- set_target_properties(hhblits_mpi PROPERTIES COMPILE_FLAGS "${MPI_CXX_COMPILE_FLAGS}") |
| 144 |
- set_target_properties(hhblits_mpi PROPERTIES LINK_FLAGS "${MPI_CXX_LINK_FLAGS}") |
| 145 |
- |
| 146 |
- add_executable(hhsearch_mpi hhblits_mpi.cpp) |
| 147 |
- target_link_libraries(hhsearch_mpi HH_OBJECTS mpq ${MPI_CXX_LIBRARIES}) |
| 148 |
- set_target_properties(hhsearch_mpi PROPERTIES COMPILE_FLAGS "${MPI_CXX_COMPILE_FLAGS} -DHHSEARCH=1") |
| 149 |
- set_target_properties(hhsearch_mpi PROPERTIES LINK_FLAGS "${MPI_CXX_LINK_FLAGS}") |
| 150 |
- |
| 151 |
- add_executable(hhalign_mpi hhblits_mpi.cpp) |
| 152 |
- target_link_libraries(hhalign_mpi HH_OBJECTS mpq ${MPI_CXX_LIBRARIES}) |
| 153 |
- set_target_properties(hhalign_mpi PROPERTIES COMPILE_FLAGS "${MPI_CXX_COMPILE_FLAGS} -DHHALIGN=1") |
| 154 |
- set_target_properties(hhalign_mpi PROPERTIES LINK_FLAGS "${MPI_CXX_LINK_FLAGS}") |
| 155 |
- |
| 156 |
- add_executable(cstranslate_mpi cs/cstranslate_mpi_app.cc) |
| 157 |
- target_link_libraries(cstranslate_mpi HH_OBJECTS A3M_COMPRESS mpq ${MPI_CXX_LIBRARIES}) |
| 158 |
- set_target_properties(cstranslate_mpi PROPERTIES COMPILE_FLAGS "${MPI_CXX_COMPILE_FLAGS}") |
| 159 |
- set_target_properties(cstranslate_mpi PROPERTIES LINK_FLAGS "${MPI_CXX_LINK_FLAGS}") |
| 160 |
+ add_executable(hhblits_mpi${EXE_SUFFIX} hhblits_mpi.cpp) |
| 161 |
+ target_link_libraries(hhblits_mpi${EXE_SUFFIX} HH_OBJECTS mpq ${MPI_CXX_LIBRARIES}) |
| 162 |
+ set_target_properties(hhblits_mpi${EXE_SUFFIX} PROPERTIES COMPILE_FLAGS "${MPI_CXX_COMPILE_FLAGS}") |
| 163 |
+ set_target_properties(hhblits_mpi${EXE_SUFFIX} PROPERTIES LINK_FLAGS "${MPI_CXX_LINK_FLAGS}") |
| 164 |
+ |
| 165 |
+ add_executable(hhsearch_mpi${EXE_SUFFIX} hhblits_mpi.cpp) |
| 166 |
+ target_link_libraries(hhsearch_mpi${EXE_SUFFIX} HH_OBJECTS mpq ${MPI_CXX_LIBRARIES}) |
| 167 |
+ set_target_properties(hhsearch_mpi${EXE_SUFFIX} PROPERTIES COMPILE_FLAGS "${MPI_CXX_COMPILE_FLAGS} -DHHSEARCH=1") |
| 168 |
+ set_target_properties(hhsearch_mpi${EXE_SUFFIX} PROPERTIES LINK_FLAGS "${MPI_CXX_LINK_FLAGS}") |
| 169 |
+ |
| 170 |
+ add_executable(hhalign_mpi${EXE_SUFFIX} hhblits_mpi.cpp) |
| 171 |
+ target_link_libraries(hhalign_mpi${EXE_SUFFIX} HH_OBJECTS mpq ${MPI_CXX_LIBRARIES}) |
| 172 |
+ set_target_properties(hhalign_mpi${EXE_SUFFIX} PROPERTIES COMPILE_FLAGS "${MPI_CXX_COMPILE_FLAGS} -DHHALIGN=1") |
| 173 |
+ set_target_properties(hhalign_mpi${EXE_SUFFIX} PROPERTIES LINK_FLAGS "${MPI_CXX_LINK_FLAGS}") |
| 174 |
+ |
| 175 |
+ add_executable(cstranslate_mpi${EXE_SUFFIX} cs/cstranslate_mpi_app.cc) |
| 176 |
+ target_link_libraries(cstranslate_mpi${EXE_SUFFIX} HH_OBJECTS A3M_COMPRESS mpq ${MPI_CXX_LIBRARIES}) |
| 177 |
+ set_target_properties(cstranslate_mpi${EXE_SUFFIX} PROPERTIES COMPILE_FLAGS "${MPI_CXX_COMPILE_FLAGS}") |
| 178 |
+ set_target_properties(cstranslate_mpi${EXE_SUFFIX} PROPERTIES LINK_FLAGS "${MPI_CXX_LINK_FLAGS}") |
| 179 |
|
| 180 |
- install(TARGETS hhblits_mpi hhsearch_mpi hhalign_mpi cstranslate_mpi DESTINATION bin) |
| 181 |
+ install(TARGETS hhblits_mpi${EXE_SUFFIX} hhsearch_mpi${EXE_SUFFIX} hhalign_mpi${EXE_SUFFIX} cstranslate_mpi${EXE_SUFFIX} DESTINATION bin) |
| 182 |
endif () |
| 183 |
endif () |
| 184 |
|