From c8af33687757f5665e1cf66cd99bf3d45e25a299 Mon Sep 17 00:00:00 2001 From: Sheridan C Rawlins Date: Wed, 17 Aug 2016 19:58:45 -0700 Subject: [PATCH] Added cmake files. --- CMakeLists.txt | 31 +++++++++++++++++++++++++++++++ blas/CMakeLists.txt | 9 +++++++++ matlab/CMakeLists.txt | 9 +++++++++ 3 files changed, 49 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 blas/CMakeLists.txt create mode 100644 matlab/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..f7a71df --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,31 @@ +cmake_minimum_required(VERSION 2.8) +project(liblinear) + +add_subdirectory(blas) +add_subdirectory(matlab) + +add_library( + linearStatic STATIC + linear.cpp + linear.h + tron.cpp + tron.h +) + +add_executable(train train.c) + +target_link_libraries( + train + linearStatic + blas +) + +add_executable( + predict + predict.c +) +target_link_libraries( + predict + linearStatic + blas +) diff --git a/blas/CMakeLists.txt b/blas/CMakeLists.txt new file mode 100644 index 0000000..1a9b069 --- /dev/null +++ b/blas/CMakeLists.txt @@ -0,0 +1,9 @@ +add_library( + blas STATIC + blas.h + blasp.h + daxpy.c + ddot.c + dnrm2.c + dscal.c +) \ No newline at end of file diff --git a/matlab/CMakeLists.txt b/matlab/CMakeLists.txt new file mode 100644 index 0000000..4f6b095 --- /dev/null +++ b/matlab/CMakeLists.txt @@ -0,0 +1,9 @@ +add_library( + matlab STATIC + libsvmread.c + libsvmwrite.c + linear_model_matlab.c + linear_model_matlab.h + predict.c + train.c +) \ No newline at end of file