Skip to content
Open
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
28 changes: 28 additions & 0 deletions .github/workflows/linux-gcc-x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: linux-gcc-x64
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
cloud-ci:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: install-tools
run: |
sudo apt-get update
sudo apt-get install cmake ninja-build gcc-11 g++-11 qtbase5-dev qt5-qmake qttools5-dev qttools5-dev-tools libgl1-mesa-dev libboost-all-dev bison flex libfl-dev
- name: build
env:
CC: gcc-11
CXX: g++-11
TYPE: Release
run: |
$CC --version
$CXX --version
mkdir build && cd build
cmake -GNinja -DCMAKE_BUILD_TYPE=${TYPE} ..
cmake --build .
- name: test
run: cd build && ctest
49 changes: 35 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#==============================================================================
# Copyright (c) 2011-2013 Evgeny Proydakov <[email protected]>
# Copyright (c) 2025-2025 Evgeny Proydakov <[email protected]>
# Copyright (c) 2013-2014 Andrey Urusov <[email protected]>
#==============================================================================
# Welcome to the CMake build system for RDO STUDIO.
# This is the main file where we prepare the general build environment
# and provide build configuration options.
#==============================================================================

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7)
CMAKE_MINIMUM_REQUIRED(VERSION 3.20.0)
CMAKE_POLICY(SET CMP0020 NEW)
PROJECT(rdo)

Expand All @@ -31,11 +32,23 @@ IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Debug)
ENDIF()

IF(POLICY CMP0167)
CMAKE_POLICY(SET CMP0167 NEW)
ENDIF()

set(CMAKE_THREAD_LIBS_INIT "-lpthread")
set(CMAKE_HAVE_THREADS_LIBRARY 1)
set(CMAKE_USE_WIN32_THREADS_INIT 0)
set(CMAKE_USE_PTHREADS_INIT 1)
set(THREADS_PREFER_PTHREAD_FLAG ON)

ADD_DEFINITIONS(-DRDO_ST)
ADD_DEFINITIONS(-DRDO_LIMIT_RES)
ADD_DEFINITIONS(-DRDO_LICENSE_ACADEMIC)
ADD_DEFINITIONS(-DNOMINMAX)
ADD_DEFINITIONS(-DBOOST_SIGNALS_NO_DEPRECATION_WARNING)
ADD_DEFINITIONS(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)
ADD_DEFINITIONS(-DBOOST_NO_CXX11_SMART_PTR)

# work with cmake
SET(CMAKE_PREFIX_PATH $ENV{QTDIR}/lib/cmake)
Expand All @@ -45,6 +58,10 @@ SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
INCLUDE(FindOS)
INCLUDE(add.boost.test)

SET(CMAKE_CXX_STANDARD 14)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

IF(MSVC)
STRING(REGEX REPLACE /W[0-4] /W4 CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
Expand All @@ -53,7 +70,7 @@ IF(MSVC)
SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG")
SET(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /LTCG")
ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++0x")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
IF(MINGW)
ADD_DEFINITIONS(-Wno-unused-local-typedefs)
ELSE()
Expand Down Expand Up @@ -144,27 +161,31 @@ SET(GIT_RES_SHORT FALSE)
SET(GIT_FILE_VERSION_LONG "${CMAKE_CURRENT_BINARY_DIR}/git.version.long")
SET(GIT_FILE_VERSION_SHORT "${CMAKE_CURRENT_BINARY_DIR}/git.version.short")

EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} describe --tags WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} RESULT_VARIABLE ${GIT_RES_LONG} OUTPUT_FILE ${GIT_FILE_VERSION_LONG})
EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} describe --abbrev=0 --tags WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} RESULT_VARIABLE ${GIT_RES_SHORT} OUTPUT_FILE ${GIT_FILE_VERSION_SHORT})
# Похоже теги потерялись при переезде на github. Нужно доработать этот блок в будущем.

FILE(READ ${GIT_FILE_VERSION_LONG} READ_DATA_LONG)
STRING(REPLACE "\n" "" GIT_VERSION_LONG ${READ_DATA_LONG})
#EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} describe --tags WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} RESULT_VARIABLE ${GIT_RES_LONG} OUTPUT_FILE ${GIT_FILE_VERSION_LONG})
#EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} describe --abbrev=0 --tags WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} RESULT_VARIABLE ${GIT_RES_SHORT} OUTPUT_FILE ${GIT_FILE_VERSION_SHORT})

