Commit a72920a0 authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Resolve "Windows DLL support"

parent 4cc9c6f7
......@@ -105,5 +105,5 @@ windows_intel_shared_testing:
- git clone https://github.com/lefebvre/googletest googletest
- mkdir build
- cd build
- cmake -DTPL_LAPACK_LIBRARIES=c:/vendors/intel/lapack/3.5.0/lib/lapack.lib -DTPL_BLAS_LIBRARIES=c:/vendors/intel/lapack/3.5.0/lib/blas.lib -DBUILDNAME=Windows-Intel-15-Release-%CI_BUILD_REF_NAME% -DCMAKE_C_COMPILER=icl -DCMAKE_CXX_COMPILER=icl -DCMAKE_BUILD_TYPE=RELEASE -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_radixdl=ON -Dradix_ENABLE_radixcore=ON -G "NMake Makefiles" ..
- cmake -DTPL_LAPACK_LIBRARIES=c:/vendors/intel/lapack/3.5.0/lib/lapack.lib -DTPL_BLAS_LIBRARIES=c:/vendors/intel/lapack/3.5.0/lib/blas.lib -DBUILDNAME=Windows-Intel-15-Release-%CI_BUILD_REF_NAME% -DCMAKE_C_COMPILER=icl -DCMAKE_CXX_COMPILER=icl -DCMAKE_BUILD_TYPE=RELEASE -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_radixdl=ON -Dradix_ENABLE_radixcore=ON -Dradix_ENABLE_radixams=ON -Dradix_ENABLE_radixalgorithm=ON -Dradix_ENABLE_radixmath=ON -Dradix_ENABLE_radixio=ON -Dradix_ENABLE_radixpara=ON -G "NMake Makefiles" ..
- ctest -D ExperimentalStart -D ExperimentalBuild -D ExperimentalTest -D ExperimentalSubmit
TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
SUBPACKAGES_DIRS_CLASSIFICATIONS_OPTREQS
bug radixbug SS OPTIONAL
core radixcore SS OPTIONAL
dl radixdl SS OPTIONAL
core radixcore SS OPTIONAL
pattern radixpattern SS OPTIONAL
algorithm radixalgorithm SS OPTIONAL
para radixpara SS OPTIONAL
......
TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
LIB_REQUIRED_PACKAGES
LIB_REQUIRED_PACKAGES radixdl
LIB_OPTIONAL_TPLS
TEST_REQUIRED_PACKAGES testframework
)
......
......@@ -3,6 +3,7 @@
#include <utility> // swap
#include <algorithm>
#include <radixbug/bug.hh>
#include "radixdl/visibility.hh"
namespace radix
{
......@@ -14,7 +15,7 @@ struct ordering_dummy_struct
template<typename list_type
, typename compare_type>
std::vector<size_t> sort_permutation(const list_type& data
std::vector<size_t> RADIX_PUBLIC sort_permutation(const list_type& data
, compare_type& comparator)
{
// create list of indices the size of the incoming data
......@@ -35,7 +36,7 @@ std::vector<size_t> sort_permutation(const list_type& data
template <typename list_type>
void apply_permutation(list_type& data
void RADIX_PUBLIC apply_permutation(list_type& data
, const std::vector<size_t>& order)
{
std::vector<bool> done(data.size(), false);
......
TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
LIB_REQUIRED_PACKAGES radixbug
LIB_REQUIRED_PACKAGES radixdl radixbug
LIB_OPTIONAL_PACKAGES
TEST_REQUIRED_PACKAGES testframework
TEST_OPTIONAL_PACKAGES
......
......@@ -8,10 +8,12 @@
#include <vector>
#include <ostream>
#include "radixdl/visibility.hh"
namespace radix
{
class CommandLine
class RADIX_PUBLIC CommandLine
{
public:
CommandLine(int argc, char ** argv);
......
TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
LIB_REQUIRED_PACKAGES
LIB_REQUIRED_PACKAGES radixdl
LIB_OPTIONAL_PACKAGES
TEST_REQUIRED_PACKAGES testframework
TEST_OPTIONAL_PACKAGES
......
......@@ -13,71 +13,73 @@
#include <type_traits>
#include <vector>
#include "radixdl/visibility.hh"
namespace radix
{
/**
* Convert a string to lowercase
* @param the string to be converted
*/
std::string string_tolower( const std::string& data );
std::string RADIX_PUBLIC string_tolower( const std::string& data );
/**
* Convert a string to uppercase
* @param the string to be converted
*/
std::string string_toupper( const std::string& data );
std::string RADIX_PUBLIC string_toupper( const std::string& data );
/**
* trim a leading and trailing whitespace
* @param the string to be converted
*/
std::string trim_string( const std::string& data );
std::string RADIX_PUBLIC trim_string( const std::string& data );
/**
* @brief Remove double- and single- quotes from the string
*/
std::string strip_quotes( const std::string& src );
std::string RADIX_PUBLIC strip_quotes( const std::string& src );
/**
* @brief Convert something to a string.
*/
template <typename T>
std::string to_string( const T& x, int prec = 6 );
std::string RADIX_PUBLIC to_string( const T& x, int prec = 6 );
/**
* @brief Convert something from a string using stream idioms.
*/
template <typename T>
T from_string( const std::string& val, const T& defVal );
T RADIX_PUBLIC from_string( const std::string& val, const T& defVal );
/**
* @brief Join something like a vector to a single string with delimiter
*/
template <typename T>
std::string join( const std::string& delim, const T& x );
std::string RADIX_PUBLIC join( const std::string& delim, const T& x );
/**
* @brief Split a string into pieces using a delimiter
*/
std::vector<std::string> split_string( const std::string& delim,
std::vector<std::string> RADIX_PUBLIC split_string( const std::string& delim,
const std::string& word );
/**
* @brief Find all instances and replace them
*/
std::string find_and_replace( const std::string& str,
std::string RADIX_PUBLIC find_and_replace( const std::string& str,
const std::string& find,
const std::string& replace );
/**
* @brief remove a particular substring (multiple times) from a target string
*/
std::string remove_substring( const char* msg, const char* sub );
std::string RADIX_PUBLIC remove_substring( const char* msg, const char* sub );
/**
* @brief remove extra whitespace (\t-->' ', \n-->' ', ' '-->' ')
*/
std::string remove_extra_whitespace( const std::string& str );
std::string RADIX_PUBLIC remove_extra_whitespace( const std::string& str );
} // namespace radix
......
......@@ -12,6 +12,8 @@
#include <string>
#include <vector>
#include "radixdl/visibility.hh"
namespace radix
{
......@@ -27,7 +29,7 @@ namespace radix
* <li> "t" - open in text mode </li>
* @return <b>FILE*</b> nullptr on error
*/
FILE* pipe_open( const std::string& command, const std::string& mode = "r" );
FILE* RADIX_PUBLIC pipe_open( const std::string& command, const std::string& mode = "r" );
/**
* @brief Provides platform independent pclose call
......@@ -36,39 +38,39 @@ FILE* pipe_open( const std::string& command, const std::string& mode = "r" );
* @param pipe <b>FILE*</b> stream to close
* @return process return code
*/
int pipe_close( FILE* pipe );
int RADIX_PUBLIC pipe_close( FILE* pipe );
/**
* @brief Sets the environment variable {@code var} to the value
* @param var <b>std::string</b>
* @param value <b> std::string</b>
*/
void set_env( const std::string& var, const std::string& value );
void RADIX_PUBLIC set_env( const std::string& var, const std::string& value );
/**
* @brief Retrieve the environment variable {@code var}
* @param var <b>std::string</b>
* @return <b>std::string</b>
*/
std::string env( const std::string& var );
std::string RADIX_PUBLIC env( const std::string& var );
/**
* @brief Get hostname of this computer
*/
std::string computer_name();
std::string RADIX_PUBLIC computer_name();
/**
* @brief Get the separator character
* Useful for abstracting platform differences
* @return <b>char</b>
*/
char separator_char( char forceSep = ' ' );
char RADIX_PUBLIC separator_char( char forceSep = ' ' );
/**
* @brief Retrieves the current working directory
* @return <b>std::string</b>
*/
std::string current_dir();
std::string RADIX_PUBLIC current_dir();
/**
* @brief Cross-platform, non-QT path listing with globs
......@@ -80,7 +82,7 @@ std::string current_dir();
* @param append <b>bool</b> whether to append to existing paths (default=false)
* @return <b>bool</b> - false if no matching paths
*/
bool get_paths( const std::string& spec,
bool RADIX_PUBLIC get_paths( const std::string& spec,
std::vector<std::string>& paths,
bool append = false );
......@@ -89,20 +91,20 @@ bool get_paths( const std::string& spec,
* @param path <b>std::vector<std::string></b> resultant paths
* @return <b>bool</b> - false if no matching paths
*/
bool expand_paths( std::vector<std::string>& paths );
bool RADIX_PUBLIC expand_paths( std::vector<std::string>& paths );
/**
* @brief expand the input path via expandPaths
* @brief expand the input path via expand_paths
* @param path <b>std::string</b> input/output path
* @return <b>bool</b> - false if no matching path
*/
bool expand_path( std::string& path );
bool RADIX_PUBLIC expand_path( std::string& path );
/**
* @brief Retrieves the current working directory's name
* @return <b>std::string</b>
*/
std::string current_dirname();
std::string RADIX_PUBLIC current_dirname();
/**
* @brief designed to behave identical to unix util dirname
......@@ -110,7 +112,7 @@ std::string current_dirname();
* @return <b>std::string</b> file system path to the directory containing
* the last file/directory listed
*/
std::string dirname( const std::string& path, char forceSep = ' ' );
std::string RADIX_PUBLIC dirname( const std::string& path, char forceSep = ' ' );
/**
* @brief designed to behave identical to unix util basename
......@@ -118,7 +120,7 @@ std::string dirname( const std::string& path, char forceSep = ' ' );
* @return <b>std::string</b> file system name of the directory containing
* the last file/directory listed
*/
std::string basename( const std::string& path,
std::string RADIX_PUBLIC basename( const std::string& path,
bool removeExtension = false,
char forceSep = ' ' );
......@@ -129,7 +131,7 @@ std::string basename( const std::string& path,
* @param path <b>std::string</b> file system path
* @return <b>std::string</b> extension or empty
*/
std::string file_extension( const std::string& path );
std::string RADIX_PUBLIC file_extension( const std::string& path );
/**
* @brief Changes the current working directory to the specified directory
......@@ -142,40 +144,40 @@ std::string file_extension( const std::string& path );
* @param directory <b>std::string</b>
* @return bool
*/
bool set_current_dir( const std::string& directory );
bool RADIX_PUBLIC set_current_dir( const std::string& directory );
/**
* @brief Does this path exist?
*/
bool path_exists( const std::string& path );
bool RADIX_PUBLIC path_exists( const std::string& path );
/**
* @brief Does this file exist?
*/
bool file_exists( const std::string& file );
bool RADIX_PUBLIC file_exists( const std::string& file );
/**
* @brief Does this directory exist?
*/
bool dir_exists( const std::string& directory );
bool RADIX_PUBLIC dir_exists( const std::string& directory );
/**
* @brief Create a directory
* @return true if success
*/
bool make_dir( const std::string& path );
bool RADIX_PUBLIC make_dir( const std::string& path );
/**
* @brief Remove an empty directory
* @return true if success
*/
bool remove_dir( const std::string& path );
bool RADIX_PUBLIC remove_dir( const std::string& path );
/**
* @brief Remove a single file
* @return true if success
*/
bool remove_file( const std::string& path );
bool RADIX_PUBLIC remove_file( const std::string& path );
} // namespace radix
......
......@@ -5,7 +5,7 @@
#define RADIX_PUBLIC __declspec(dllexport)
#define RADIX_LOCAL
#else
#define RADIX_PUBLIC __attribute__ ((visibility ("default")))
#define RADIX_LOCAL __attribute__ ((visibility ("hidden")))
#define RADIX_PUBLIC
#define RADIX_LOCAL __declspec(dllimport)
#endif
#endif /* RADIX_RADIXDL_VISIBILITY_HH_*/
......@@ -15,6 +15,8 @@
#include "radixmath/ray.hh"
#include "radixmath/matrix.hh"
#include "radixmath/constants.hh"
#include "radixdl/visibility.hh"
namespace radix
{
......@@ -22,7 +24,7 @@ namespace radix
* @class AABB
* @brief Axis Aligned Bounding Box
*/
class AABB
class RADIX_PUBLIC AABB
{
public:
Real x0, x1, y0, y1, z0, z1;
......
TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
LIB_REQUIRED_PACKAGES radixmath radixbug
LIB_REQUIRED_PACKAGES radixmath radixdl radixbug
LIB_OPTIONAL_PACKAGES
TEST_REQUIRED_PACKAGES testframework
TEST_OPTIONAL_PACKAGES
......
......@@ -13,9 +13,10 @@
#include "radixmath/ray.hh"
#include "radixgeometry/aabb.hh"
#include "radixdl/visibility.hh"
namespace radix
{
class Grid
class RADIX_PUBLIC Grid
{
protected:
AABB mBounds;
......
......@@ -9,9 +9,13 @@
#define RADIX_RADIXGEOMETRY_INTERVAL_HH_
#include "radixmath/constants.hh"
#include "radixmath/point3d.hh"
#include "radixdl/visibility.hh"
#include <vector>
#include <string>
#include <utility>
namespace radix
{
enum IntervalCompare
......@@ -35,7 +39,7 @@ enum IntervalCompare
* @class Interval
* @brief represents a line segment and an identifier
*/
class Interval
class RADIX_PUBLIC Interval
{
// public members
public:
......
TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
LIB_REQUIRED_PACKAGES radixbug
LIB_REQUIRED_PACKAGES radixdl radixbug
LIB_OPTIONAL_PACKAGES
TEST_REQUIRED_PACKAGES testframework
TEST_OPTIONAL_PACKAGES
......
......@@ -2,6 +2,8 @@
#include "radixglls/vector.hh"
#include "radixglls/linalg.hh"
#include "radixdl/visibility.hh"
#pragma once
namespace radix
......@@ -23,7 +25,7 @@ struct IconEvaluationResult
double chi2_thresh; // chi2_thresh with dof=I
};
class GllsConstraintError : public std::logic_error
class RADIX_PUBLIC GllsConstraintError : public std::logic_error
{
public:
using std::logic_error::logic_error;
......@@ -37,7 +39,7 @@ public:
* inequality constraint, and the minimum chi-squared along each inequality
* constraint.
**/
class GllsModel
class RADIX_PUBLIC GllsModel
{
protected:
// data
......@@ -137,7 +139,7 @@ public:
*
* */
extern "C" {
void glls_fwrap(
void RADIX_PUBLIC glls_fwrap(
int * I, // number of datapoints
int * J, // number of unknown parameters
int * Re, // number of equality constraints
......
......@@ -2,10 +2,12 @@
#include <stdexcept> // std::runtime_error
#include "radixglls/vector.hh"
#include "radixdl/visibility.hh"
namespace radix
{
class LapackError : public std::runtime_error
class RADIX_PUBLIC LapackError : public std::runtime_error
{
protected:
int m_info; // the error code returned by lapack
......@@ -23,7 +25,7 @@ public:
};
class GllsMatrix
class RADIX_PUBLIC GllsMatrix
{
protected:
// basic matrix info
......@@ -73,7 +75,7 @@ public:
/** Uses LAPACK routines to invert a symmetric matrix or solve Ax = b. **/
class FactorizedMatrix : public GllsMatrix
class RADIX_PUBLIC FactorizedMatrix : public GllsMatrix
{
protected:
VectorDouble m_factorized; // factorized matrix stored col-major
......@@ -89,7 +91,7 @@ public:
/* Convert Fortran-style arrays to VectorDouble, etc */
VectorDouble f2vd(double arr[], int size);
void vd2f(const VectorDouble & vd, double arr[]);
VectorDouble RADIX_PUBLIC f2vd(double arr[], int size);
void RADIX_PUBLIC vd2f(const VectorDouble & vd, double arr[]);
}
TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
LIB_REQUIRED_PACKAGES radixmath
LIB_REQUIRED_PACKAGES radixdl radixmath
LIB_OPTIONAL_PACKAGES
TEST_REQUIRED_PACKAGES testframework
TEST_OPTIONAL_PACKAGES
......
......@@ -13,6 +13,8 @@
#include <memory>
#include <sstream>
#include "radixdl/visibility.hh"
namespace radix
{
......@@ -24,7 +26,7 @@ namespace radix
* Flags are designated with '-' prefix
* All non flag prefixed values are stored as arguments
*/
class CommandLine
class RADIX_PUBLIC CommandLine
{
public:
CommandLine(int argc, char ** argv);
......
......@@ -4,6 +4,8 @@
#include <string>
#include <vector>
#include "radixdl/visibility.hh"
namespace radix
{
......@@ -11,7 +13,7 @@ namespace radix
* @brief The CSVFile class
* @author Credit is due to http://stackoverflow.com/users/59557/quant-dev
*/
class CSVFile
class RADIX_PUBLIC CSVFile
{
private:
std::string mFile;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment