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

Enable KDStateMachineEditor build on all OSes #994

Merged
merged 4 commits into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,19 @@ jobs:
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt update -qq
sudo apt install -y gdb doxygen libgraphviz-dev
sudo apt install -y gdb doxygen

- name: Install Dependencies on macOS
if: ${{ runner.os == 'macOS' }}
run: brew install bison

- name: Install ninja-build tool (must be after Qt due PATH changes)
uses: turtlesec-no/get-ninja@main

- name: Add Bison to PATH (must be after Qt due PATH changes)
if: ${{ runner.os == 'macOS' }}
run: echo "/opt/homebrew/opt/bison/bin" >> $GITHUB_PATH

- name: Make sure MSVC is found when Ninja generator is in use
if: ${{ runner.os == 'Windows' }}
uses: ilammy/msvc-dev-cmd@v1
Expand All @@ -94,7 +102,7 @@ jobs:
run: >
cmake -S . -G Ninja --preset ${{ matrix.config.preset }}
-DCMAKE_OSX_ARCHITECTURES=${{ matrix.config.cmake_osx_architectures}}
-DGAMMARAY_WITH_KDSME=${{ runner.os == 'Linux' }}
-DGAMMARAY_WITH_KDSME=ON
-DGAMMARAY_BUILD_DOCS=${{ runner.os == 'Linux' }}

- name: Build Project
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/KDStateMachineEditor
44 changes: 23 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,6 @@ if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267") #conversion from size_t to int possible loss of data
endif()

if(WIN32)
add_definitions(-DUNICODE -D_UNICODE -D_USING_V110_SDK71_=1)
endif()

if(QNXNTO)
add_definitions(-D_QNX_SOURCE)
endif()
Expand Down Expand Up @@ -561,23 +557,6 @@ endif()
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050500)
#add_definitions(-DQT_DEPRECATED_WARNINGS)

if(WARNINGS_ARE_ERRORS)
if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wno-error=deprecated-declarations")
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND ${QT_VERSION_MAJOR} EQUAL 5)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=suggest-override") # Q_OBJECT expansion warnings
endif()

if(CMAKE_COMPILER_IS_GNUCXX)
# each compiler has its own opinion on when to apply [noreturn]
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=suggest-attribute=noreturn")
endif()
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
add_definitions(-D_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING)
endif()
endif()

if(NOT DEFINED QT_LIBINFIX)
set(QT_LIBINFIX "")
endif()
Expand Down Expand Up @@ -839,6 +818,29 @@ include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/3rdparty ${CMAKE_BIN
include(KDQtInstallPaths) #to set QT_INSTALL_FOO variables
add_subdirectory(cmake)
add_subdirectory(3rdparty)

# Enable WARNINGS_ARE_ERRORS AFTER 3rdparty modules
if(WARNINGS_ARE_ERRORS)
if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wno-error=deprecated-declarations")
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND ${QT_VERSION_MAJOR} EQUAL 5)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=suggest-override") # Q_OBJECT expansion warnings
endif()

if(CMAKE_COMPILER_IS_GNUCXX)
# each compiler has its own opinion on when to apply [noreturn]
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=suggest-attribute=noreturn")
endif()
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
add_definitions(-D_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING)
endif()
endif()

if(WIN32)
add_definitions(-DUNICODE -D_UNICODE -D_USING_V110_SDK71_=1)
endif()

add_subdirectory(common)
add_subdirectory(core)
add_subdirectory(probe)
Expand Down