Skip to content
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
1 change: 0 additions & 1 deletion .github/workflows/root-ci-config/buildconfig/alma8.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CMAKE_CXX_STANDARD=14
CMAKE_CXX_STANDARD=17
root7=OFF
19 changes: 12 additions & 7 deletions cmake/modules/CheckCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,15 @@ else()
OUTPUT_VARIABLE CXX_STANDARD_STRING
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
# if the above command fails to set the variable for any reason, let's default to 2011 with a warning
# if the above command fails to set the variable for any reason, let's default to 2017 with a warning
if (NOT CXX_STANDARD_STRING)
message(WARNING "Could not detect the default C++ standard in use by the detected compiler (${CMAKE_CXX_COMPILER}). Falling back to C++14 as a default, can be overridden by setting CMAKE_CXX_STANDARD.")
set(CXX_STANDARD_STRING 2014)
message(WARNING "Could not detect the default C++ standard in use by the detected compiler (${CMAKE_CXX_COMPILER}). Falling back to C++17 as a default, can be overridden by setting CMAKE_CXX_STANDARD.")
set(CXX_STANDARD_STRING 2017)
endif()
# If the native compiler defaults to a C++ standard lower than 17, overwrite the default value
if (NOT ${CXX_STANDARD_STRING} STRGREATER "201402L")
message(STATUS "The default C++ standard in use by the detected compiler (${CMAKE_CXX_COMPILER}) is lower than C++17. Setting C++17 as the minimum standard.")
set(CXX_STANDARD_STRING 2017)
endif()
endif()
# Lexicographically compare the value of __cplusplus (e.g. "201703L" for C++17) to figure out
Expand All @@ -140,8 +145,8 @@ if (${CXX_STANDARD_STRING} STRGREATER "201703L")
elseif(${CXX_STANDARD_STRING} STRGREATER "201402L")
set(CXX_STANDARD_STRING 17 CACHE STRING "")
else()
# We stick to C++14 as a minimum value
set(CXX_STANDARD_STRING 14 CACHE STRING "")
# We stick to C++17 as a minimum value
set(CXX_STANDARD_STRING 17 CACHE STRING "")
endif()
set(CMAKE_CXX_STANDARD ${CXX_STANDARD_STRING} CACHE STRING "")
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
Expand All @@ -164,8 +169,8 @@ if(cxx11 OR cxx14 OR cxx17)
unset(cxx11 CACHE)
endif()

if(NOT CMAKE_CXX_STANDARD MATCHES "14|17|20")
message(FATAL_ERROR "Unsupported C++ standard: ${CMAKE_CXX_STANDARD}")
if(NOT CMAKE_CXX_STANDARD MATCHES "17|20")
message(FATAL_ERROR "Unsupported C++ standard: ${CMAKE_CXX_STANDARD}. Supported standards are: 17, 20.")
endif()

# needed by roottest, to be removed once roottest is fixed
Expand Down
23 changes: 0 additions & 23 deletions cmake/modules/RootBuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,6 @@ foreach(opt ${root_build_options})
endif()
endforeach()

#---ROOT 7 requires C++17 standard or higher---------------------------------------------------
if(NOT CMAKE_CXX_STANDARD GREATER 14)
set(root7_defvalue OFF)
endif()

#---webgui by default always build together with root7-----------------------------------------
set(webgui_defvalue ${root7_defvalue})

Expand All @@ -396,24 +391,6 @@ if (NOT builtin_cling)
endif()
endif(NOT builtin_cling)

if(root7)
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++17 standard used with root7")
message(STATUS "Enabling C++17 for compilation of root7 components")
elseif(NOT CMAKE_CXX_STANDARD GREATER 14)
message(FATAL_ERROR ">>> At least C++17 standard required with root7, please enable it using CMake option: -DCMAKE_CXX_STANDARD=17")
endif()
endif()

#---check if webgui can be built-------------------------------
if(webgui)
if(NOT CMAKE_CXX_STANDARD GREATER 11)
set(webgui OFF CACHE BOOL "(WebGUI requires at least C++14)" FORCE)
elseif(NOT http)
set(http ON CACHE BOOL "(Enabled since it's needed by webgui)" FORCE)
endif()
endif()

if(NOT webgui)
set(qt5web OFF CACHE BOOL "Disabled because webgui not build" FORCE)
set(qt6web OFF CACHE BOOL "Disabled because webgui not build" FORCE)
Expand Down
8 changes: 4 additions & 4 deletions core/foundation/inc/ROOT/RConfig.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
# define R__NULLPTR
# endif
#else
# if defined(__cplusplus) && (__cplusplus < 201402L)
# error "ROOT requires support for C++14 or higher."
#if defined(__cplusplus) && (__cplusplus < 201703L)
#error "ROOT requires support for C++17 or higher."
# if defined(__GNUC__) || defined(__clang__)
# error "Pass `-std=c++14` as compiler argument."
#error "Pass `-std=c++17` as compiler argument."
# endif
# endif
#endif
Expand Down Expand Up @@ -380,7 +380,7 @@
# define R__OLDHPACC
# define R__TEMPLATE_OVERLOAD_BUG
# define R__GLOBALSTL /* STL in global name space */
# error "ROOT requires proper support for C++11 or higher"
#error "ROOT requires proper support for C++17 or higher"
# else
# define R__PLACEMENTDELETE /* supports overloading placement delete */
# define R__TMPLTSTREAM /* std::iostream implemented with templates */
Expand Down
4 changes: 1 addition & 3 deletions core/meta/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

