Skip to content

Commit

Permalink
Next try with build system cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
milot-mirdita committed Jan 7, 2025
1 parent e840263 commit 64f03d4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
12 changes: 3 additions & 9 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ task:
echo "deb [trusted=yes] http://archive.debian.org/debian jessie main" > /etc/apt/sources.list
echo "deb [trusted=yes] http://archive.debian.org/debian-security jessie/updates main" >> /etc/apt/sources.list
apt-get update --yes --force-yes || true
apt-get install wget clang-4.0 libc++-dev make git ca-certificates --yes --force-yes --no-install-suggests --no-install-recommends
wget https://github.com/Kitware/CMake/releases/download/v3.31.0/cmake-3.31.0-linux-x86_64.sh
chmod +x cmake-3.31.0-linux-x86_64.sh
./cmake-3.31.0-linux-x86_64.sh --skip-license --prefix=/usr/local
apt-get install cmake clang-4.0 libc++-dev make git ca-certificates --yes --force-yes --no-install-suggests --no-install-recommends
env:
CC: clang-4.0
CXX: clang++-4.0
Expand All @@ -36,16 +33,13 @@ task:
echo "deb [trusted=yes] http://archive.debian.org/debian jessie main" > /etc/apt/sources.list
echo "deb [trusted=yes] http://archive.debian.org/debian-security jessie/updates main" >> /etc/apt/sources.list
apt-get update --yes --force-yes || true
apt-get install wget gcc-4.9 g++-4.9 make git ca-certificates --yes --force-yes --no-install-suggests --no-install-recommends
wget https://github.com/Kitware/CMake/releases/download/v3.31.0/cmake-3.31.0-linux-x86_64.sh
chmod +x cmake-3.31.0-linux-x86_64.sh
./cmake-3.31.0-linux-x86_64.sh --skip-license --prefix=/usr/local
apt-get install cmake gcc-4.9 g++-4.9 make git ca-certificates --yes --force-yes --no-install-suggests --no-install-recommends
env:
CC: gcc-4.9
CXX: g++-4.9
compile_script: |
mkdir build && cd build
/usr/local/bin/cmake -DCMAKE_BUILD_TYPE=Release -DHAVE_TESTS=1 -DENABLE_WERROR=0 -DHAVE_SSE4_1=1 -DREQUIRE_OPENMP=0 ..
cmake -DCMAKE_BUILD_TYPE=Release -DHAVE_TESTS=1 -DENABLE_WERROR=0 -DHAVE_SSE4_1=1 -DREQUIRE_OPENMP=0 ..
make -j $(nproc --all)
test_script: MMSEQS_NUM_THREADS=4 ./util/regression/run_regression.sh ./build/src/mmseqs SCRATCH SEARCH

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
cmake_policy(SET CMP0060 OLD)
cmake_policy(SET CMP0074 NEW)
project(MMseqs CXX C)
Expand Down
10 changes: 10 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,16 @@ find_package(OpenMP QUIET)
if (OPENMP_FOUND)
message("-- Found OpenMP")
target_compile_definitions(mmseqs-framework PUBLIC -DOPENMP=1)
# hack: remove pthread from openmp deps, it gets linked correctly by cuda later
if (FORCE_STATIC_DEPS AND ENABLE_CUDA)
set(FILTERED_LIBRARIES "")
foreach (LIB ${OpenMP_CXX_LIBRARIES})
if (NOT LIB MATCHES "pthread")
list(APPEND FILTERED_LIBRARIES ${LIB})
endif ()
endforeach ()
set(OpenMP_CXX_LIBRARIES ${FILTERED_LIBRARIES})
endif ()
target_link_libraries(mmseqs-framework ${OpenMP_CXX_LIBRARIES})
target_include_directories(mmseqs-framework PUBLIC ${OpenMP_CXX_INCLUDE_DIRS})
append_target_property(mmseqs-framework COMPILE_FLAGS ${OpenMP_CXX_FLAGS})
Expand Down

0 comments on commit 64f03d4

Please sign in to comment.