mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Prepare CMake to support both Qt5 andf Qt6
CEE_USE_QT6 controls if Qt6 is used. Improved install and package for Qt6, target version Qt 6.5.3 Added Qt6 to github action for AppFwkUnitTest
This commit is contained in:
parent
8424c77167
commit
edf44cb4c0
77
.github/workflows/AppFwkUnitTest.yml
vendored
77
.github/workflows/AppFwkUnitTest.yml
vendored
@ -8,9 +8,15 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
qtver: [5.12.12, 6.5.3]
|
||||
include:
|
||||
- qtver: 6.5.3
|
||||
build_flags: -DCEE_USE_QT6=ON -DCEE_USE_QT5=OFF
|
||||
- qtver: 5.12.12
|
||||
build_flags: -DCEE_USE_QT6=OFF -DCEE_USE_QT5=ON
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set apt mirror
|
||||
# see https://github.com/actions/runner-images/issues/7048
|
||||
@ -22,7 +28,7 @@ jobs:
|
||||
sudo sed -i 's/http:\/\/azure.archive.ubuntu.com\/ubuntu\//mirror+file:\/etc\/apt\/mirrors.txt/' /etc/apt/sources.list
|
||||
|
||||
- name: Install Linux dependencies
|
||||
if: ${{contains( matrix.os, 'ubuntu') }}
|
||||
if: contains(matrix.os, 'ubuntu')
|
||||
run: |
|
||||
sudo apt-get update --option="APT::Acquire::Retries=3"
|
||||
sudo apt-get install --option="APT::Acquire::Retries=3" libxkbcommon-x11-0 libgl1-mesa-dev mesa-common-dev libglfw3-dev libglu1-mesa-dev
|
||||
@ -30,10 +36,10 @@ jobs:
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: 5.12.12
|
||||
modules: qtscript
|
||||
version: ${{ matrix.qtver }}
|
||||
dir: "${{ github.workspace }}/Qt/"
|
||||
cache: true
|
||||
cache-key-prefix: ${{ matrix.qtver }}-${{ matrix.os }}
|
||||
|
||||
- name: Get CMake and Ninja
|
||||
uses: lukka/get-cmake@latest
|
||||
@ -41,42 +47,41 @@ jobs:
|
||||
- name: Use MSVC (Windows)
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Configure
|
||||
shell: cmake -P {0}
|
||||
- name: Configure and build
|
||||
run: |
|
||||
execute_process(
|
||||
COMMAND cmake
|
||||
-S Fwk
|
||||
-B cmakebuild
|
||||
-G Ninja
|
||||
RESULT_VARIABLE result
|
||||
)
|
||||
if (NOT result EQUAL 0)
|
||||
message(FATAL_ERROR "Bad exit status")
|
||||
endif()
|
||||
|
||||
- name: Build
|
||||
shell: cmake -P {0}
|
||||
run: |
|
||||
set(ENV{NINJA_STATUS} "[%f/%t %o/sec] ")
|
||||
execute_process(
|
||||
COMMAND cmake --build cmakebuild
|
||||
RESULT_VARIABLE result
|
||||
)
|
||||
if (NOT result EQUAL 0)
|
||||
message(FATAL_ERROR "Bad exit status")
|
||||
endif()
|
||||
cmake -S Fwk/AppFwk ${{matrix.build_flags}} -B cmakebuild -G Ninja
|
||||
cmake --build cmakebuild
|
||||
|
||||
- name: Run Unit Tests
|
||||
- name: Install
|
||||
run: |
|
||||
cd cmakebuild
|
||||
cmake --install . --prefix ${{github.workspace}}/cmakebuild/install
|
||||
|
||||
- name: Run Unit Tests Qt5
|
||||
if: matrix.qtver == '5.12.12'
|
||||
shell: bash
|
||||
run: |
|
||||
cmakebuild/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmCore_UnitTests
|
||||
cmakebuild/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXml_UnitTests/cafPdmXml_UnitTests
|
||||
cmakebuild/AppFwk/cafProjectDataModel/cafProjectDataModel_UnitTests/cafProjectDataModel_UnitTests
|
||||
cmakebuild/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/cafPdmScripting_UnitTests
|
||||
cmakebuild/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmCore_UnitTests
|
||||
cmakebuild/cafProjectDataModel/cafPdmXml/cafPdmXml_UnitTests/cafPdmXml_UnitTests
|
||||
cmakebuild/cafProjectDataModel/cafProjectDataModel_UnitTests/cafProjectDataModel_UnitTests
|
||||
cmakebuild/cafPdmScripting/cafPdmScripting_UnitTests/cafPdmScripting_UnitTests
|
||||
|
||||
- name: Run Unit Tests Windows (does not work on Linux)
|
||||
if: contains( matrix.os, 'windows')
|
||||
- name: Run Unit Tests Windows Qt5 (does not work on Linux)
|
||||
if: (contains( matrix.os, 'windows') && (matrix.qtver == '5.12.12'))
|
||||
shell: bash
|
||||
run: cmakebuild/cafUserInterface/cafUserInterface_UnitTests/cafUserInterface_UnitTests
|
||||
|
||||
- name: Run Unit Tests Qt6
|
||||
if: matrix.qtver == '6.5.3'
|
||||
shell: bash
|
||||
run: |
|
||||
cmakebuild/AppFwk/cafUserInterface/cafUserInterface_UnitTests/cafUserInterface_UnitTests
|
||||
cmakebuild/install/bin/cafPdmCore_UnitTests
|
||||
cmakebuild/install/bin/cafPdmXml_UnitTests
|
||||
cmakebuild/install/bin/cafProjectDataModel_UnitTests
|
||||
cmakebuild/install/bin/cafPdmScripting_UnitTests
|
||||
|
||||
- name: Run Unit Tests Windows Qt6 (does not work on Linux)
|
||||
if: (contains( matrix.os, 'windows') && (matrix.qtver == '6.5.3'))
|
||||
shell: bash
|
||||
run: cmakebuild/install/bin/cafUserInterface_UnitTests
|
||||
|
@ -11,27 +11,6 @@ if(MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.11))
|
||||
)
|
||||
endif()
|
||||
|
||||
# Qt
|
||||
if(NOT DEFINED (CEE_USE_QT5))
|
||||
option(CEE_USE_QT5 "Use Qt5" ON)
|
||||
endif(NOT DEFINED (CEE_USE_QT5))
|
||||
|
||||
if(CEE_USE_QT5)
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui OpenGL Widgets
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::OpenGL Qt5::Widgets)
|
||||
else()
|
||||
find_package(
|
||||
Qt4
|
||||
COMPONENTS QtCore QtGui QtMain QtOpenGl
|
||||
REQUIRED
|
||||
)
|
||||
include(${QT_USE_FILE})
|
||||
endif(CEE_USE_QT5)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
@ -40,6 +19,15 @@ if(MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
||||
endif()
|
||||
|
||||
# Qt
|
||||
if(NOT DEFINED (CEE_USE_QT5))
|
||||
option(CEE_USE_QT5 "Use Qt5" ON)
|
||||
endif(NOT DEFINED (CEE_USE_QT5))
|
||||
|
||||
if(NOT DEFINED (CEE_USE_QT6))
|
||||
option(CEE_USE_QT6 "Use Qt6" OFF)
|
||||
endif(NOT DEFINED (CEE_USE_QT6))
|
||||
|
||||
# CeeViz is not available here, exclude it from the build
|
||||
set(CAF_EXCLUDE_CVF ON)
|
||||
|
||||
|
@ -10,13 +10,23 @@ endif()
|
||||
set(MOC_HEADER_FILES cafCmdFeature.h cafCmdFeatureManager.h)
|
||||
|
||||
# Qt
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
|
||||
if(CEE_USE_QT6)
|
||||
find_package(
|
||||
Qt6
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets
|
||||
)
|
||||
set(QT_LIBRARIES Qt6::Core Qt6::Gui Qt6::Widgets)
|
||||
qt_standard_project_setup()
|
||||
else()
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
|
||||
endif()
|
||||
|
||||
set(PROJECT_FILES
|
||||
cafCmdExecCommandManager.cpp
|
||||
@ -46,7 +56,7 @@ target_link_libraries(${PROJECT_NAME} cafProjectDataModel ${QT_LIBRARIES})
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(
|
||||
${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127"
|
||||
${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127 /wd4996"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -10,13 +10,23 @@ endif()
|
||||
set(MOC_HEADER_FILES)
|
||||
|
||||
# Qt
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
|
||||
if(CEE_USE_QT6)
|
||||
find_package(
|
||||
Qt6
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets
|
||||
)
|
||||
set(QT_LIBRARIES Qt6::Core Qt6::Gui Qt6::Widgets)
|
||||
qt_standard_project_setup()
|
||||
else()
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
|
||||
endif()
|
||||
|
||||
set(PROJECT_FILES
|
||||
# Default features
|
||||
@ -63,34 +73,16 @@ set(QRC_FILES
|
||||
# https://gitlab.kitware.com/cmake/community/wikis/doc/tutorials/Object-Library
|
||||
# and
|
||||
# https://cmake.org/cmake/help/v3.15/command/add_library.html?highlight=add_library#object-libraries
|
||||
|
||||
add_library(${PROJECT_NAME} OBJECT ${PROJECT_FILES} ${MOC_SOURCE_FILES})
|
||||
|
||||
target_include_directories(
|
||||
${PROJECT_NAME}
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
$<TARGET_PROPERTY:cafCommand,INCLUDE_DIRECTORIES> # Needed for cmake version
|
||||
# < 3.12. Remove when we
|
||||
# can use
|
||||
# target_link_libraries
|
||||
$<TARGET_PROPERTY:cafUserInterface,INCLUDE_DIRECTORIES> # Needed for cmake
|
||||
# version < 3.12.
|
||||
# Remove when we can
|
||||
# use
|
||||
# target_link_libraries
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME} cafCommand cafUserInterface ${QT_LIBRARIES}
|
||||
)
|
||||
|
||||
# Before cmake 3.12 OBJECT libraries could not use the target_link_libraries
|
||||
# command, So we need to set the POSITION_INDEPENDENT_CODE option manually
|
||||
|
||||
set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
# Not to be used until we can use cmake 3.12 or above target_link_libraries (
|
||||
# ${PROJECT_NAME} cafCommand cafUserInterface ${QT_LIBRARIES} )
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(
|
||||
${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127"
|
||||
${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127 /wd4996"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -6,14 +6,23 @@ if(CAF_ENABLE_UNITY_BUILD)
|
||||
set(CMAKE_UNITY_BUILD true)
|
||||
endif()
|
||||
|
||||
# Qt
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
|
||||
if(CEE_USE_QT6)
|
||||
find_package(
|
||||
Qt6
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets
|
||||
)
|
||||
set(QT_LIBRARIES Qt6::Core Qt6::Gui Qt6::Widgets)
|
||||
else()
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
|
||||
qt5_add_resources(QRC_FILES_CPP ${QRC_FILES})
|
||||
endif()
|
||||
|
||||
add_definitions(-DCVF_USING_CMAKE)
|
||||
|
||||
|
@ -1,14 +1,20 @@
|
||||
find_package(Qt5 CONFIG COMPONENTS Core)
|
||||
if(Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core)
|
||||
if(CEE_USE_QT6)
|
||||
find_package(
|
||||
Qt6
|
||||
COMPONENTS
|
||||
REQUIRED Core
|
||||
)
|
||||
set(QT_LIBRARIES Qt6::Core)
|
||||
else()
|
||||
find_package(
|
||||
Qt4
|
||||
COMPONENTS QtCore
|
||||
REQUIRED
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core
|
||||
)
|
||||
include(${QT_USE_FILE})
|
||||
endif(Qt5Core_FOUND)
|
||||
set(QT_LIBRARIES Qt5::Core)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
|
||||
qt5_add_resources(QRC_FILES_CPP ${QRC_FILES})
|
||||
endif()
|
||||
|
||||
project(cafPdmCvf_UnitTests)
|
||||
|
||||
|
@ -1,11 +1,20 @@
|
||||
project(cafPdmScripting_UnitTests)
|
||||
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Xml Gui
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Xml Qt5::Gui Qt5::Widgets)
|
||||
if(CEE_USE_QT6)
|
||||
find_package(
|
||||
Qt6
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets
|
||||
)
|
||||
qt_standard_project_setup()
|
||||
else()
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Xml Gui
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Xml Qt5::Gui)
|
||||
endif()
|
||||
|
||||
if(MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.11))
|
||||
# VS 2017 : Disable warnings from from gtest code, using deprecated code
|
||||
@ -16,12 +25,16 @@ endif()
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} # required for gtest-all.cpp
|
||||
)
|
||||
|
||||
# add the executable
|
||||
add_executable(
|
||||
${PROJECT_NAME} cafPdmScripting_UnitTests.cpp gtest/gtest-all.cpp
|
||||
set(PROJECT_FILES cafPdmScripting_UnitTests.cpp gtest/gtest-all.cpp
|
||||
cafPdmScriptingBasicTest.cpp cafPdmFieldSerializationTest.cpp
|
||||
)
|
||||
|
||||
if(CEE_USE_QT6)
|
||||
qt_add_executable(${PROJECT_NAME} ${PROJECT_FILES})
|
||||
else()
|
||||
add_executable(${PROJECT_NAME} ${PROJECT_FILES})
|
||||
endif(CEE_USE_QT6)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
target_compile_options(
|
||||
cafPdmScripting_UnitTests PRIVATE -Wno-delete-abstract-non-virtual-dtor
|
||||
@ -29,7 +42,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
endif()
|
||||
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME} cafPdmScripting ${QT_LIBRARIES} ${THREAD_LIBRARY}
|
||||
${PROJECT_NAME} PRIVATE cafPdmScripting ${QT_LIBRARIES} ${THREAD_LIBRARY}
|
||||
)
|
||||
|
||||
source_group("" FILES ${PROJECT_FILES})
|
||||
@ -45,3 +58,18 @@ if(Qt5Core_FOUND)
|
||||
)
|
||||
endforeach(qtlib)
|
||||
endif(Qt5Core_FOUND)
|
||||
|
||||
# Install
|
||||
install(
|
||||
TARGETS ${PROJECT_NAME}
|
||||
BUNDLE DESTINATION .
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
|
||||
if(CEE_USE_QT6)
|
||||
qt_generate_deploy_app_script(
|
||||
TARGET ${PROJECT_NAME} OUTPUT_SCRIPT deploy_script
|
||||
NO_UNSUPPORTED_PLATFORM_ERROR NO_TRANSLATIONS
|
||||
)
|
||||
install(SCRIPT ${deploy_script})
|
||||
endif(CEE_USE_QT6)
|
||||
|
@ -7,12 +7,22 @@ if(CAF_ENABLE_UNITY_BUILD)
|
||||
endif()
|
||||
|
||||
# Qt
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
if(CEE_USE_QT6)
|
||||
find_package(
|
||||
Qt6
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets
|
||||
)
|
||||
set(QT_LIBRARIES Qt6::Core Qt6::Gui Qt6::Widgets)
|
||||
qt_standard_project_setup()
|
||||
else()
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
endif()
|
||||
|
||||
set(PROJECT_FILES
|
||||
cafFactory.h
|
||||
@ -33,7 +43,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(
|
||||
${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127"
|
||||
${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127 /wd4996"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -6,12 +6,22 @@ if(CAF_ENABLE_UNITY_BUILD)
|
||||
set(CMAKE_UNITY_BUILD true)
|
||||
endif()
|
||||
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core)
|
||||
if(CEE_USE_QT6)
|
||||
find_package(
|
||||
Qt6
|
||||
COMPONENTS
|
||||
REQUIRED Core
|
||||
)
|
||||
set(QT_LIBRARIES Qt6::Core)
|
||||
qt_standard_project_setup()
|
||||
else()
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core)
|
||||
endif()
|
||||
|
||||
set(PROJECT_FILES
|
||||
cafAssert.h
|
||||
|
@ -3,12 +3,21 @@ cmake_minimum_required(VERSION 3.15)
|
||||
project(cafPdmCore_UnitTests)
|
||||
|
||||
# Qt
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Widgets Qt5::Gui)
|
||||
if(CEE_USE_QT6)
|
||||
find_package(
|
||||
Qt6
|
||||
COMPONENTS
|
||||
REQUIRED Core Widgets Gui
|
||||
)
|
||||
qt_standard_project_setup()
|
||||
else()
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Widgets Qt5::Gui)
|
||||
endif()
|
||||
|
||||
if(MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.11))
|
||||
# VS 2017 : Disable warnings from from gtest code, using deprecated code
|
||||
@ -34,8 +43,11 @@ set(PROJECT_FILES
|
||||
TestObj.h
|
||||
)
|
||||
|
||||
# add the executable
|
||||
add_executable(${PROJECT_NAME} ${PROJECT_FILES})
|
||||
if(CEE_USE_QT6)
|
||||
qt_add_executable(${PROJECT_NAME} ${PROJECT_FILES})
|
||||
else()
|
||||
add_executable(${PROJECT_NAME} ${PROJECT_FILES})
|
||||
endif(CEE_USE_QT6)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
|
||||
@ -52,7 +64,7 @@ if(Qt5Core_FOUND)
|
||||
endif()
|
||||
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME} cafPdmCore ${QT_LIBRARIES} ${THREAD_LIBRARY}
|
||||
${PROJECT_NAME} PRIVATE cafPdmCore ${QT_LIBRARIES} ${THREAD_LIBRARY}
|
||||
)
|
||||
|
||||
# Copy Qt Dlls
|
||||
@ -64,3 +76,18 @@ foreach(qtlib ${QT_LIBRARIES})
|
||||
$<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||
)
|
||||
endforeach(qtlib)
|
||||
|
||||
# Install
|
||||
install(
|
||||
TARGETS ${PROJECT_NAME}
|
||||
BUNDLE DESTINATION .
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
|
||||
if(CEE_USE_QT6)
|
||||
qt_generate_deploy_app_script(
|
||||
TARGET ${PROJECT_NAME} OUTPUT_SCRIPT deploy_script
|
||||
NO_UNSUPPORTED_PLATFORM_ERROR NO_TRANSLATIONS
|
||||
)
|
||||
install(SCRIPT ${deploy_script})
|
||||
endif(CEE_USE_QT6)
|
||||
|
@ -12,13 +12,23 @@ set(MOC_HEADER_FILES cafPdmUiEditorHandle.h cafPdmUiFieldEditorHandle.h
|
||||
)
|
||||
|
||||
# Qt
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
|
||||
if(CEE_USE_QT6)
|
||||
find_package(
|
||||
Qt6
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets
|
||||
)
|
||||
set(QT_LIBRARIES Qt6::Core Qt6::Gui Qt6::Widgets)
|
||||
qt_standard_project_setup()
|
||||
else()
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
|
||||
endif()
|
||||
|
||||
add_definitions(-DCVF_USING_CMAKE)
|
||||
|
||||
|
@ -7,12 +7,22 @@ if(CAF_ENABLE_UNITY_BUILD)
|
||||
endif()
|
||||
|
||||
# Qt
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Xml
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Xml)
|
||||
if(CEE_USE_QT6)
|
||||
find_package(
|
||||
Qt6
|
||||
COMPONENTS
|
||||
REQUIRED Core Xml
|
||||
)
|
||||
set(QT_LIBRARIES Qt6::Core Qt6::Xml)
|
||||
qt_standard_project_setup()
|
||||
else()
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Xml
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Xml)
|
||||
endif()
|
||||
|
||||
set(PROJECT_FILES
|
||||
cafInternalPdmFieldIoHelper.cpp
|
||||
|
@ -2,12 +2,22 @@ cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
project(cafPdmXml_UnitTests)
|
||||
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Xml
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Xml)
|
||||
if(CEE_USE_QT6)
|
||||
find_package(
|
||||
Qt6
|
||||
COMPONENTS
|
||||
REQUIRED Core Xml
|
||||
)
|
||||
set(QT_LIBRARIES Qt6::Core Qt6::Xml)
|
||||
qt_standard_project_setup()
|
||||
else()
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Xml
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Xml)
|
||||
endif()
|
||||
|
||||
if(MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.11))
|
||||
# VS 2017 : Disable warnings from from gtest code, using deprecated code
|
||||
@ -18,23 +28,24 @@ endif()
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} # required for gtest-all.cpp
|
||||
)
|
||||
|
||||
# add the executable
|
||||
add_executable(
|
||||
${PROJECT_NAME}
|
||||
cafPdmXml_UnitTests.cpp gtest/gtest-all.cpp cafPdmXmlBasicTest.cpp
|
||||
cafPdmAdvancedTemplateTest.cpp cafPdmXmlNumberTest.cpp cafPdmPtrArrayTest.cpp
|
||||
set(PROJECT_FILES
|
||||
cafPdmXml_UnitTests.cpp gtest/gtest-all.cpp cafPdmXmlBasicTest.cpp
|
||||
cafPdmAdvancedTemplateTest.cpp cafPdmXmlNumberTest.cpp
|
||||
cafPdmPtrArrayTest.cpp
|
||||
)
|
||||
|
||||
if(Qt5Core_FOUND)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Xml)
|
||||
endif()
|
||||
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME} cafPdmXml ${QT_LIBRARIES} ${THREAD_LIBRARY}
|
||||
)
|
||||
if(CEE_USE_QT6)
|
||||
qt_add_executable(${PROJECT_NAME} ${PROJECT_FILES})
|
||||
else()
|
||||
add_executable(${PROJECT_NAME} ${PROJECT_FILES})
|
||||
endif(CEE_USE_QT6)
|
||||
|
||||
source_group("" FILES ${PROJECT_FILES})
|
||||
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME} PRIVATE cafPdmXml ${QT_LIBRARIES} ${THREAD_LIBRARY}
|
||||
)
|
||||
|
||||
# Copy Qt Dlls
|
||||
if(Qt5Core_FOUND)
|
||||
foreach(qtlib ${QT_LIBRARIES})
|
||||
@ -46,3 +57,18 @@ if(Qt5Core_FOUND)
|
||||
)
|
||||
endforeach(qtlib)
|
||||
endif(Qt5Core_FOUND)
|
||||
|
||||
# Install
|
||||
install(
|
||||
TARGETS ${PROJECT_NAME}
|
||||
BUNDLE DESTINATION .
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
|
||||
if(CEE_USE_QT6)
|
||||
qt_generate_deploy_app_script(
|
||||
TARGET ${PROJECT_NAME} OUTPUT_SCRIPT deploy_script
|
||||
NO_UNSUPPORTED_PLATFORM_ERROR NO_TRANSLATIONS
|
||||
)
|
||||
install(SCRIPT ${deploy_script})
|
||||
endif(CEE_USE_QT6)
|
||||
|
@ -3,12 +3,21 @@ cmake_minimum_required(VERSION 3.15)
|
||||
project(cafProjectDataModel_UnitTests)
|
||||
|
||||
# Qt
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Xml Gui
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Xml Qt5::Gui Qt5::Widgets)
|
||||
if(CEE_USE_QT6)
|
||||
find_package(
|
||||
Qt6
|
||||
COMPONENTS
|
||||
REQUIRED Core
|
||||
)
|
||||
qt_standard_project_setup()
|
||||
else()
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Xml Gui
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Xml Qt5::Gui)
|
||||
endif()
|
||||
|
||||
if(MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.11))
|
||||
# VS 2017 : Disable warnings from from gtest code, using deprecated code
|
||||
@ -19,12 +28,21 @@ endif()
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} # required for gtest-all.cpp
|
||||
)
|
||||
|
||||
set(PROJECT_FILES cafPdmBasicTest.cpp cafProjectDataModel_UnitTests.cpp
|
||||
Child.cpp Parent.cpp TestObj.cpp AggregatedTypesInField.cpp
|
||||
set(PROJECT_FILES
|
||||
cafPdmBasicTest.cpp
|
||||
cafProjectDataModel_UnitTests.cpp
|
||||
Child.cpp
|
||||
Parent.cpp
|
||||
TestObj.cpp
|
||||
AggregatedTypesInField.cpp
|
||||
gtest/gtest-all.cpp
|
||||
)
|
||||
|
||||
# add the executable
|
||||
add_executable(${PROJECT_NAME} ${PROJECT_FILES} gtest/gtest-all.cpp)
|
||||
if(CEE_USE_QT6)
|
||||
qt_add_executable(${PROJECT_NAME} ${PROJECT_FILES})
|
||||
else()
|
||||
add_executable(${PROJECT_NAME} ${PROJECT_FILES})
|
||||
endif(CEE_USE_QT6)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
target_compile_options(
|
||||
@ -34,7 +52,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
endif()
|
||||
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME} cafProjectDataModel ${QT_LIBRARIES} ${THREAD_LIBRARY}
|
||||
${PROJECT_NAME} PRIVATE cafProjectDataModel ${QT_LIBRARIES} ${THREAD_LIBRARY}
|
||||
)
|
||||
|
||||
source_group("" FILES ${PROJECT_FILES})
|
||||
@ -48,3 +66,18 @@ foreach(qtlib ${QT_LIBRARIES})
|
||||
$<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||
)
|
||||
endforeach(qtlib)
|
||||
|
||||
# Install
|
||||
install(
|
||||
TARGETS ${PROJECT_NAME}
|
||||
BUNDLE DESTINATION .
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
|
||||
if(CEE_USE_QT6)
|
||||
qt_generate_deploy_app_script(
|
||||
TARGET ${PROJECT_NAME} OUTPUT_SCRIPT deploy_script
|
||||
NO_UNSUPPORTED_PLATFORM_ERROR NO_TRANSLATIONS
|
||||
)
|
||||
install(SCRIPT ${deploy_script})
|
||||
endif(CEE_USE_QT6)
|
||||
|
@ -15,14 +15,24 @@ set(MOC_HEADER_FILES MainWindow.h WidgetLayoutTest.h CustomObjectEditor.h
|
||||
# Resource file
|
||||
set(QRC_FILES ${QRC_FILES} textedit.qrc)
|
||||
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets OpenGL
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
|
||||
qt5_add_resources(QRC_FILES_CPP ${QRC_FILES})
|
||||
if(CEE_USE_QT6)
|
||||
find_package(
|
||||
Qt6
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets OpenGL Svg
|
||||
)
|
||||
set(QT_LIBRARIES Qt6::Core Qt6::Gui Qt6::Widgets Qt6::OpenGL Qt6::Svg)
|
||||
qt_standard_project_setup()
|
||||
else()
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets OpenGL
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
|
||||
qt5_add_resources(QRC_FILES_CPP ${QRC_FILES})
|
||||
endif()
|
||||
|
||||
option(USE_COMMAND_FRAMEWORK "Use Caf Command Framework" ON)
|
||||
|
||||
@ -49,16 +59,28 @@ set(PROJECT_FILES
|
||||
LineEditAndPushButtons.cpp
|
||||
)
|
||||
|
||||
# add the executable
|
||||
add_executable(
|
||||
${PROJECT_NAME}
|
||||
${PROJECT_FILES}
|
||||
${MOC_SOURCE_FILES}
|
||||
${QRC_FILES_CPP}
|
||||
$<TARGET_OBJECTS:cafCommandFeatures> # Needed for cmake version < 3.12. Remove
|
||||
# when we can use target_link_libraries
|
||||
# with OBJECT libraries
|
||||
)
|
||||
if(CEE_USE_QT6)
|
||||
qt_add_executable(
|
||||
${PROJECT_NAME}
|
||||
${PROJECT_FILES}
|
||||
${MOC_SOURCE_FILES}
|
||||
${QRC_FILES_CPP}
|
||||
$<TARGET_OBJECTS:cafCommandFeatures> # Needed for cmake version < 3.12.
|
||||
# Remove
|
||||
# when we can use target_link_libraries with OBJECT libraries
|
||||
)
|
||||
else()
|
||||
add_executable(
|
||||
${PROJECT_NAME}
|
||||
${PROJECT_FILES}
|
||||
${MOC_SOURCE_FILES}
|
||||
${QRC_FILES_CPP}
|
||||
$<TARGET_OBJECTS:cafCommandFeatures> # Needed for cmake version < 3.12.
|
||||
# Remove when we can use
|
||||
# target_link_libraries with OBJECT
|
||||
# libraries
|
||||
)
|
||||
endif(CEE_USE_QT6)
|
||||
|
||||
set(TAP_LINK_LIBRARIES cafUserInterface)
|
||||
|
||||
@ -77,8 +99,8 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
endif()
|
||||
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME} ${TAP_LINK_LIBRARIES} ${QT_LIBRARIES}
|
||||
${EXTERNAL_LINK_LIBRARIES}
|
||||
${PROJECT_NAME} PRIVATE ${TAP_LINK_LIBRARIES} ${QT_LIBRARIES}
|
||||
${EXTERNAL_LINK_LIBRARIES}
|
||||
)
|
||||
|
||||
source_group("" FILES ${PROJECT_FILES})
|
||||
@ -91,3 +113,27 @@ foreach(qtlib ${QT_LIBRARIES})
|
||||
$<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||
)
|
||||
endforeach(qtlib)
|
||||
|
||||
# Install
|
||||
install(
|
||||
TARGETS ${PROJECT_NAME}
|
||||
BUNDLE DESTINATION .
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
|
||||
if(CEE_USE_QT6)
|
||||
qt_generate_deploy_app_script(
|
||||
TARGET ${PROJECT_NAME} OUTPUT_SCRIPT deploy_script
|
||||
NO_UNSUPPORTED_PLATFORM_ERROR NO_TRANSLATIONS
|
||||
)
|
||||
install(SCRIPT ${deploy_script})
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(CPACK_GENERATOR TGZ)
|
||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
set(CPACK_GENERATOR ZIP)
|
||||
endif()
|
||||
|
||||
include(CPack)
|
||||
|
||||
endif(CEE_USE_QT6)
|
||||
|
@ -8,14 +8,23 @@ set(MOC_HEADER_FILES MainWindow.h WidgetLayoutTest.h)
|
||||
# Resource file
|
||||
set(QRC_FILES textedit.qrc)
|
||||
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets OpenGL
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
|
||||
qt5_add_resources(QRC_FILES_CPP ${QRC_FILES})
|
||||
if(CEE_USE_QT6)
|
||||
find_package(
|
||||
Qt6
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets OpenGL Svg
|
||||
)
|
||||
set(QT_LIBRARIES Qt6::Core Qt6::Gui Qt6::Widgets Qt6::OpenGL Qt6::Svg)
|
||||
else()
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets OpenGL
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
|
||||
qt5_add_resources(QRC_FILES_CPP ${QRC_FILES})
|
||||
endif()
|
||||
|
||||
option(USE_COMMAND_FRAMEWORK "Use Caf Command Framework" ON)
|
||||
|
||||
|
@ -55,13 +55,23 @@ set(MOC_HEADER_FILES
|
||||
cafPdmUiValueRangeEditor.h
|
||||
)
|
||||
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets Svg
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Svg)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
|
||||
if(CEE_USE_QT6)
|
||||
find_package(
|
||||
Qt6
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets Svg
|
||||
)
|
||||
set(QT_LIBRARIES Qt6::Core Qt6::Gui Qt6::Widgets Qt6::Svg)
|
||||
qt_standard_project_setup()
|
||||
else()
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets Svg
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Svg)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
|
||||
endif()
|
||||
|
||||
set(PROJECT_FILES
|
||||
# field editors
|
||||
@ -184,7 +194,7 @@ add_library(
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(
|
||||
${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127"
|
||||
${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127 /wd4996"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -2,12 +2,22 @@ cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
project(cafUserInterface_UnitTests)
|
||||
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
|
||||
# Qt
|
||||
if(CEE_USE_QT6)
|
||||
find_package(
|
||||
Qt6
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets Svg
|
||||
)
|
||||
qt_standard_project_setup()
|
||||
else()
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS
|
||||
REQUIRED Core Gui Widgets OpenGL
|
||||
)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::OpenGL)
|
||||
endif()
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} # required for gtest-all.cpp
|
||||
)
|
||||
@ -16,13 +26,16 @@ set(PROJECT_FILES cafUserInterface_UnitTests.cpp cafPdmUiTreeViewModelTest.cpp
|
||||
cafPdmUiTreeSelectionQModelTest.cpp gtest/gtest-all.cpp
|
||||
)
|
||||
|
||||
# add the executable
|
||||
add_executable(${PROJECT_NAME} ${PROJECT_FILES})
|
||||
if(CEE_USE_QT6)
|
||||
qt_add_executable(${PROJECT_NAME} ${PROJECT_FILES})
|
||||
else()
|
||||
add_executable(${PROJECT_NAME} ${PROJECT_FILES})
|
||||
endif(CEE_USE_QT6)
|
||||
|
||||
source_group("" FILES ${PROJECT_FILES})
|
||||
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME} cafUserInterface ${QT_LIBRARIES} ${THREAD_LIBRARY}
|
||||
${PROJECT_NAME} PRIVATE cafUserInterface ${QT_LIBRARIES} ${THREAD_LIBRARY}
|
||||
)
|
||||
|
||||
# Copy Qt Dlls
|
||||
@ -34,3 +47,18 @@ foreach(qtlib ${QT_LIBRARIES})
|
||||
$<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||
)
|
||||
endforeach(qtlib)
|
||||
|
||||
# Install
|
||||
install(
|
||||
TARGETS ${PROJECT_NAME}
|
||||
BUNDLE DESTINATION .
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
|
||||
if(CEE_USE_QT6)
|
||||
qt_generate_deploy_app_script(
|
||||
TARGET ${PROJECT_NAME} OUTPUT_SCRIPT deploy_script
|
||||
NO_UNSUPPORTED_PLATFORM_ERROR NO_TRANSLATIONS
|
||||
)
|
||||
install(SCRIPT ${deploy_script})
|
||||
endif(CEE_USE_QT6)
|
||||
|
Loading…
Reference in New Issue
Block a user