Skip to content

Commit

Permalink
Drop build-system support for Qt4 and Python 2
Browse files Browse the repository at this point in the history
Also increase minimum CMake, GCC, and Clang versions to match
Ubuntu 18.04 LTS. This sets our minimum supported version of the C++
standard to C++17.
  • Loading branch information
chennes authored and wwmayer committed Mar 6, 2021
1 parent 0274b03 commit 13b9127
Show file tree
Hide file tree
Showing 8 changed files with 223 additions and 652 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# april 2020, the oldest we have to support : Ununtu 16.04 LTS (Xenial)
cmake_minimum_required(VERSION 3.5.1 FATAL_ERROR)
# March 2021, the oldest we have to support : Ununtu 18.04 LTS
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)

# policy CMP0072 was introduced with CMake 3.11
# relates to FindOpenGL module
Expand All @@ -17,8 +17,8 @@ project(FreeCAD)

set(PACKAGE_VERSION_NAME "Vulcan")
set(PACKAGE_VERSION_MAJOR "0")
set(PACKAGE_VERSION_MINOR "19")
set(PACKAGE_VERSION_PATCH "16100")
set(PACKAGE_VERSION_MINOR "20")
set(PACKAGE_VERSION_PATCH "0")
set(PACKAGE_VERSION_SUFFIX "dev") # either "dev" for development snapshot or "" (empty string)
set(FREECAD_VERSION_PATCH "0") # number of patch release (e.g. "4" for the 0.18.4 release)

Expand Down
101 changes: 0 additions & 101 deletions cMake/FindPySideTools.cmake

This file was deleted.

164 changes: 0 additions & 164 deletions cMake/FindWix.cmake

This file was deleted.

16 changes: 6 additions & 10 deletions cMake/FreeCAD_Helpers/CompilerChecksAndSetups.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,18 @@ macro(CompilerChecksAndSetups)
OUTPUT_VARIABLE CMAKE_CXX_COMPILER_VERSION)
endif(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION)

# Enabled C++11 for Freecad 0.17 and later
if (FREECAD_VERSION VERSION_GREATER 0.16)
set(BUILD_ENABLE_CXX_STD "C++11" CACHE STRING "Enable C++ standard")
# Enabled C++17 for Freecad 0.20 and later
set(BUILD_ENABLE_CXX_STD "C++17" CACHE STRING "Enable C++ standard")
set_property(CACHE BUILD_ENABLE_CXX_STD PROPERTY STRINGS
"C++11"
"C++14"
"C++17"
"C++20"
)

if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
message(FATAL_ERROR "FreeCAD 0.17 and later requires C++11. G++ must be 4.7 or later, the used version is ${CMAKE_CXX_COMPILER_VERSION}")
elseif(CMAKE_COMPILER_IS_CLANGXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.3)
message(FATAL_ERROR "FreeCAD 0.17 and later requires C++11. Clang must be 3.3 or later, the used version is ${CMAKE_CXX_COMPILER_VERSION}")
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.3)
message(FATAL_ERROR "FreeCAD 0.20 and later requires C++17. G++ must be 7.3 or later, the used version is ${CMAKE_CXX_COMPILER_VERSION}")
elseif(CMAKE_COMPILER_IS_CLANGXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
message(FATAL_ERROR "FreeCAD 0.20 and later requires C++17. Clang must be 6.0 or later, the used version is ${CMAKE_CXX_COMPILER_VERSION}")
endif()
endif(FREECAD_VERSION VERSION_GREATER 0.16)

# Escape the two plus chars as otherwise cmake complains about invalid regex
if(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+20")
Expand Down
12 changes: 1 addition & 11 deletions cMake/FreeCAD_Helpers/InitializeFreeCADBuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,8 @@ macro(InitializeFreeCADBuildOptions)
if (DEFINED ENV{FREECAD_LIBPACK_DIR})
set(FREECAD_LIBPACK_DIR $ENV{FREECAD_LIBPACK_DIR} CACHE PATH "Directory of the FreeCAD LibPack")
message(STATUS "Found libpack env variable: ${FREECAD_LIBPACK_DIR}")
if (EXISTS ${FREECAD_LIBPACK_DIR}/lib/Qt5Core.lib)
option(BUILD_QT5 "Build with Qt5." ON)
else()
option(BUILD_QT5 "Build with Qt5." OFF)
endif()
else()
set(FREECAD_LIBPACK_DIR ${CMAKE_SOURCE_DIR} CACHE PATH "Directory of the FreeCAD LibPack")
if (EXISTS ${FREECAD_LIBPACK_DIR}/lib/Qt5Core.lib)
option(BUILD_QT5 "Build with Qt5." ON)
else()
option(BUILD_QT5 "Build with Qt5." OFF)
endif()
endif()

set(LIBPACK_FOUND OFF )
Expand All @@ -68,10 +58,10 @@ macro(InitializeFreeCADBuildOptions)
message(STATUS "Visit: https://github.com/apeltauer/FreeCAD/releases/ for Windows libpack downloads.")
endif()
else(MSVC)
option(BUILD_QT5 "Build with Qt5." OFF)
option(FREECAD_LIBPACK_USE "Use the LibPack to Build FreeCAD (only Win32 so far)." OFF)
set(FREECAD_LIBPACK_DIR "" CACHE PATH "Directory of the FreeCAD LibPack")
endif(MSVC)
option(BUILD_QT5 "Build with Qt5." ON)

# https://blog.kitware.com/constraining-values-with-comboboxes-in-cmake-cmake-gui/
set(FREECAD_USE_OCC_VARIANT "Community Edition" CACHE STRING "Official OpenCASCADE version or community edition")
Expand Down
Loading

0 comments on commit 13b9127

Please sign in to comment.