mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-15 22:50:36 +02:00
Merge pull request #1189 from mathausmendel/develop
Compilation fixes for AIX (IBM XLC)
This commit is contained in:
commit
d49ea8a51b
@ -139,6 +139,9 @@ include(DefinePlatformSpecifc)
|
||||
# Collect the built libraries and include dirs, the will be used to create the PocoConfig.cmake file
|
||||
set(Poco_COMPONENTS "")
|
||||
|
||||
# Pthreads/threads support
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory(CppUnit)
|
||||
endif ()
|
||||
@ -169,9 +172,6 @@ add_subdirectory(Net)
|
||||
list(APPEND Poco_COMPONENTS "Net")
|
||||
endif()
|
||||
|
||||
# Pthreads/threads support
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
#NetSSL
|
||||
|
||||
|
||||
|
@ -18,4 +18,4 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
target_link_libraries( ${TESTUNIT} PocoDataSQLite PocoData PocoFoundation CppUnit )
|
||||
target_link_libraries( ${TESTUNIT} ${CMAKE_THREAD_LIBS_INIT} PocoDataSQLite PocoData PocoFoundation CppUnit )
|
||||
|
@ -23,4 +23,4 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
target_link_libraries( ${TESTUNIT} PocoData PocoUtil PocoXML PocoFoundation CppUnit)
|
||||
target_link_libraries( ${TESTUNIT} ${CMAKE_THREAD_LIBS_INIT} PocoData PocoUtil PocoXML PocoFoundation CppUnit)
|
||||
|
@ -111,14 +111,14 @@ endif(ANDROID)
|
||||
# TODO: Why is this here?
|
||||
add_definitions( -DPCRE_STATIC)
|
||||
|
||||
# For SetAffinity
|
||||
# For POSIX threads on Unix
|
||||
if(UNIX AND NOT APPLE)
|
||||
# We still need pthreads on Unix
|
||||
set(SYSLIBS ${SYSLIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||
INCLUDE (CheckFunctionExists)
|
||||
INCLUDE (CheckCXXSourceCompiles)
|
||||
INCLUDE (CheckLibraryExists)
|
||||
CHECK_LIBRARY_EXISTS(pthread pthread_setaffinity_np "pthread.h" HAVE_PTHREAD_SETAFFINITY_NP)
|
||||
#set(CMAKE_EXTRA_INCLUDE_FILES pthread.h)
|
||||
#CHECK_FUNCTION_EXISTS(pthread_setaffinity_np HAVE_PTHREAD_SETAFFINITY_NP)
|
||||
if(NOT HAVE_PTHREAD_SETAFFINITY_NP)
|
||||
message(STATUS "Platform has not PTHREAD_SETAFFINITY_NP")
|
||||
else(HAVE_PTHREAD_SETAFFINITY_NP)
|
||||
|
@ -98,7 +98,7 @@ public:
|
||||
std::string toString()
|
||||
{
|
||||
std::string str;
|
||||
Var(*this).convert<std::string>(str);
|
||||
Var(*this).template convert<std::string>(str);
|
||||
return str;
|
||||
}
|
||||
|
||||
|
@ -20,13 +20,6 @@
|
||||
#include "Poco/UTFString.h"
|
||||
|
||||
|
||||
using Poco::UnicodeConverter;
|
||||
using Poco::UTF16Char;
|
||||
using Poco::UTF16String;
|
||||
using Poco::UTF32Char;
|
||||
using Poco::UTF32String;
|
||||
|
||||
|
||||
UnicodeConverterTest::UnicodeConverterTest(const std::string& rName): CppUnit::TestCase(rName)
|
||||
{
|
||||
}
|
||||
@ -39,14 +32,13 @@ UnicodeConverterTest::~UnicodeConverterTest()
|
||||
|
||||
void UnicodeConverterTest::testUTF16()
|
||||
{
|
||||
|
||||
runTests<UTF16String>();
|
||||
runTests<Poco::UTF16String>();
|
||||
}
|
||||
|
||||
|
||||
void UnicodeConverterTest::testUTF32()
|
||||
{
|
||||
runTests<UTF32String>();
|
||||
runTests<Poco::UTF32String>();
|
||||
}
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
target_link_libraries( ${TESTUNIT} PocoJSON PocoFoundation CppUnit )
|
||||
target_link_libraries( ${TESTUNIT} ${CMAKE_THREAD_LIBS_INIT} PocoJSON PocoFoundation CppUnit )
|
||||
|
||||
# The test is run in the build directory. So the test data is copied there too
|
||||
add_custom_command(TARGET ${TESTUNIT} POST_BUILD
|
||||
|
@ -20,4 +20,4 @@ set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
target_link_libraries( ${TESTUNIT} PocoMongoDB PocoFoundation CppUnit )
|
||||
target_link_libraries( ${TESTUNIT} ${CMAKE_THREAD_LIBS_INIT} PocoMongoDB PocoFoundation CppUnit )
|
||||
|
@ -18,4 +18,4 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
target_link_libraries( ${TESTUNIT} PocoNet PocoUtil PocoXML PocoFoundation CppUnit)
|
||||
target_link_libraries( ${TESTUNIT} ${CMAKE_THREAD_LIBS_INIT} PocoNet PocoUtil PocoXML PocoFoundation CppUnit)
|
||||
|
@ -18,7 +18,7 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND ${TESTUNIT} -all)
|
||||
target_link_libraries( ${TESTUNIT} PocoNetSSL PocoCrypto PocoNet PocoUtil PocoXML PocoFoundation CppUnit)
|
||||
target_link_libraries( ${TESTUNIT} ${CMAKE_THREAD_LIBS_INIT} PocoNetSSL PocoCrypto PocoNet PocoUtil PocoXML PocoFoundation CppUnit)
|
||||
|
||||
# The test is run in the build directory. So the test data is copied there too
|
||||
add_custom_command(TARGET ${TESTUNIT} POST_BUILD
|
||||
|
@ -20,4 +20,4 @@ set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
target_link_libraries( ${TESTUNIT} PocoRedis PocoFoundation CppUnit )
|
||||
target_link_libraries( ${TESTUNIT} ${CMAKE_THREAD_LIBS_INIT} PocoRedis PocoFoundation CppUnit )
|
||||
|
@ -24,4 +24,4 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
target_link_libraries( ${TESTUNIT} PocoUtil PocoJSON PocoXML PocoFoundation CppUnit)
|
||||
target_link_libraries( ${TESTUNIT} ${CMAKE_THREAD_LIBS_INIT} PocoUtil PocoJSON PocoXML PocoFoundation CppUnit)
|
||||
|
@ -18,4 +18,4 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
target_link_libraries( ${TESTUNIT} PocoXML PocoFoundation CppUnit)
|
||||
target_link_libraries( ${TESTUNIT} ${CMAKE_THREAD_LIBS_INIT} PocoXML PocoFoundation CppUnit)
|
||||
|
@ -18,8 +18,7 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${TESTUNIT} PocoZip PocoNet PocoFoundation CppUnit )
|
||||
target_link_libraries( ${TESTUNIT} ${CMAKE_THREAD_LIBS_INIT} PocoZip PocoNet PocoFoundation CppUnit )
|
||||
|
||||
# The test is run in the build directory. So the test data is copied there too
|
||||
add_custom_command(TARGET ${TESTUNIT} POST_BUILD
|
||||
|
Loading…
x
Reference in New Issue
Block a user