FILE(READ ${GIT_FILE_VERSION_SHORT} READ_DATA_SHORT)
STRING(REPLACE "\n" "" GIT_VERSION_SHORT ${READ_DATA_SHORT})
#FILE(READ ${GIT_FILE_VERSION_LONG} READ_DATA_LONG)
#STRING(REPLACE "\n" "" GIT_VERSION_LONG ${READ_DATA_LONG})

#FILE(READ ${GIT_FILE_VERSION_SHORT} READ_DATA_SHORT)
#STRING(REPLACE "\n" "" GIT_VERSION_SHORT ${READ_DATA_SHORT})

set(GIT_VERSION_LONG "v0.0.0_github")
set(GIT_VERSION_SHORT "v0.0.0_github")

MESSAGE(STATUS "rdo version : ${GIT_VERSION_LONG}")

STRING(LENGTH "${GIT_VERSION_LONG}" TEMP_LENGTH)
STRING(SUBSTRING "${GIT_VERSION_LONG}" 1 -1 GIT_VERSION_LONG_NUM)
#STRING(LENGTH "${GIT_VERSION_LONG}" TEMP_LENGTH)
#STRING(SUBSTRING "${GIT_VERSION_LONG}" 1 -1 GIT_VERSION_LONG_NUM)

STRING(LENGTH "${GIT_VERSION_SHORT}" TEMP_LENGTH)
STRING(SUBSTRING "${GIT_VERSION_SHORT}" 1 -1 GIT_VERSION_SHORT_NUM)
#STRING(LENGTH "${GIT_VERSION_SHORT}" TEMP_LENGTH)
#STRING(SUBSTRING "${GIT_VERSION_SHORT}" 1 -1 GIT_VERSION_SHORT_NUM)

SET(GIT_VERSION ${GIT_VERSION_SHORT})

#==============================================================================

SET(PROJECT_VERSION ${GIT_VERSION_SHORT})
SET(PROJECT_VERSION_LONG ${GIT_VERSION_LONG} )

Expand Down Expand Up @@ -306,4 +327,4 @@ SET(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}")
SET(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME_LOWER}_${PROJECT_VERSION}_${CMAKE_SYSTEM_PROCESSOR}")

INCLUDE(CPack)
INCLUDE(Documentation)
#INCLUDE(Documentation)
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// ----------------------------------------------------------------------- INCLUDES
#include "utils/src/common/warning_disable.h"
#include "utils/src/common/warning_enable.h"
#include <QStyle>
// ----------------------------------------------------------------------- SYNOPSIS
#include "app/rdo_studio/plugins/game5/src/plugin_game5_graph_node_info_dialog.h"
// --------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "utils/src/common/warning_disable.h"
#include <vector>
#include "utils/src/common/warning_enable.h"
#include <QRegExpValidator>
// ----------------------------------------------------------------------- SYNOPSIS
#include "app/rdo_studio/plugins/game5/src/plugin_game5_tiles_order_dialog.h"
// --------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions app/rdo_studio/src/dialog/goto_line_dialog.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// ---------------------------------------------------------------------------- PCH
#include "app/rdo_studio/pch/application_pch.h"
// ----------------------------------------------------------------------- INCLUDES
#include <QIntValidator>
// ----------------------------------------------------------------------- SYNOPSIS
#include "app/rdo_studio/src/dialog/goto_line_dialog.h"
// --------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion app/rdo_studio/src/main_window.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Q_OBJECT
void removeLastSubWindow();
};

