Skip to content

Commit

Permalink
Merge pull request #1072 from Kampbell/develop
Browse files Browse the repository at this point in the history
AppVeyor: building and testing Poco with VS2013 and CMake/CTest
  • Loading branch information
aleks-f committed Dec 13, 2015
2 parents c5960a6 + 537b181 commit 48bb3b3
Show file tree
Hide file tree
Showing 23 changed files with 592 additions and 396 deletions.
47 changes: 27 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ before_install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then wget --no-check-certificate https://www.cmake.org/files/v3.2/cmake-3.2.3-Linux-x86_64.tar.gz; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then tar -xzvf cmake-3.2.3-Linux-x86_64.tar.gz; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export PATH=$PWD/cmake-3.2.3-Linux-x86_64/bin:$PATH; fi
- sudo apt-get update -qq
- sudo apt-get install -qq -y unixodbc-dev libmysqlclient-dev libsqlite3-dev
- sudo apt-get install -qq -y g++-arm-linux-gnueabi g++-arm-linux-gnueabihf clang-3.5
- sudo apt-get install -qq -y sloccount cppcheck
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y unixodbc-dev libmysqlclient-dev libsqlite3-dev; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y g++-arm-linux-gnueabi g++-arm-linux-gnueabihf clang-3.5; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y sloccount cppcheck; fi


services:
- mongodb
Expand All @@ -22,8 +23,8 @@ services:
notifications:
slack:
rooms:
- pocoproject:ItIUZvs8aJGyPdaKxIKMnS1t
- kampbell:v4ARuptk0ETzwUsKDdV6Gspb#travis
- pocoproject:4iwY1QpB8fdU2WqpcZ6PpZhz#travis
- kampbell:v4ARuptk0ETzwUsKDdV6Gspb#poco

env:
global: TEST_NAME=""
Expand All @@ -34,31 +35,37 @@ before_script:

matrix:
include:
- env: TEST_NAME="gcc (make) bundled"
- env: TEST_NAME="OSX clang (make) bundled"
compiler: clang
os: osx
script:
- ./configure --everything --omit=Data/ODBC,Data/MySQL,Data/SQLite && make install -s -j2
- ./travis/runtests.sh

- env: TEST_NAME="Linux gcc (make) bundled"
compiler: gcc
script:
- ./configure --everything && make -s -j2
- travis_wait 30 ./travis/runtests.sh
- ./travis/runtests.sh

- env: TEST_NAME="gcc (make) unbundled"
- env: TEST_NAME="Linux gcc (make) unbundled"
compiler: gcc
script:
- sudo apt-get install -qq -y libpcre3-dev libssl-dev libexpat1-dev
- ./configure --everything --unbundled && make -s -j2
- travis_wait 30 ./travis/runtests.sh
- ./travis/runtests.sh

- env: TEST_NAME="clang (make)"
- env: TEST_NAME="Linux clang (make)"
compiler: clang
script:
- ./configure --everything --config=Linux-clang && make -s -j2
- travis_wait 30 ./travis/runtests.sh
- ./travis/runtests.sh

#FIXME the -m64 option bring by the Linux config is not supported by arm-linux-gnueabi-g++ which makes this test failing
#FIXME - env: TEST_NAME="arm-linux-gnueabi- (make)"
#FIXME script:
#FIXME - ./configure --omit=Data/ODBC,Data/MySQL,Crypto,NetSSL,PageCompiler && make -s -j2 CROSS_COMPILE=arm-linux-gnueabi- POCO_TARGET_OSARCH=armv7l
- env: TEST_NAME="Linux arm-linux-gnueabi- (make)"
script:
- ./configure --omit=Data/ODBC,Data/MySQL,Crypto,NetSSL,PageCompiler && make -s -j2 CROSS_COMPILE=arm-linux-gnueabi- POCO_TARGET_OSARCH=armv7l

- env: TEST_NAME="gcc (CMake)"
- env: TEST_NAME="Linux gcc (CMake)"
compiler: gcc
script:
# disable tests, gcc-4.6 gets an internal compiler error
Expand All @@ -74,18 +81,18 @@ matrix:
- export CXX="g++-4.8"
- mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=ON .. && make -j2 && cd ..

- env: TEST_NAME="clang (CMake)"
- env: TEST_NAME="Linux clang (CMake)"
compiler: clang
script:
- mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=ON .. && make -j2 && cd ..

- env: TEST_NAME="arm-linux-gnueabi-g++ (CMake)"
- env: TEST_NAME="Linux arm-linux-gnueabi-g++ (CMake)"
script:
- export CC="arm-linux-gnueabi-gcc"
- export CXX="arm-linux-gnueabi-g++"
- mkdir cmake-build && cd cmake-build && cmake -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_TESTS=ON .. && make -j2 && cd ..

- env: TEST_NAME="arm-linux-gnueabihf-g++ (CMake)"
- env: TEST_NAME="Linux arm-linux-gnueabihf-g++ (CMake)"
script:
- export CC="arm-linux-gnueabihf-gcc"
- export CXX="arm-linux-gnueabihf-g++"
Expand Down
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ if(NOT MSVC_IDE)
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
"Choose the type of build, options are: None Debug Release" FORCE)
endif()
message(STATUS "Setting Poco build type - ${CMAKE_BUILD_TYPE}")
endif()