ROOT_ADD_GTEST(testStatusBitsChecker testStatusBitsChecker.cxx LIBRARIES Core)
ROOT_ADD_GTEST(testHashRecursiveRemove testHashRecursiveRemove.cxx LIBRARIES Core)
if(NOT MSVC OR win_broken_tests OR CMAKE_CXX_STANDARD GREATER 14)
ROOT_ADD_GTEST(testTClass testTClass.cxx LIBRARIES Core)
endif()
ROOT_ADD_GTEST(testTClass testTClass.cxx LIBRARIES Core)
ROOT_ADD_GTEST(testTDataType testTDataType.cxx LIBRARIES Core)
ROOT_ADD_GTEST(testTEnum testTEnum.cxx LIBRARIES Core)
configure_file(stlDictCheck.h . COPYONLY)
Expand Down
12 changes: 6 additions & 6 deletions core/metacling/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ if(MSVC)
__std_find_trivial_8
)
endif()
if(CMAKE_CXX_STANDARD GREATER 14)
set(cling_exports ${cling_exports}
_Smtx_lock_shared
_Smtx_unlock_shared
)
endif()

set(cling_exports ${cling_exports}
_Smtx_lock_shared
_Smtx_unlock_shared
)

if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(cling_exports ${cling_exports}
??2@YAPEAX_K@Z
Expand Down
14 changes: 5 additions & 9 deletions tutorials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,11 @@ elseif(MSVC AND NOT win_broken_tests)
list(APPEND dataframe_veto dataframe/df016_vecOps.py)
list(APPEND dataframe_veto dataframe/df017_vecOpsHEP.py)
endif()
if(CMAKE_CXX_STANDARD GREATER 14)
list(APPEND dataframe_veto dataframe/df032_RDFFromNumpy.py)
list(APPEND dataframe_veto dataframe/df033_Describe.py)
else()
list(APPEND dataframe_veto dataframe/*.py)
endif()

# Why do we need to veto these tutorials on Windows with C++17?
list(APPEND dataframe_veto dataframe/df032_RDFFromNumpy.py)
list(APPEND dataframe_veto dataframe/df033_Describe.py)

endif()

if(NOT sqlite)
Expand Down Expand Up @@ -150,9 +149,6 @@ if(NOT ROOT_roofit_FOUND)
else()
if(MSVC AND NOT win_broken_tests)
set(roofit_veto roofit/rf401_importttreethx.py roofit/rf708_bphysics.py roofit/rf501_simultaneouspdf.py)
if(CMAKE_CXX_STANDARD LESS 17)
list(APPEND roofit_veto roofit/rf408_RDataFrameToRooFit.py)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
list(APPEND roofit_veto roofit/rf409_NumPyPandasToRooFit.py)
endif()
Expand Down
11 changes: 6 additions & 5 deletions tutorials/v7/global_temperatures.cxx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/// \file
/// \ingroup tutorial_v7
///
/// This ROOT 7 example demonstrates how to use RNTuple in combination with ROOT 6 features like RDataframe and visualizations.
/// It ingests climate data and creates a model with fields like AverageTemperature. Then it uses RDataframe to process and filter the climate data for
/// average temperature per city by season. Then it does the same for average temperature per city for the years between 1993-2002, and 2003-2013.
/// Finally, the tutorial visualizes this processed data through histograms.
/// This ROOT 7 example demonstrates how to use RNTuple in combination with ROOT 6 features like RDataframe and
/// visualizations. It ingests climate data and creates a model with fields like AverageTemperature. Then it uses
/// RDataframe to process and filter the climate data for average temperature per city by season. Then it does the same
/// for average temperature per city for the years between 1993-2002, and 2003-2013. Finally, the tutorial visualizes
/// this processed data through histograms.
///
/// TODO(jblomer): re-enable once issues are fixed (\macro_image (rcanvas_js))
/// \macro_code
Expand All @@ -17,7 +18,7 @@
/// \warning The RNTuple classes are experimental at this point.
/// Functionality, interface, and data format is still subject to changes.
/// Do not use for real data! During ROOT setup, configure the following flags:
/// `-DCMAKE_CXX_STANDARD=14 -Droot7=ON -Dwebgui=ON`
/// `-DCMAKE_CXX_STANDARD=17 -Droot7=ON -Dwebgui=ON`
///
/// \date 2021-02-26
/// \author John Yoon
Expand Down
2 changes: 1 addition & 1 deletion tutorials/webgui/qtweb/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Compile ROOT with qt5web support in Release mode:
cd C:\
mkdir root
cd C:\root
cmake -G"Visual Studio 16 2019" -A Win32 -Thost=x64 c:\git\root -Droot7=ON -DCMAKE_CXX_STANDARD=14 -Dwebgui=ON -Dqt5web=ON
cmake -G"Visual Studio 16 2019" -A Win32 -Thost=x64 c:\git\root -Droot7=ON -DCMAKE_CXX_STANDARD=17 -Dwebgui=ON -Dqt5web=ON
cmake --build . --config Release -- /maxcpucount

Configure ROOT, create build directory and build qt5web tutorial:
Expand Down