-
Notifications
You must be signed in to change notification settings - Fork 137
Enable Qt framework in CI #140
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,59 +2,52 @@ version: "{branch}-ci-{build}" | |
| os: Visual Studio 2015 | ||
|
|
||
| environment: | ||
| RUBY_VERSION: 200 | ||
| matrix: | ||
| - build: mingw | ||
| platform: x86 | ||
| - CMAKE_GENERATOR: 'MSYS Makefiles' | ||
| MINGW_ARCH: i686 | ||
| MSYSTEM: MINGW32 | ||
| MINGW_ROOT: C:\msys64\mingw32 | ||
| BOOST_ROOT: C:\msys64\mingw32 | ||
| BOOST_LIBRARYDIR: C:\msys64\mingw32\lib | ||
| BOOST_INCLUDEDIR: C:\msys64\mingw32\include\boost | ||
| CMAKE_GENERATOR: 'MSYS Makefiles' | ||
| - build: mingw | ||
| platform: x64 | ||
| QT_DIR: C:\Qt\5.8\mingw53_32 | ||
| - CMAKE_GENERATOR: 'MSYS Makefiles' | ||
| MINGW_ARCH: x86_64 | ||
| MSYSTEM: MINGW64 | ||
| MINGW_ROOT: C:\msys64\mingw64 | ||
| BOOST_ROOT: C:\msys64\mingw64 | ||
| BOOST_LIBRARYDIR: C:\msys64\mingw64\lib | ||
| BOOST_INCLUDEDIR: C:\msys64\mingw64\include\boost | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't there be a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Appveyor has only 32-bit mingw-compiled qt libs preinstalled. https://www.appveyor.com/docs/build-environment/#qt
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for your explanation |
||
| CMAKE_GENERATOR: 'MSYS Makefiles' | ||
| - build: msvc | ||
| - CMAKE_GENERATOR: 'NMake Makefiles' | ||
| platform: x86 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about renaming this to |
||
| BOOST_ROOT: C:\Libraries\boost_1_59_0 | ||
| BOOST_LIBRARYDIR: C:\Libraries\boost_1_59_0\lib32-msvc-14.0 | ||
| BOOST_INCLUDEDIR: C:\Libraries\boost_1_59_0\boost | ||
| CMAKE_GENERATOR: 'NMake Makefiles' | ||
| - build: msvc | ||
| QT_DIR: C:\Qt\5.8\msvc2015 | ||
| - CMAKE_GENERATOR: 'NMake Makefiles' | ||
| platform: x64 | ||
| BOOST_ROOT: C:\Libraries\boost_1_59_0 | ||
| BOOST_INCLUDEDIR: C:\Libraries\boost_1_59_0\boost | ||
| BOOST_LIBRARYDIR: C:\Libraries\boost_1_59_0\lib64-msvc-14.0 | ||
| CMAKE_GENERATOR: 'NMake Makefiles' | ||
| QT_DIR: C:\Qt\5.8\msvc2015_64 | ||
|
|
||
| install: | ||
| - set PATH=C:\Ruby200\bin;%BOOST_LIBRARYDIR%;%PATH% | ||
| - if defined MINGW_ROOT set PATH=%MINGW_ROOT%\bin;C:\msys64\usr\bin\;%PATH% | ||
| - if "%CMAKE_GENERATOR%"=="NMake Makefiles" call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" %PLATFORM% | ||
| - if defined MINGW_ARCH bash -lc "pacman --needed --noconfirm -S mingw-w64-%MINGW_ARCH%-boost" | ||
| - git submodule init | ||
| - git submodule update | ||
| - set PATH=C:\Ruby%RUBY_VERSION%\bin;%BOOST_LIBRARYDIR%;%PATH% | ||
| - gem install bundle | ||
| - bundle install | ||
| - bundle env | ||
| - if "%build%"=="mingw" set PATH=%MINGW_ROOT%\bin;C:\msys64\usr\bin\;%PATH% | ||
| - if "%build%"=="mingw" bash -lc "pacman --needed --noconfirm -S mingw-w64-%MINGW_ARCH%-boost | ||
| - call gem install bundle | ||
| - call bundle install | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please don't shuffle the lines around (in comparison to master), that makes the diff unnecessarily large. |
||
|
|
||
| build_script: | ||
| - cmd: if "%build%"=="msvc" call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" %PLATFORM% | ||
| - cmd: cmake -E make_directory build | ||
| - cmd: cmake -E chdir build cmake -G "%CMAKE_GENERATOR%" -DCUKE_ENABLE_EXAMPLES=ON -DBOOST_ROOT="%BOOST_ROOT%" -DBOOST_INCLUDEDIR="%BOOST_INCLUDEDIR%" -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" .. | ||
| - cmd: cmake --build build | ||
| - cmake -E make_directory build | ||
| - cmake -E chdir build cmake -G "%CMAKE_GENERATOR%" -DCUKE_ENABLE_EXAMPLES=on -DBOOST_ROOT="%BOOST_ROOT%" -DBOOST_INCLUDEDIR="%BOOST_INCLUDEDIR%" -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" -DCMAKE_PREFIX_PATH="%QT_DIR%" .. | ||
| - cmake --build build | ||
|
|
||
| test_script: | ||
| - cmd: set CTEST_OUTPUT_ON_FAILURE=ON | ||
| - cmd: cmake --build build --target test | ||
| - cmd: cmake --build build --target features | ||
| - set CTEST_OUTPUT_ON_FAILURE=ON | ||
| - cmake --build build --target test | ||
| - cmake --build build --target features | ||
|
|
||
| notifications: | ||
| - provider: Email | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,14 @@ | ||
| project(CalcQt) | ||
|
|
||
| set(CALCQT_HEADERS src/CalculatorWidget.h) | ||
| set(CALCQT_SOURCES src/CalcQt.cpp src/CalculatorWidget.cpp) | ||
| include_directories(${CUKE_INCLUDE_DIRS} src) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like that you remove this global
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thank you for pointing that - I haven't yet used target_include_directories |
||
|
|
||
| find_package(Qt5Core QUIET) | ||
| find_package(Qt5Widgets QUIET) | ||
| find_package(Qt5Test QUIET) | ||
|
|
||
| if(${Qt5Core_FOUND} AND ${Qt5Widgets_FOUND} AND ${Qt5Test_FOUND}) | ||
| set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
| set(CMAKE_AUTOMOC ON) | ||
| set(QT_LIBRARIES Qt5::Core Qt5::Widgets Qt5::Test) | ||
|
|
||
| add_library(libcalcqt src/CalculatorWidget.cpp ${CALCQT_HEADERS}) | ||
| if(QT_LIBRARIES) | ||
| add_library(libcalcqt src/CalculatorWidget.cpp src/CalculatorWidget.h) | ||
| set_target_properties(libcalcqt PROPERTIES AUTOMOC ON) | ||
| target_include_directories(libcalcqt PUBLIC src) | ||
| target_link_libraries(libcalcqt ${QT_LIBRARIES}) | ||
|
|
||
| add_executable(calcqt ${CALCQT_SOURCES}) | ||
| add_executable(calcqt src/CalcQt.cpp) | ||
| target_link_libraries(calcqt libcalcqt ${QT_LIBRARIES}) | ||
| else() | ||
| find_package(Qt4 COMPONENTS QtCore QtGui QtTest) | ||
| if(QT4_FOUND) | ||
| include(${QT_USE_FILE}) | ||
| qt4_wrap_cpp(CALCQT_HEADERS_MOC ${CALCQT_HEADERS}) | ||
| add_library(libcalcqt src/CalculatorWidget ${CALCQT_HEADERS_MOC}) | ||
|
|
||
| add_executable(calcqt ${CALCQT_SOURCES} ${CALCQT_HEADERS_MOC}) | ||
| target_link_libraries(calcqt ${QT_LIBRARIES}) | ||
| endif() | ||
| endif() | ||
|
|
||
| if(QT_LIBRARIES) | ||
| if(Boost_UNIT_TEST_FRAMEWORK_FOUND) | ||
| include_directories(${Boost_INCLUDE_DIRS}) | ||
| add_executable(BoostCalculatorQtSteps features/step_definitions/BoostCalculatorQtSteps) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this line now