mirror of
https://github.com/facebookresearch/faiss.git
synced 2026-10-11 22:50:00 +00:00
Move build to CMake (#1313)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1313 Reviewed By: mdouze Differential Revision: D22948267 Pulled By: beauby fbshipit-source-id: ec16fa0342f37672d46fb7886ecc55c7996011c4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4c3b5ad156
commit
a8e4c5e2d5
@@ -0,0 +1,20 @@
|
||||
# Copyright (c) Facebook, Inc. and its affiliates.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This source code is licensed under the BSD-style license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
add_executable(1-Flat EXCLUDE_FROM_ALL 1-Flat.cpp)
|
||||
target_link_libraries(1-Flat PRIVATE faiss)
|
||||
|
||||
add_executable(2-IVFFlat EXCLUDE_FROM_ALL 2-IVFFlat.cpp)
|
||||
target_link_libraries(2-IVFFlat PRIVATE faiss)
|
||||
|
||||
add_executable(3-IVFPQ EXCLUDE_FROM_ALL 3-IVFPQ.cpp)
|
||||
target_link_libraries(3-IVFPQ PRIVATE faiss)
|
||||
|
||||
add_executable(4-GPU EXCLUDE_FROM_ALL 4-GPU.cpp)
|
||||
target_link_libraries(4-GPU PRIVATE faiss)
|
||||
|
||||
add_executable(5-Multiple-GPUs EXCLUDE_FROM_ALL 5-Multiple-GPUs.cpp)
|
||||
target_link_libraries(5-Multiple-GPUs PRIVATE faiss)
|
||||
@@ -1,25 +0,0 @@
|
||||
# Copyright (c) Facebook, Inc. and its affiliates.
|
||||
#
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
-include ../../makefile.inc
|
||||
|
||||
CPU_TARGETS = 1-Flat 2-IVFFlat 3-IVFPQ
|
||||
GPU_TARGETS = 4-GPU 5-Multiple-GPUs
|
||||
|
||||
default: cpu
|
||||
|
||||
all: cpu gpu
|
||||
|
||||
cpu: $(CPU_TARGETS)
|
||||
|
||||
gpu: $(GPU_TARGETS)
|
||||
|
||||
%: %.cpp ../../libfaiss.a
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ $^ $(LDFLAGS) -I../../.. $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -f $(CPU_TARGETS) $(GPU_TARGETS)
|
||||
|
||||
.PHONY: all cpu default gpu clean
|
||||
Reference in New Issue
Block a user