Merge branch 'cli_option' of https://github.com/xantares/mlpack into xantares-cli_option
This commit is contained in:
@@ -11,6 +11,7 @@ enable_cxx11()
|
||||
|
||||
# First, define all the compilation options.
|
||||
# We default to debugging mode for developers.
|
||||
option(BUILD_CLI_EXECUTABLES "Build command-line executables" ON)
|
||||
option(DEBUG "Compile with debugging information" ON)
|
||||
option(PROFILE "Compile with profiling information" ON)
|
||||
option(ARMA_EXTRA_DEBUG "Compile with extra Armadillo debugging symbols." OFF)
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
|
||||
macro (add_cli_executable name)
|
||||
if (BUILD_CLI_EXECUTABLES)
|
||||
add_executable(mlpack_${name}
|
||||
${name}_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_${name}
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_${name} RUNTIME DESTINATION bin)
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
# Recurse into each method mlpack provides.
|
||||
set(DIRS
|
||||
adaboost
|
||||
|
||||
@@ -16,10 +16,4 @@ endforeach()
|
||||
# the parent scope).
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mlpack_adaboost
|
||||
adaboost_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_adaboost
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_adaboost RUNTIME DESTINATION bin)
|
||||
add_cli_executable (adaboost)
|
||||
|
||||
@@ -17,10 +17,4 @@ endforeach()
|
||||
# the parent scope).
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mlpack_cf
|
||||
cf_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_cf
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_cf RUNTIME DESTINATION bin)
|
||||
add_cli_executable (cf)
|
||||
|
||||
@@ -16,10 +16,5 @@ endforeach()
|
||||
# the parent scope).
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mlpack_decision_stump
|
||||
decision_stump_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_decision_stump
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_decision_stump RUNTIME DESTINATION bin)
|
||||
add_cli_executable(decision_stump)
|
||||
|
||||
|
||||
@@ -19,12 +19,4 @@ endforeach()
|
||||
# append sources (with directory name) to list of all mlpack sources (used at the parent scope)
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
# executable
|
||||
add_executable(mlpack_det
|
||||
det_main.cpp
|
||||
)
|
||||
# link dependencies of executable
|
||||
target_link_libraries(mlpack_det
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_det RUNTIME DESTINATION bin)
|
||||
add_cli_executable(det)
|
||||
|
||||
@@ -21,10 +21,5 @@ endforeach()
|
||||
# the parent scope).
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mlpack_emst
|
||||
emst_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_emst
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_emst RUNTIME DESTINATION bin)
|
||||
add_cli_executable(emst)
|
||||
|
||||
|
||||
@@ -19,10 +19,6 @@ endforeach()
|
||||
# the parent scope).
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mlpack_fastmks
|
||||
fastmks_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_fastmks
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_fastmks RUNTIME DESTINATION bin)
|
||||
add_cli_executable(fastmks)
|
||||
|
||||
|
||||
|
||||
@@ -21,28 +21,6 @@ endforeach()
|
||||
# the parent scope).
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
# main executable, gmm
|
||||
add_executable(mlpack_gmm_train
|
||||
gmm_train_main.cpp
|
||||
)
|
||||
|
||||
# link dependencies of gmm
|
||||
target_link_libraries(mlpack_gmm_train
|
||||
mlpack
|
||||
)
|
||||
|
||||
add_executable(mlpack_gmm_generate
|
||||
gmm_generate_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_gmm_generate
|
||||
mlpack
|
||||
)
|
||||
|
||||
add_executable(mlpack_gmm_probability
|
||||
gmm_probability_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_gmm_probability
|
||||
mlpack
|
||||
)
|
||||
|
||||
install(TARGETS mlpack_gmm_train mlpack_gmm_generate mlpack_gmm_probability RUNTIME DESTINATION bin)
|
||||
add_cli_executable(gmm_train)
|
||||
add_cli_executable(gmm_generate)
|
||||
add_cli_executable(gmm_probability)
|
||||
|
||||
@@ -18,37 +18,8 @@ endforeach()
|
||||
# the parent scope).
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mlpack_hmm_train
|
||||
hmm_train_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_hmm_train
|
||||
mlpack
|
||||
)
|
||||
add_cli_executable(hmm_train)
|
||||
add_cli_executable(hmm_loglik)
|
||||
add_cli_executable(hmm_viterbi)
|
||||
add_cli_executable(hmm_generate)
|
||||
|
||||
add_executable(mlpack_hmm_loglik
|
||||
hmm_loglik_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_hmm_loglik
|
||||
mlpack
|
||||
)
|
||||
|
||||
add_executable(mlpack_hmm_viterbi
|
||||
hmm_viterbi_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_hmm_viterbi
|
||||
mlpack
|
||||
)
|
||||
|
||||
add_executable(mlpack_hmm_generate
|
||||
hmm_generate_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_hmm_generate
|
||||
mlpack
|
||||
)
|
||||
|
||||
install(TARGETS
|
||||
mlpack_hmm_train
|
||||
mlpack_hmm_loglik
|
||||
mlpack_hmm_viterbi
|
||||
mlpack_hmm_generate
|
||||
RUNTIME DESTINATION bin)
|
||||
|
||||
@@ -26,10 +26,5 @@ endforeach()
|
||||
# the parent scope).
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mlpack_hoeffding_tree
|
||||
hoeffding_tree_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_hoeffding_tree
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_hoeffding_tree RUNTIME DESTINATION bin)
|
||||
add_cli_executable(hoeffding_tree)
|
||||
|
||||
|
||||
@@ -16,10 +16,5 @@ set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_subdirectory(kernel_rules)
|
||||
|
||||
add_executable(mlpack_kernel_pca
|
||||
kernel_pca_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_kernel_pca
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_kernel_pca RUNTIME DESTINATION bin)
|
||||
add_cli_executable(kernel_pca)
|
||||
|
||||
|
||||
@@ -37,11 +37,4 @@ endforeach()
|
||||
# the parent scope).
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
# The main K-Means executable.
|
||||
add_executable(mlpack_kmeans
|
||||
kmeans_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_kmeans
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_kmeans RUNTIME DESTINATION bin)
|
||||
add_cli_executable(kmeans)
|
||||
|
||||
@@ -14,10 +14,4 @@ endforeach()
|
||||
# append sources (with directory name) to list of all mlpack sources (used at the parent scope)
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mlpack_lars
|
||||
lars_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_lars
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_lars RUNTIME DESTINATION bin)
|
||||
add_cli_executable(lars)
|
||||
|
||||
@@ -15,10 +15,5 @@ endforeach()
|
||||
# the parent scope)
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mlpack_linear_regression
|
||||
linear_regression_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_linear_regression
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_linear_regression RUNTIME DESTINATION bin)
|
||||
add_cli_executable(linear_regression)
|
||||
|
||||
|
||||
@@ -18,10 +18,5 @@ endforeach()
|
||||
# append sources (with directory name) to list of all mlpack sources (used at the parent scope)
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mlpack_local_coordinate_coding
|
||||
lcc_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_local_coordinate_coding
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_local_coordinate_coding RUNTIME DESTINATION bin)
|
||||
add_cli_executable(local_coordinate_coding)
|
||||
|
||||
|
||||
@@ -17,10 +17,5 @@ endforeach()
|
||||
# the parent scope)
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mlpack_logistic_regression
|
||||
logistic_regression_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_logistic_regression
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_logistic_regression RUNTIME DESTINATION bin)
|
||||
add_cli_executable(logistic_regression)
|
||||
|
||||
|
||||
@@ -17,10 +17,4 @@ set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
# The code to compute the approximate neighbor for the given query and reference
|
||||
# sets with p-stable LSH.
|
||||
add_executable(mlpack_lsh
|
||||
lsh_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_lsh
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_lsh RUNTIME DESTINATION bin)
|
||||
add_cli_executable(lsh)
|
||||
|
||||
@@ -14,11 +14,4 @@ endforeach()
|
||||
# the parent scope).
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
# The main K-Means executable.
|
||||
add_executable(mlpack_mean_shift
|
||||
mean_shift_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_mean_shift
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_mean_shift RUNTIME DESTINATION bin)
|
||||
add_cli_executable(mean_shift)
|
||||
|
||||
@@ -14,10 +14,5 @@ endforeach()
|
||||
# the parent scope).
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mvu
|
||||
mvu_main.cpp
|
||||
)
|
||||
target_link_libraries(mvu
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mvu RUNTIME DESTINATION bin)
|
||||
add_cli_executable(mvu)
|
||||
|
||||
|
||||
@@ -14,10 +14,5 @@ endforeach()
|
||||
# the parent scope).
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mlpack_nbc
|
||||
nbc_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_nbc
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_nbc RUNTIME DESTINATION bin)
|
||||
add_cli_executable(nbc)
|
||||
|
||||
|
||||
@@ -16,10 +16,4 @@ endforeach()
|
||||
# the parent scope).
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mlpack_nca
|
||||
nca_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_nca
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_nca RUNTIME DESTINATION bin)
|
||||
add_cli_executable (nca)
|
||||
|
||||
@@ -29,19 +29,9 @@ endforeach()
|
||||
# the parent scope).
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mlpack_knn
|
||||
allknn_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_knn
|
||||
mlpack
|
||||
)
|
||||
|
||||
add_executable(mlpack_kfn
|
||||
allkfn_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_kfn
|
||||
mlpack
|
||||
)
|
||||
# Add mlpack_knn and mlpack_kfn executables.
|
||||
add_cli_executable(knn)
|
||||
add_cli_executable(kfn)
|
||||
|
||||
install(TARGETS mlpack_knn mlpack_kfn RUNTIME DESTINATION bin)
|
||||
|
||||
|
||||
@@ -1,7 +1 @@
|
||||
add_executable(mlpack_nmf
|
||||
nmf_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_nmf
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_nmf RUNTIME DESTINATION bin)
|
||||
add_cli_executable(nmf)
|
||||
|
||||
@@ -14,10 +14,5 @@ endforeach()
|
||||
# the parent scope).
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mlpack_pca
|
||||
pca_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_pca
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_pca RUNTIME DESTINATION bin)
|
||||
add_cli_executable(pca)
|
||||
|
||||
|
||||
@@ -19,11 +19,4 @@ set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
add_subdirectory(initialization_methods)
|
||||
add_subdirectory(learning_policies)
|
||||
|
||||
add_executable(mlpack_perceptron
|
||||
perceptron_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_perceptron
|
||||
mlpack
|
||||
)
|
||||
|
||||
install(TARGETS mlpack_perceptron RUNTIME DESTINATION bin)
|
||||
add_cli_executable(perceptron)
|
||||
|
||||
@@ -13,10 +13,5 @@ endforeach()
|
||||
# append sources (with directory name) to list of all mlpack sources (used at the parent scope)
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mlpack_radical
|
||||
radical_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_radical
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_radical RUNTIME DESTINATION bin)
|
||||
add_cli_executable(radical)
|
||||
|
||||
|
||||
@@ -20,10 +20,5 @@ endforeach()
|
||||
# the parent scope).
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mlpack_range_search
|
||||
range_search_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_range_search
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_range_search RUNTIME DESTINATION bin)
|
||||
add_cli_executable(range_search)
|
||||
|
||||
|
||||
@@ -36,10 +36,4 @@ set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
# The code to compute the rank-approximate neighbor
|
||||
# for the given query and reference sets
|
||||
add_executable(mlpack_allkrann
|
||||
allkrann_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_allkrann
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_allkrann RUNTIME DESTINATION bin)
|
||||
add_cli_executable(allkrann)
|
||||
|
||||
@@ -16,10 +16,4 @@ endforeach()
|
||||
# the parent scope).
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mlpack_softmax_regression
|
||||
softmax_regression_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_softmax_regression
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_softmax_regression RUNTIME DESTINATION bin)
|
||||
add_cli_executable(softmax_regression)
|
||||
|
||||
@@ -18,10 +18,5 @@ endforeach()
|
||||
# append sources (with directory name) to list of all mlpack sources (used at the parent scope)
|
||||
set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
|
||||
|
||||
add_executable(mlpack_sparse_coding
|
||||
sparse_coding_main.cpp
|
||||
)
|
||||
target_link_libraries(mlpack_sparse_coding
|
||||
mlpack
|
||||
)
|
||||
install(TARGETS mlpack_sparse_coding RUNTIME DESTINATION bin)
|
||||
add_cli_executable(sparse_coding)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user