Skip to content

Commit

Permalink
COMP: general windows build fixes
Browse files Browse the repository at this point in the history
- remove `countH` debugging variable. does not make sense to make a
  debug variable shared across compilation units.
- more export fix-ups
  • Loading branch information
ihnorton committed Feb 20, 2018
1 parent d8269d6 commit a8b6efe
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 25 deletions.
3 changes: 2 additions & 1 deletion UKFTractography/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ set(MODULE_INCLUDE_DIRECTORIES
set(MODULE_TARGET_LIBRARIES
${ITK_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${TEEM_LIB} ${ZLIB_LIBRARIES}
${TEEM_LIB}
${ZLIB_LIBRARIES}
${VTK_LIBRARIES}
${Eigen_LIBRARIES}
UKFBase
Expand Down
4 changes: 1 addition & 3 deletions UKFTractography/UKFTractography.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@
#include "vtkNew.h"
#include "vtkPolyData.h"

extern int countH;

extern "C" {

UKFCLILIB_EXPORTS int ModuleEntryPoint(int argc, char **argv)
int ModuleEntryPoint(int argc, char **argv)
{
UKFSettings ukf_settings;

Expand Down Expand Up @@ -71,7 +70,6 @@ UKFCLILIB_EXPORTS int ModuleEntryPoint(int argc, char **argv)

// Run the tractography.
writeStatus = tract->Run();
std::cout << "H count = " << countH << std::endl;
}
catch( itk::ExceptionObject & err )
{
Expand Down
3 changes: 2 additions & 1 deletion common/BRAINSThreadControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <itksys/SystemTools.hxx>
#include <sstream>
#include "itkMultiThreader.h"
#include "ukf_exports.h"

namespace BRAINSUtils
{
Expand All @@ -24,7 +25,7 @@ namespace BRAINSUtils
* the behavior of all other programs
* in slicer.
*/
class StackPushITKDefaultNumberOfThreads
class UKFBASELIB_EXPORTS StackPushITKDefaultNumberOfThreads
{
public:
StackPushITKDefaultNumberOfThreads(const int desiredCount);
Expand Down
13 changes: 1 addition & 12 deletions common/ukf_exports.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,4 @@
#define UKFBASELIB_EXPORTS
#endif

#if defined(WIN32) && !defined(UKF_STATIC)
#if defined(UKFCLI_EXPORTS)
#define UKFCLILIB_EXPORTS __declspec( dllexport )
#else
#define UKFCLILIB_EXPORTS __declspec( dllimport )
#endif
#else
#define UKFCLILIB_EXPORTS
#endif


#endif
#endif
2 changes: 1 addition & 1 deletion common/ukf_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ TOut ConvertVector(const TIn &in)
return out;
}

#endif // __ukf_type_h__
#endif // __ukf_type_h__
2 changes: 1 addition & 1 deletion ukf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ add_custom_target(_GEN_GITVER ALL
)

# dummy output so we can depend on it in the external macro, because CMake.
add_custom_command(OUTPUT ${UKF_GITVER_FILE}
add_custom_command(OUTPUT "${UKF_GITVER_FILE}"
DEPENDS _GEN_GITVER)

#-----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion ukf/cli.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void ukf_tell(const ukfPrecisionType & x, const std::string &name)
}
}; // anonymous namespace

int ukf_parse_cli(int argc, char** argv, UKFSettings& s)
UKFBASELIB_EXPORTS int ukf_parse_cli(int argc, char** argv, UKFSettings& s)
{
PARSE_ARGS ;

Expand Down
2 changes: 1 addition & 1 deletion ukf/cli.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "ukf_exports.h"
#include "tractography.h"

UKFCLILIB_EXPORTS int ukf_parse_cli(int argc, char** argv, UKFSettings& s);
UKFBASELIB_EXPORTS int ukf_parse_cli(int argc, char** argv, UKFSettings& s);
2 changes: 0 additions & 2 deletions ukf/filter_Full2T_FW.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ void Full2T_FW::F(ukfMatrixType& X) const
}
}

extern unsigned int countH;
void Full2T_FW::H(const ukfMatrixType& X,
ukfMatrixType& Y) const
{
countH++;
assert(_signal_dim > 0);
assert(X.rows() == static_cast<unsigned int>(_state_dim) &&
(X.cols() == static_cast<unsigned int>(2 * _state_dim + 1) ||
Expand Down
1 change: 1 addition & 0 deletions ukf/filter_Full2T_FW.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define FULL2T_FW_H__

#include "filter_model.h"

/**
* \struct Full2T_FW
* \brief Full 2-Tensor model with free water
Expand Down
1 change: 1 addition & 0 deletions ukf/filter_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <cassert>
#include <vector>
#include <iostream>

#include "linalg.h"
#include "ISignalData.h"
#include "unscented_kalman_filter.h"
Expand Down
2 changes: 0 additions & 2 deletions ukf/tractography.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
// TODO implement this switch
#include "config.h"

UKFBASELIB_EXPORTS unsigned int countH=0;

// Local forward declaration of callback type.
ITK_THREAD_RETURN_TYPE ThreadCallback(void *arg);

Expand Down

0 comments on commit a8b6efe

Please sign in to comment.