Skip to content

Commit

Permalink
no need to link project lib
Browse files Browse the repository at this point in the history
  • Loading branch information
shijiashuai committed Nov 23, 2017
1 parent 3be6485 commit 5fb7cfa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/thundersvm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ list(REMOVE_ITEM SRC "${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}-predict.cpp")
if (USE_CUDA)
cuda_add_library(${PROJECT_LIB_NAME} SHARED ${SRC})
target_link_libraries(${PROJECT_LIB_NAME} ${CUDA_cusparse_LIBRARY})
cuda_add_executable(${PROJECT_NAME}-train thundersvm-train.cpp ${COMMON_INCLUDES})
cuda_add_executable(${PROJECT_NAME}-predict thundersvm-predict.cpp ${COMMON_INCLUDES})
cuda_add_executable(${PROJECT_NAME}-train thundersvm-train.cpp ${SRC} ${COMMON_INCLUDES})
cuda_add_executable(${PROJECT_NAME}-predict thundersvm-predict.cpp ${SRC} ${COMMON_INCLUDES})
else ()
add_library(${PROJECT_LIB_NAME} SHARED ${SRC})
add_executable(${PROJECT_NAME}-train thundersvm-train.cpp ${COMMON_INCLUDES})
add_executable(${PROJECT_NAME}-predict thundersvm-predict.cpp ${COMMON_INCLUDES})
add_executable(${PROJECT_NAME}-train thundersvm-train.cpp ${SRC} ${COMMON_INCLUDES})
add_executable(${PROJECT_NAME}-predict thundersvm-predict.cpp ${SRC} ${COMMON_INCLUDES})
endif ()

target_link_libraries(${PROJECT_NAME}-train ${PROJECT_LIB_NAME} ${LINK_LIBRARY})
target_link_libraries(${PROJECT_NAME}-predict ${PROJECT_LIB_NAME} ${LINK_LIBRARY})
target_link_libraries(${PROJECT_NAME}-train ${LINK_LIBRARY})
target_link_libraries(${PROJECT_NAME}-predict ${LINK_LIBRARY})
3 changes: 1 addition & 2 deletions src/thundersvm/svm_python_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
#include <thundersvm/model/nusvr.h>
#include <thundersvm/util/metric.h>
#include "thundersvm/cmdparser.h"
#include <iostream>

using std::fstream;
using std::stringstream;
DataSet dataset_python;

INITIALIZE_EASYLOGGINGPP
extern "C" {
DataSet* DataSet_new() {return new DataSet();}
void DataSet_load_from_python(DataSet *dataset, float *y, char **x, int len) {dataset->load_from_python(y, x, len);}
Expand Down

0 comments on commit 5fb7cfa

Please sign in to comment.