From e7a80094620abfebb20a29bbbc7b2f1e9ff0edf0 Mon Sep 17 00:00:00 2001 From: Cristiano Nunes Date: Wed, 27 Mar 2019 23:06:18 -0300 Subject: [PATCH] Updated Travis tests --- .gitignore | 1 + .travis.yml | 16 ++++++++++++++-- CMakeLists.txt | 16 ++++++++-------- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index e68aae4..d7c55ca 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ # IDE ############################## .idea +.vscode/ ############################## # CMake diff --git a/.travis.yml b/.travis.yml index 0ca3d5c..c346828 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,19 @@ language: cpp matrix: include: - os: linux + # Tests on Ubuntu 14.04 + - os: linux + dist: trusty + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - build-essential + - cmake + - libwxgtk3.0-dev + # Tests on Ubuntu 16.04 + - os: linux dist: xenial addons: apt: @@ -12,9 +24,9 @@ matrix: - build-essential - cmake - libwxgtk3.0-dev - script: - mkdir build - cd build - cmake -DCMAKE_BUILD_TYPE=Coverage .. - make + - make install diff --git a/CMakeLists.txt b/CMakeLists.txt index 0cecd45..1d12a7d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,25 +10,25 @@ include(${wxWidgets_USE_FILE}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -s") # Sources -file(GLOB SOURCE_FILES src/*.cpp src/*.h) -file(GLOB LANG_FILES msg/*.po) +file(GLOB SRC_FILES src/*.cpp src/*.h) +file(GLOB MSG_FILES msg/*.po) # Translation files if(GETTEXT_FOUND) - foreach(LANG_FILE ${LANG_FILES}) - # Remove path and extension of 'LANG_FILE' - get_filename_component(LANG_NAME ${LANG_FILE} NAME_WE) + foreach(MSG_FILE ${MSG_FILES}) + # Remove path and extension of 'MSG_FILE' + get_filename_component(MSG_NAME ${MSG_FILE} NAME_WE) # Compile each '.po' file to '.gmo' file - GETTEXT_PROCESS_PO_FILES(${LANG_NAME} ALL PO_FILES "msg/${LANG_NAME}.po") + GETTEXT_PROCESS_PO_FILES(${MSG_NAME} ALL PO_FILES "msg/${MSG_NAME}.po") # Define the files location during install process - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${LANG_NAME}.gmo" DESTINATION "share/${PROJECT_NAME}/resource/msg/${LANG_NAME}/" RENAME "${PROJECT_NAME}.mo") + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${MSG_NAME}.gmo" DESTINATION "share/${PROJECT_NAME}/resource/msg/${MSG_NAME}/" RENAME "${PROJECT_NAME}.mo") endforeach() else() message(WARNING "gettext tools not found. Translations will not be built.") endif() # Compile the main executable -add_executable(wxmp3val ${SOURCE_FILES}) +add_executable(wxmp3val ${SRC_FILES}) target_link_libraries(wxmp3val ${wxWidgets_LIBRARIES}) # Define the files location during install process