Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working appveyor #702

Merged
merged 14 commits into from
Oct 9, 2017
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "thirdparty/cpputest"]
path = thirdparty/cpputest
url = ../../cpputest/cpputest.git
url = ../../AVnu/cpputest.git
[submodule "avdecc-lib"]
path = avdecc-lib
url = ../../AVnu/avdecc-lib
11 changes: 9 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,19 @@ before_install:
- sudo update-alternatives --set c++ /usr/bin/g++
compiler:
- gcc
env: BUILD_KERNEL=4.4.0-75-generic
env:
- BUILD_KERNEL=4.4.0-75-generic
install:
- sudo apt-get update -qq
- sudo apt-get install -y libpcap-dev libpci-dev libsndfile1-dev libjack-dev linux-headers-4.4.0-75-generic cmake
- sudo apt-get install -y libpcap-dev libpci-dev libsndfile1-dev libjack-dev linux-headers-4.4.0-75-generic
- sudo apt-get install -y libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libasound2-dev
- sudo cp /usr/src/linux-headers-4.4.0-75/include/uapi/linux/ethtool.h /usr/include/linux
- sudo cp /usr/src/linux-headers-4.4.0-75/include/uapi/linux/ptp_clock.h /usr/include/linux
- CMAKE_URL="https://cmake.org/files/v3.9/cmake-3.9.4-Linux-x86_64.tar.gz"
- mkdir -p ${TRAVIS_BUILD_DIR}/deps/cmake
- travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${TRAVIS_BUILD_DIR}/deps/cmake
- export PATH=${TRAVIS_BUILD_DIR}/deps/cmake/bin:${PATH}


script: ./travis.sh

37 changes: 36 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,43 @@ cmake_minimum_required (VERSION 2.8)
project (open-avb)
enable_testing()

set(C++11 ON CACHE BOOL "Compile with C++11 support" FORCE)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()

add_subdirectory("thirdparty/cpputest")
add_subdirectory("daemons/common/tests")
add_subdirectory("daemons/mrpd")
add_subdirectory("daemons/maap")
add_subdirectory("daemons/gptp")

message("
-------------------------------------------------------
OpenAvnu Build information

Current compiler options:
CC: ${CMAKE_C_COMPILER}
CXX: ${CMAKE_CXX_COMPILER}
OpenAvnu CFLAGS: ${CMAKE_C_FLAGS}
OpenAvnu CXXFLAGS: ${CMAKE_CXX_FLAGS}
OpenAvnu LDFLAGS: ${CMAKE_LD_FLAGS}

Features configured in OpenAvnu root CMakeFile.txt:
Memory Leak Detection: ${MEMORY_LEAK_DETECTION}
Compiling Extensions: ${EXTENSIONS}
Support Long Long: ${LONGLONG}
Use OpenAvnu flags: ${CMAKE_FLAGS}

Using Standard C library: ${STD_C}
Using Standard C++ library: ${STD_CPP}
Using C++11 library: ${C++11}

-------------------------------------------------------
")
24 changes: 24 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: '1.0.{build}'

clone_folder: c:\oavb
clone_depth: 20

environment:
# Config for mrp Windows build
WPCAP_DIR: c:\oavb\WpdPack

install:
- git submodule update --init --recursive
# download WinPcap developer module and unzip it
- ps: Start-FileDownload 'https://www.winpcap.org/install/bin/WpdPack_4_1_2.zip'
- ps: 7z x WpdPack_4_1_2.zip

before_build:
# cmake
- choco upgrade cmake
- set path=C:\Program Files\CMake\bin;%path%

build_script:
- cd c:\oavb
- cmake CMakeLists.txt -G "Visual Studio 12 2013"
- cmake --build . --config Release
12 changes: 10 additions & 2 deletions daemons/gptp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@ file(GLOB GPTP_COMMON "./common/*.cpp" "./common/*.c")

if(UNIX)
include_directories( include "./linux/src" )
file(GLOB GPTP_OS "./linux/src/*.cpp")
target_link_libraries(gptp pthread)
file(GLOB GPTP_OS
"./linux/src/daemon_cl.cpp"
"./linux/src/linux_ipc.cpp"
"./linux/src/platform.cpp"
"./linux/src/linux_hal_persist_file.cpp"
"./linux/src/linux_hal_generic.cpp"
"./linux/src/linux_hal_generic_adj.cpp"
"./linux/src/linux_hal_common.cpp")
add_executable (gptp ${GPTP_COMMON} ${GPTP_OS})
target_link_libraries(gptp pthread rt)
elseif(WIN32)
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
link_directories($ENV{WPCAP_DIR}/Lib/x64)
Expand Down
2 changes: 1 addition & 1 deletion daemons/gptp/common/gptp_cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ void GptpIniParser::print_phy_delay( void )
tx = i->second.get_tx_delay();
rx = i->second.get_rx_delay();

snprintf( phy_delay_desc, PHY_DELAY_DESC_LEN+1,
PLAT_snprintf( phy_delay_desc, PHY_DELAY_DESC_LEN+1,
"TX: %hu | RX: %hu", tx, rx );

speed_name = findNameBySpeed( speed );
Expand Down
29 changes: 29 additions & 0 deletions daemons/maap/windows/src/maap_main.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
/*************************************************************************************
Copyright (c) 2016-2017, Harman International Industries, Incorporated
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS LISTED "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS LISTED BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*************************************************************************************/

/*
* TODO: This code still needs to be added!
*/

int main(int argc, char *argv[])
{
}