Skip to content

Commit a284577

Browse files
committed
Build csp core and csp engine as DLLs
Signed-off-by: Adam Glustein <[email protected]>
1 parent 512a6fd commit a284577

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+100
-79
lines changed

cpp/csp/core/BasicAllocator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace csp
1515
{
1616

1717
// Extremely basic non-thread safe fixed-size allocator
18-
class CSPIMPL_EXPORT BasicAllocator
18+
class CSPCORE_EXPORT BasicAllocator
1919
{
2020
public:
2121
//elemsize is size of a single alloc, blockSize is number of elements to

cpp/csp/core/CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include(GenerateExportHeader)
2+
13
set(CORE_PUBLIC_HEADERS
24
BasicAllocator.h
35
Config.h.in
@@ -25,12 +27,17 @@ set(CORE_SOURCE_FILES
2527

2628
configure_file(Config.h.in ${CMAKE_CURRENT_BINARY_DIR}/cpp/csp/core/Config.h)
2729

28-
add_library(csp_core STATIC ${CORE_SOURCE_FILES})
30+
add_library(csp_core SHARED ${CORE_SOURCE_FILES})
31+
generate_export_header(csp_core
32+
BASE_NAME cspcore
33+
EXPORT_MACRO_NAME CSPCORE_EXPORT
34+
)
2935
set_target_properties(csp_core PROPERTIES PUBLIC_HEADER "${CORE_PUBLIC_HEADERS}")
3036

3137
install(TARGETS csp_core
3238
PUBLIC_HEADER DESTINATION include/csp/core
3339
RUNTIME DESTINATION ${CSP_RUNTIME_INSTALL_SUBDIR}
3440
LIBRARY DESTINATION lib/
3541
)
36-
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cpp/csp/core/Config.h DESTINATION include/csp/core)
42+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cpp/csp/core/Config.h DESTINATION include/csp/core)
43+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cspcore_export.h DESTINATION include/csp/core)

cpp/csp/core/DynamicBitSet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace csp
99
{
1010

1111
template<typename NodeT = uint64_t, typename IndexT = int32_t>
12-
class CSPIMPL_EXPORT DynamicBitSet
12+
class CSPCORE_EXPORT DynamicBitSet
1313
{
1414

1515
public:

cpp/csp/core/Enum.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ bool UnknownOnInvalidValue(long) { return false; }
7373

7474
START_PACKED
7575
template<typename EnumTraits>
76-
struct CSPTYPESIMPL_EXPORT Enum : public EnumTraits
76+
struct CSPCORE_EXPORT Enum : public EnumTraits
7777
{
7878
using EnumV = typename EnumTraits::_enum;
7979
using Mapping = std::vector<std::string>;

cpp/csp/core/EnumBitSet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace csp
1414
//Utility class to hold enums as a bitmask ( where enum values are incremental from 0 )
1515
//enum must have a NUM_TYPES entry for number of entries
1616
template< typename EnumT >
17-
class CSPTYPESIMPL_EXPORT EnumBitSet
17+
class CSPCORE_EXPORT EnumBitSet
1818
{
1919
using value_type = uint64_t;
2020

cpp/csp/core/Generator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace csp
88
{
99
template< typename V, typename ...Args >
10-
class CSPIMPL_EXPORT Generator
10+
class CSPCORE_EXPORT Generator
1111
{
1212
public:
1313
using Ptr = std::shared_ptr<Generator<V, Args...>>;

cpp/csp/core/Platform.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
#include <time.h>
66

77
// cmake autogenerated export files
8+
#include <csp/core/cspcore_export.h>
9+
#include <csp/engine/cspengine_export.h>
10+
#include <csp/engine/csptypes_export.h>
11+
812
#include <csp/python/cspimpl_export.h>
913
#include <csp/python/csptypesimpl_export.h>
1014

cpp/csp/core/QueueWaiter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace csp
1414

1515
class TimeDelta;
1616

17-
class CSPIMPL_EXPORT QueueWaiter
17+
class CSPCORE_EXPORT QueueWaiter
1818
{
1919
public:
2020
QueueWaiter() : m_eventsPending( false )

cpp/csp/core/TaggedPointerUnion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ struct IndexOf<T, TypeList<TOther, Ts...> >
2626

2727

2828
template<typename... Ts>
29-
class CSPIMPL_EXPORT TaggedPointerUnion
29+
class CSPCORE_EXPORT TaggedPointerUnion
3030
{
3131
public:
3232
static inline constexpr size_t NUM_TAGS = sizeof...(Ts);

cpp/csp/core/Time.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const int64_t NANOS_PER_SECOND = 1000000000;
2121
const int64_t SECONDS_PER_DAY = 86400;
2222
const int64_t NANOS_PER_DAY = NANOS_PER_SECOND * SECONDS_PER_DAY;
2323

24-
class CSPTYPESIMPL_EXPORT TimeDelta
24+
class CSPCORE_EXPORT TimeDelta
2525
{
2626
public:
2727
constexpr TimeDelta() : TimeDelta( TimeDelta::NONE() ) {}
@@ -165,7 +165,7 @@ inline std::ostream & operator <<( std::ostream &os, const TimeDelta & d )
165165
return os;
166166
}
167167

168-
class CSPTYPESIMPL_EXPORT Date
168+
class CSPCORE_EXPORT Date
169169
{
170170
public:
171171
Date() : Date( NONE() ) {}
@@ -316,7 +316,7 @@ inline std::ostream & operator <<( std::ostream &os, const Date & d )
316316
return os;
317317
}
318318

319-
class CSPTYPESIMPL_EXPORT Time
319+
class CSPCORE_EXPORT Time
320320
{
321321
public:
322322
Time() : Time( -1 ) {} //NONE
@@ -446,7 +446,7 @@ inline std::ostream & operator <<( std::ostream &os, const Time & t )
446446

447447
// Time is internally stored as an int64_t nanoseconds since 1970.
448448
// All DateTime objects are stored as UTC and should be treated as such
449-
class CSPTYPESIMPL_EXPORT DateTime
449+
class CSPCORE_EXPORT DateTime
450450
{
451451
public:
452452
DateTime() : DateTime( DateTime::NONE() ) {}
@@ -597,7 +597,7 @@ inline std::ostream & operator <<( std::ostream &os, const DateTime & dt )
597597
//Helper class to extract day/month/year/etc info from raw timestamp
598598
//ie DateTimeEx dte( existingDt )
599599
//dte.day, etc etc
600-
class CSPTYPESIMPL_EXPORT DateTimeEx : public DateTime
600+
class CSPCORE_EXPORT DateTimeEx : public DateTime
601601
{
602602
public:
603603
DateTimeEx( const DateTime & dt );

0 commit comments

Comments
 (0)