Skip to content

Commit

Permalink
Fix c++11 detection issue on windows. Fix ilmbase DLL export warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
meshula authored and nickrasmussen committed Aug 8, 2018
1 parent 99ecfca commit 7376f9b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
3 changes: 2 additions & 1 deletion IlmBase/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@ ENDIF ()

IF (FORCE_CXX03)
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define ILMBASE_FORCE_CXX03 1\n" )
ELSE ()
ELIF (NOT WIN32)
# really only care about c++11 right now for the threading bits, but this can be changed to 14
# when needed...
# Note that the __cplusplus check is not valid under MSVC
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#if __cplusplus < 201103L\n# error \"Modern C++ 11/14 not enabled but force cxx03 not set\"\n#endif\n" )
ENDIF ()

Expand Down
18 changes: 9 additions & 9 deletions IlmBase/Iex/IexBaseExc.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ class BaseExc: public std::string, public std::exception
// class derived directly or indirectly from BaseExc:
//-----------------------------------------------------

#define DEFINE_EXC_EXP(exp, name, base) \
class exp name: public base \
{ \
public: \
name() throw(): base (0) {} \
name (const char* text) throw(): base (text) {} \
name (const std::string &text) throw(): base (text) {} \
name (std::stringstream &text) throw(): base (text) {} \
~name() throw() { } \
#define DEFINE_EXC_EXP(exp, name, base) \
class name: public base \
{ \
public: \
exp name() throw(): base (0) {} \
exp name (const char* text) throw(): base (text) {} \
exp name (const std::string &text) throw(): base (text) {} \
exp name (std::stringstream &text) throw(): base (text) {} \
exp ~name() throw() { } \
};

// For backward compatibility.
Expand Down
10 changes: 5 additions & 5 deletions IlmBase/IlmThread/IlmThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ ILMTHREAD_INTERNAL_NAMESPACE_HEADER_ENTER
ILMTHREAD_EXPORT bool supportsThreads ();


class ILMTHREAD_EXPORT Thread
class Thread
{
public:

Thread ();
virtual ~Thread ();
ILMTHREAD_EXPORT Thread ();
ILMTHREAD_EXPORT virtual ~Thread ();

void start ();
virtual void run () = 0;
ILMTHREAD_EXPORT void start ();
ILMTHREAD_EXPORT virtual void run () = 0;

private:

Expand Down

0 comments on commit 7376f9b

Please sign in to comment.