if (CMAKE_BUILD_TYPE STREQUAL "")
Expand Down Expand Up @@ -279,6 +278,11 @@ install(
message(STATUS "CMake ${CMAKE_VERSION} successfully configured ${PROJECT_NAME} using ${CMAKE_GENERATOR} generator")
message(STATUS "Installation target path: ${CMAKE_INSTALL_PREFIX}")

message(STATUS "")
message(STATUS "Generated with config types: ${CMAKE_CONFIGURATION_TYPES}")
message(STATUS "Setting Poco build type - ${CMAKE_BUILD_TYPE}")
message(STATUS "")

message(STATUS "C_FLAGS: =${CMAKE_C_FLAGS}")
message(STATUS "CMAKE_C_FLAGS_DEBUG:=${CMAKE_C_FLAGS_DEBUG}")
message(STATUS "CMAKE_C_FLAGS_RELEASE:=${CMAKE_C_FLAGS_RELEASE}")
Expand Down
2 changes: 2 additions & 0 deletions CppUnit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ target_include_directories( "${LIBNAME}"
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
target_compile_definitions("${LIBNAME}" PUBLIC ${LIB_MODE_DEFINITIONS})

SIMPLE_INSTALL(${LIBNAME})
10 changes: 6 additions & 4 deletions Foundation/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,17 @@ else()
add_executable( TestApp src/TestApp.cpp )
endif()
# The test is run in the runtime directory. So the TestApp is built there too because it is used by the tests
set_target_properties( TestApp PROPERTIES DEBUG_POSTFIX "") # don't use DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}
set_target_properties( TestApp PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} )
target_link_libraries( TestApp PocoFoundation )
target_link_libraries( TestApp PocoFoundation)

if(NOT POCO_STATIC)
# TestLibrary
add_library( TestLibrary SHARED src/TestLibrary.cpp src/TestPlugin.cpp src/TestPlugin.h )
set_target_properties( TestLibrary PROPERTIES PREFIX "" DEBUG_POSTFIX "") # The test requires the library named TestLibrary. By default it is prefixed with lib.
# The test is run in the runtime directory. So the TestLibrary is built there too because it is used by the tests
# The test requires the library named TestLibrary. By default it is prefixed with lib.
set_target_properties( TestLibrary PROPERTIES PREFIX "" DEBUG_POSTFIX "") # don't use DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}
set_target_properties( TestLibrary PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} )
target_link_libraries( TestLibrary PocoFoundation )
target_link_libraries( TestLibrary PocoFoundation)

endif()

22 changes: 11 additions & 11 deletions Foundation/testsuite/TestApp_vs120.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">obj\TestApp\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">false</LinkIncremental>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">TestApp</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">TestAppd</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">TestAppd</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">TestAppd</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">TestApp</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">TestApp</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">TestApp</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">TestApp</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">TestApp</TargetName>
</PropertyGroup>
Expand All @@ -143,10 +143,10 @@
<AdditionalOptions>/FS</AdditionalOptions>
</ClCompile>
<Link>
<OutputFile>bin\TestAppd.exe</OutputFile>
<OutputFile>%(OutputFile)</OutputFile>
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin\TestAppd.pdb</ProgramDatabaseFile>
<ProgramDatabaseFile>bin\$(TargetName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
Expand Down Expand Up @@ -174,7 +174,7 @@
<AdditionalOptions>/FS</AdditionalOptions>
</ClCompile>
<Link>
<OutputFile>bin\TestApp.exe</OutputFile>
<OutputFile>%(OutputFile)</OutputFile>
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ProgramDatabaseFile>
Expand Down Expand Up @@ -208,7 +208,7 @@
<AdditionalOptions>/FS</AdditionalOptions>
</ClCompile>
<Link>
<OutputFile>bin\static_md\TestApp.exe</OutputFile>
<OutputFile>%(OutputFile)</OutputFile>
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ProgramDatabaseFile>
Expand Down Expand Up @@ -238,7 +238,7 @@
<AdditionalOptions>/FS</AdditionalOptions>
</ClCompile>
<Link>
<OutputFile>bin\static_md\TestAppd.exe</OutputFile>
<OutputFile>%(OutputFile)</OutputFile>
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin\static_md\TestAppd.pdb</ProgramDatabaseFile>
Expand All @@ -265,10 +265,10 @@
<AdditionalOptions>/FS</AdditionalOptions>
</ClCompile>
<Link>
<OutputFile>bin\static_mt\TestAppd.exe</OutputFile>
<OutputFile>%(OutputFile)</OutputFile>
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin\static_mt\TestAppd.pdb</ProgramDatabaseFile>
<ProgramDatabaseFile>bin\static_mt\$(TargetName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
Expand Down Expand Up @@ -296,7 +296,7 @@
<AdditionalOptions>/FS</AdditionalOptions>
</ClCompile>
<Link>
<OutputFile>bin\static_mt\TestApp.exe</OutputFile>
<OutputFile>%(OutputFile)</OutputFile>
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ProgramDatabaseFile>
Expand Down
4 changes: 2 additions & 2 deletions Foundation/testsuite/TestLibrary_vs120.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@
</ClCompile>
<Link>
<AdditionalDependencies>PocoFoundationd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin\TestLibraryd.dll</OutputFile>
<OutputFile>%(OutputFile)</OutputFile>
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin\TestLibraryd.pdb</ProgramDatabaseFile>
<ProgramDatabaseFile>bin\$(TargetName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>
</ImportLibrary>
Expand Down
Loading

0 comments on commit 48bb3b3

Please sign in to comment.