Skip to content

Commit

Permalink
Move a few GPL files to separate gpl folder
Browse files Browse the repository at this point in the history
  • Loading branch information
karlnapf committed Mar 8, 2017
1 parent 9cbd1a1 commit d649767
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Expand Up @@ -342,6 +342,7 @@ OPTION(ENABLE_PYTHON_DEBUG "Enable Python-interface-debugging with CTest" OFF)
OPTION(LICENSE_GPL_SHOGUN "Include GPL codes of Shogun (non-BSD compatible) in build" ON)
IF (LICENSE_GPL_SHOGUN)
SET(USE_GPL_SHOGUN 1)
SET(SHOGUN_GPL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/gpl)
ELSE()
SET(USE_GPL_SHOGUN 0)
ENDIF()
Expand Down
Expand Up @@ -10,7 +10,6 @@


#include <shogun/multiclass/MulticlassLogisticRegression.h>
#ifdef USE_GPL_SHOGUN
#include <shogun/multiclass/MulticlassOneVsRestStrategy.h>
#include <shogun/io/SGIO.h>
#include <shogun/mathematics/Math.h>
Expand Down Expand Up @@ -101,4 +100,3 @@ bool CMulticlassLogisticRegression::train_machine(CFeatures* data)
}
return true;
}
#endif //USE_GPL_SHOGUN
Expand Up @@ -11,7 +11,6 @@
#ifndef MULTICLASSLOGISTICREGRESSION_H_
#define MULTICLASSLOGISTICREGRESSION_H_
#include <shogun/lib/config.h>
#ifdef USE_GPL_SHOGUN
#include <shogun/lib/common.h>
#include <shogun/features/DotFeatures.h>
#include <shogun/machine/LinearMulticlassMachine.h>
Expand Down Expand Up @@ -111,5 +110,4 @@ class CMulticlassLogisticRegression : public CLinearMulticlassMachine

};
}
#endif //USE_GPL_SHOGUN
#endif
Expand Up @@ -35,7 +35,6 @@
#include <algorithm>

using namespace shogun;
#ifdef USE_GPL_SHOGUN
CNLOPTMinimizer::CNLOPTMinimizer()
:FirstOrderMinimizer()
{
Expand Down Expand Up @@ -284,4 +283,3 @@ void CNLOPTMinimizer::init_minimization()
}
#endif

#endif //USE_GPL_SHOGUN
Expand Up @@ -34,7 +34,6 @@
#define CNLOPTMINIMIZER_H
#include <shogun/optimization/FirstOrderMinimizer.h>

#ifdef USE_GPL_SHOGUN
#ifdef HAVE_NLOPT
#include <shogun/optimization/nloptcommon.h>
#endif
Expand Down Expand Up @@ -136,6 +135,5 @@ class CNLOPTMinimizer: public FirstOrderMinimizer
};

}
#endif //USE_GPL_SHOGUN
#endif /* CNLOPTMINIMIZER_H */

2 changes: 2 additions & 0 deletions src/interfaces/modular/Multiclass.i
Expand Up @@ -53,7 +53,9 @@
%rename(ECOCLLBDecoder) CECOCLLBDecoder;

%rename(MulticlassTreeGuidedLogisticRegression) CMulticlassTreeGuidedLogisticRegression;
#ifdef USE_GPL_SHOGUN
%rename(MulticlassLogisticRegression) CMulticlassLogisticRegression;
#endif //USE_GPL_SHOGUN
%rename(MulticlassLibLinear) CMulticlassLibLinear;
%rename(MulticlassOCAS) CMulticlassOCAS;
%rename(MulticlassSVM) CMulticlassSVM;
Expand Down
2 changes: 2 additions & 0 deletions src/interfaces/modular/Multiclass_includes.i
Expand Up @@ -47,7 +47,9 @@
#include <shogun/multiclass/ecoc/ECOCLLBDecoder.h>

#include <shogun/multiclass/MulticlassTreeGuidedLogisticRegression.h>
#ifdef USE_GPL_SHOGUN
#include <shogun/multiclass/MulticlassLogisticRegression.h>
#endif //USE_GPL_SHOGUN
#include <shogun/multiclass/MulticlassLibLinear.h>
#include <shogun/multiclass/MulticlassOCAS.h>
#include <shogun/multiclass/MulticlassSVM.h>
Expand Down
5 changes: 5 additions & 0 deletions src/shogun/CMakeLists.txt
Expand Up @@ -98,6 +98,11 @@ target_include_directories(shogun PUBLIC
$<INSTALL_INTERFACE:include/shogun>
)

get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
foreach(dir ${dirs})
message(STATUS "dir='${dir}'")
endforeach()

# create shogun_deps meta target to store all the
# dependencies of shogun itself, this is used in unit test
add_library(shogun_deps INTERFACE)
Expand Down
Expand Up @@ -63,7 +63,9 @@
#include <shogun/machine/gp/SoftMaxLikelihood.h>
#include <shogun/optimization/lbfgs/LBFGSMinimizer.h>

#ifdef USE_GPL_SHOGUN
#include <shogun/optimization/NLOPTMinimizer.h>
#endif

using namespace shogun;

Expand Down

0 comments on commit d649767

Please sign in to comment.