From 39a38cd353c3198387acafb29dfab175a5185f8f Mon Sep 17 00:00:00 2001 From: Valeriy Zainullin Date: Tue, 23 Apr 2024 05:12:29 +0300 Subject: [PATCH 1/2] Fix cmake_minimum_version deprecation warnings. The reason is that cmake plans to drop backward compatibility for cmake of version 3.5 in future realeases, so one of solutions is to bump minimum cmake version. To be precise, fixes this output. CMake Deprecation Warning at FactoryMethod/cpp-source/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake. Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions. Same descriptions excluded for conciseness. CMake Deprecation Warning at AbstractFactory/cpp-source/CMakeLists.txt:1 (cmake_minimum_required): CMake Deprecation Warning at AbstractFactory/cpp-source/serializers/CMakeLists.txt:1 (cmake_minimum_required): CMake Deprecation Warning at AbstractFactory/cpp-source/rooms/CMakeLists.txt:1 (cmake_minimum_required): CMake Deprecation Warning at AbstractFactory/cpp-source/factories/CMakeLists.txt:1 (cmake_minimum_required): CMake Deprecation Warning at Decorator/cpp-source/CMakeLists.txt:1 (cmake_minimum_required): CMake Deprecation Warning at Facade/cpp-source/CMakeLists.txt:1 (cmake_minimum_required): --- AbstractFactory/cpp-source/CMakeLists.txt | 4 ++-- AbstractFactory/cpp-source/factories/CMakeLists.txt | 2 +- AbstractFactory/cpp-source/rooms/CMakeLists.txt | 2 +- AbstractFactory/cpp-source/serializers/CMakeLists.txt | 2 +- CMakeLists.txt | 2 +- Decorator/cpp-source/CMakeLists.txt | 4 ++-- Facade/cpp-source/CMakeLists.txt | 2 +- FactoryMethod/cpp-source/CMakeLists.txt | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/AbstractFactory/cpp-source/CMakeLists.txt b/AbstractFactory/cpp-source/CMakeLists.txt index 0f8460f..966bc17 100644 --- a/AbstractFactory/cpp-source/CMakeLists.txt +++ b/AbstractFactory/cpp-source/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.5) project(IsaacAbstractFactory) add_executable(AbstractFactory main.cpp) @@ -13,4 +13,4 @@ target_link_libraries(AbstractFactory ${ADDITIONAL_LIBRARIES}) add_executable(AbstractFactorySerializer main_serializer.cpp ${SOURCES} ${HEADERS}) target_include_directories(AbstractFactorySerializer PRIVATE rooms serializers factories) -target_link_libraries(AbstractFactorySerializer ${ADDITIONAL_LIBRARIES}) \ No newline at end of file +target_link_libraries(AbstractFactorySerializer ${ADDITIONAL_LIBRARIES}) diff --git a/AbstractFactory/cpp-source/factories/CMakeLists.txt b/AbstractFactory/cpp-source/factories/CMakeLists.txt index 5a2d4fd..ac54a0a 100644 --- a/AbstractFactory/cpp-source/factories/CMakeLists.txt +++ b/AbstractFactory/cpp-source/factories/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.5) project(IsaacFactories) set(SOURCES BasementFactory.cpp CavesFactory.cpp RoomFactory.cpp) diff --git a/AbstractFactory/cpp-source/rooms/CMakeLists.txt b/AbstractFactory/cpp-source/rooms/CMakeLists.txt index d9c46f9..765fb99 100644 --- a/AbstractFactory/cpp-source/rooms/CMakeLists.txt +++ b/AbstractFactory/cpp-source/rooms/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.5) project(IsaacRooms) diff --git a/AbstractFactory/cpp-source/serializers/CMakeLists.txt b/AbstractFactory/cpp-source/serializers/CMakeLists.txt index 551ce1f..242aa47 100644 --- a/AbstractFactory/cpp-source/serializers/CMakeLists.txt +++ b/AbstractFactory/cpp-source/serializers/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.5) project(Serializers) set(SOURCES ../rooms/HardRoom.cpp ../rooms/NormalRoom.cpp ../rooms/Room.cpp RoomSerializer.cpp RoomSerializer.h GameSerializer.cpp GameSerializer.h) diff --git a/CMakeLists.txt b/CMakeLists.txt index e2e9ae0..9950211 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.5) option(ON_PI "Build on PI" OFF) diff --git a/Decorator/cpp-source/CMakeLists.txt b/Decorator/cpp-source/CMakeLists.txt index 28302d8..6a612f6 100644 --- a/Decorator/cpp-source/CMakeLists.txt +++ b/Decorator/cpp-source/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(Decorator) @@ -77,4 +77,4 @@ add_custom_target( copy_configs ALL DEPENDS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/configs/config.ini ) -add_dependencies(Decorator copy_configs) \ No newline at end of file +add_dependencies(Decorator copy_configs) diff --git a/Facade/cpp-source/CMakeLists.txt b/Facade/cpp-source/CMakeLists.txt index 0aefe1e..4c79b3b 100644 --- a/Facade/cpp-source/CMakeLists.txt +++ b/Facade/cpp-source/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(Facade) add_executable( diff --git a/FactoryMethod/cpp-source/CMakeLists.txt b/FactoryMethod/cpp-source/CMakeLists.txt index c7f1f39..7dd8e00 100644 --- a/FactoryMethod/cpp-source/CMakeLists.txt +++ b/FactoryMethod/cpp-source/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(FactoryMethod) set( From df8bb018ed748969f48e8a98917ebafe26b027de Mon Sep 17 00:00:00 2001 From: Valeriy Zainullin Date: Tue, 23 Apr 2024 05:20:08 +0300 Subject: [PATCH 2/2] Fix missing headers. --- Command/cpp-source/commands/Command.h | 1 + Memento/cpp-source/Memento.h | 1 + Observer/cpp-source/main.cpp | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Command/cpp-source/commands/Command.h b/Command/cpp-source/commands/Command.h index 746a734..e336cce 100644 --- a/Command/cpp-source/commands/Command.h +++ b/Command/cpp-source/commands/Command.h @@ -5,6 +5,7 @@ #pragma once #include +#include class Command { public: diff --git a/Memento/cpp-source/Memento.h b/Memento/cpp-source/Memento.h index 9d5e68d..ddd20fc 100644 --- a/Memento/cpp-source/Memento.h +++ b/Memento/cpp-source/Memento.h @@ -5,6 +5,7 @@ #pragma once #include +#include namespace memento { diff --git a/Observer/cpp-source/main.cpp b/Observer/cpp-source/main.cpp index 571431a..3bcc44a 100644 --- a/Observer/cpp-source/main.cpp +++ b/Observer/cpp-source/main.cpp @@ -6,6 +6,7 @@ #include #include #include +#include struct MessageStorage { std::queue messages; @@ -72,4 +73,4 @@ int main() { std::thread t2(ProcessMessages, std::ref(p1)); t1.join(); t2.join(); -} \ No newline at end of file +}