diff --git a/CMakeLists.txt b/CMakeLists.txt index 4540350f8e..301f41b453 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -197,13 +197,23 @@ else( WIN32 ) # Apple AND Linux message( STATUS "Configuring BitShares on OS X" ) set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -stdlib=libc++ -Wall" ) else( APPLE ) - # Linux Specific Options Here - message( STATUS "Configuring BitShares on Linux" ) + if ( "${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD" ) + # OpenBSD Specific Options + message( STATUS "Configuring BitShares on OpenBSD" ) + if ( "${BOOST_ROOT}" STREQUAL "" ) + # linking with system boost on OBSD is dynamic + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_TEST_DYN_LINK" ) + endif() + else() + # Linux Specific Options Here + message( STATUS "Configuring BitShares on Linux" ) + set( rt_library rt ) + endif() + # Common Linux & OpenBSD Options set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wall" ) if(USE_PROFILER) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg" ) endif( USE_PROFILER ) - set( rt_library rt ) set( pthread_library pthread) if ( NOT DEFINED crypto_library ) # I'm not sure why this is here, I guess someone has openssl and can't detect it with find_package()? diff --git a/libraries/net/node.cpp b/libraries/net/node.cpp index fc2a086ee2..d2f52fd919 100644 --- a/libraries/net/node.cpp +++ b/libraries/net/node.cpp @@ -1342,6 +1342,8 @@ namespace graphene { namespace net { namespace detail { user_data["fc_git_revision_unix_timestamp"] = fc::git_revision_unix_timestamp; #if defined( __APPLE__ ) user_data["platform"] = "osx"; +#elif defined( __OpenBSD__ ) + user_data["platform"] = "obsd"; #elif defined( __linux__ ) user_data["platform"] = "linux"; #elif defined( _MSC_VER ) diff --git a/tests/cli/main.cpp b/tests/cli/main.cpp index 13510a4c8d..7b606382b1 100644 --- a/tests/cli/main.cpp +++ b/tests/cli/main.cpp @@ -49,9 +49,10 @@ #include #include #else + #include #include + #include #include - #include #endif #include diff --git a/tests/performance/performance_tests.cpp b/tests/performance/performance_tests.cpp index ae8a94fd77..ea7f941e7d 100644 --- a/tests/performance/performance_tests.cpp +++ b/tests/performance/performance_tests.cpp @@ -21,6 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + +#if defined(BOOST_TEST_DYN_LINK) + #define BOOST_TEST_MAIN +#endif + #include #include