std::auto_ptr<SubWindowToAction> m_subWindowToAction;
std::unique_ptr<SubWindowToAction> m_subWindowToAction;
int m_updateTimerID;
LPStatusBar m_pStatusBar;
ReopenList m_reopenList;
Expand Down
1 change: 1 addition & 0 deletions app/rdo_studio/src/tracer/chart/chart_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <QProcess>
#include <QEvent>
#include <QClipboard>
#include <QPainterPath>
#include "utils/src/common/warning_enable.h"
// ----------------------------------------------------------------------- SYNOPSIS
#include "app/rdo_studio/src/tracer/chart/chart_view.h"
Expand Down
1 change: 1 addition & 0 deletions app/rdo_studio/src/tracer/tracer_serie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// ----------------------------------------------------------------------- INCLUDES
#include <algorithm>
#include <boost/bind.hpp>
#include <QPainterPath>
// ----------------------------------------------------------------------- SYNOPSIS
#include "app/rdo_studio/src/tracer/tracer_serie.h"
#include "app/rdo_studio/src/tracer/tracer_values.h"
Expand Down
2 changes: 1 addition & 1 deletion converter/smr2rdox/rdoparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ RDOParserModel::Result RDOParserModel::convert(const boost::filesystem::path& sm
RDOParserSMRInfo::FileList fileList;
boost::filesystem::path modelName;
{
std::auto_ptr<RDOParserSMRInfo> pSMRParser(new RDOParserSMRInfo());
std::unique_ptr<RDOParserSMRInfo> pSMRParser(new RDOParserSMRInfo());

try
{
Expand Down
2 changes: 1 addition & 1 deletion converter/smr2rdox/rdorss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ rdo::runtime::LPRDOCalc RDORSSResource::createCalc() const
// --------------------------------------------------------------------------------
// -------------------- RDOPROCResource
// --------------------------------------------------------------------------------
RDOPROCResource::RDOPROCResource(Converter* pParser, const RDOParserSrcInfo& src_info, const LPRDORTPResType& pResType, int id)
RDOPROCResource::RDOPROCResource(Converter* pParser, const RDOParserSrcInfo& src_info, const LPRDORTPResType& pResType, std::size_t id)
: RDORSSResource(pParser, src_info, pResType, id)
{}

Expand Down
2 changes: 1 addition & 1 deletion converter/smr2rdox/rdorss.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class RDOPROCResource: public RDORSSResource
{
DECLARE_FACTORY(RDOPROCResource);
private:
RDOPROCResource(Converter* pParser, const RDOParserSrcInfo& src_info, const LPRDORTPResType& pResType, int id = UNDEFINED_ID);
RDOPROCResource(Converter* pParser, const RDOParserSrcInfo& src_info, const LPRDORTPResType& pResType, std::size_t id = UNDEFINED_ID);
virtual rdo::runtime::LPRDOCalc createCalc() const;
};
DECLARE_POINTER(RDOPROCResource);
Expand Down
2 changes: 1 addition & 1 deletion simulator/runtime/calc/operation/calc_binary.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ friend class rdo::Factory<RDOCalcBinary<F, CalcType>>;
public:
enum class Type
{
calc_type = CalcType
calc_type = static_cast<int>(CalcType)
};
typedef F caller_type;

Expand Down
3 changes: 1 addition & 2 deletions simulator/runtime/test/calc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,10 @@ BOOST_AUTO_TEST_CASE(RDOCalc_SpeedTest)

{
using namespace boost::unit_test;
log_level logLevelBackup = runtime_config::log_level();
log_level logLevelBackup = runtime_config::get<log_level>(runtime_config::btrt_log_level);
unit_test_log.set_threshold_level(log_messages);

BOOST_TEST_MESSAGE("RDOCalc_SpeedTest: " << seconds);

unit_test_log.set_threshold_level(logLevelBackup);
}
}
Expand Down
7 changes: 2 additions & 5 deletions ui/abstract/headers/memdc/memdc.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,10 @@ namespace rdo
TBMP& buffer();

private:
#ifdef BOOST_NO_CXX11_SMART_PTR
std::auto_ptr<TDC> m_pDC;
std::auto_ptr<TBMP> m_pBitmap;
#else
std::unique_ptr<TDC> m_pDC;
std::unique_ptr<TBMP> m_pBitmap;
#endif

private:
bool onCreate();

void clear();
Expand Down
5 changes: 1 addition & 4 deletions ui/qt/headers/memdc/memdc.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,8 @@ namespace rdo
if (width == m_width && height == m_height)
return true;

#ifdef BOOST_NO_CXX11_SMART_PTR
typedef std::auto_ptr<QPixmap> QPixmapPointer;
#else
typedef std::unique_ptr<QPixmap> QPixmapPointer;
#endif

QPixmapPointer pPrevBitmap;
std::swap(pPrevBitmap, m_pBitmap);

Expand Down
2 changes: 1 addition & 1 deletion utils/test/animation/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ BOOST_AUTO_TEST_CASE(RDOCommonAnimationActiveElement)

BOOST_AUTO_TEST_CASE(RDOCommonAnimationNullElement)
{
std::auto_ptr<rdo::animation::NullElement> nullElem(new rdo::animation::NullElement);
std::unique_ptr<rdo::animation::NullElement> nullElem(new rdo::animation::NullElement);
BOOST_CHECK(nullElem.get());
}

Expand Down