cmake scripts: fix SunPro C++ on linux

This commit is contained in:
Marian Krivos 2009-03-16 22:52:54 +00:00
parent 5e72766ea6
commit 47cf15d198
3 changed files with 15 additions and 1 deletions

View File

@ -33,6 +33,7 @@ include_directories( CppUnit/include Foundation/include XML/include Net/include
include(CheckTypeSize)
include(FindCygwin)
include(FindOpenSSL)
include(CMakeDetermineCompilerId)
include(contrib/cmake/FindMySQL.cmake)
include(contrib/cmake/FindAPR.cmake)
@ -47,7 +48,7 @@ endif(CMAKE_SYSTEM MATCHES "Windows")
if (CMAKE_SYSTEM MATCHES "Linux")
add_definitions( -DPOCO_OS_FAMILY_UNIX )
# Standard 'must be' defines
add_definitions( -D_XOPEN_SOURCE=500 -D_REENTRANT -D_THREAD_SAFE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 )
add_definitions( -D_XOPEN_SOURCE=500 -D_REENTRANT -D_THREAD_SAFE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64)
set(SYSLIBS pthread dl rt)
endif(CMAKE_SYSTEM MATCHES "Linux")
@ -69,6 +70,11 @@ if (CMAKE_COMPILER_IS_CYGWIN)
# add_definitions(-DWC_NO_BEST_FIT_CHARS=0x400)
endif (CMAKE_COMPILER_IS_CYGWIN)
# SunPro C++
if (${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
add_definitions( -D_BSD_SOURCE -library=stlport4)
endif (${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
add_subdirectory(CppUnit)
add_subdirectory(Foundation)
add_subdirectory(XML)

View File

@ -186,6 +186,9 @@ set_target_properties( ${LIBNAME}
PROPERTIES COMPILE_FLAGS ${DEBUG_CXX_FLAGS}
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
if (${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
set_target_properties( ${LIBNAME} PROPERTIES LINK_FLAGS "-library=stlport4")
endif (${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
target_link_libraries( ${LIBNAME} ${SYSLIBS})
add_library( ${LIBNAMED} ${LIB_MODE} ${SRCS} )
@ -193,6 +196,9 @@ set_target_properties( ${LIBNAMED}
PROPERTIES COMPILE_FLAGS "${RELEASE_CXX_FLAGS}"
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
if (${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
set_target_properties( ${LIBNAMED} PROPERTIES LINK_FLAGS "-library=stlport4")
endif (${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
target_link_libraries( ${LIBNAMED} ${SYSLIBS})
install(

View File

@ -45,9 +45,11 @@
#if defined(_POSIX_TIMEOUTS) && (_POSIX_TIMEOUTS - 200112L) >= 0L
#if defined(_POSIX_THREADS) && (_POSIX_THREADS - 200112L) >= 0L
#if !(defined(__SUNPRO_CC))
#define POCO_HAVE_MUTEX_TIMEOUT
#endif
#endif
#endif
namespace Poco {