From 994e30a10fad48d3ddfb7f5aed9f9f8049a56645 Mon Sep 17 00:00:00 2001 From: Vanya Belyaev Date: Wed, 13 Nov 2024 14:50:48 +0100 Subject: [PATCH] more tweaks --- CMakeLists.txt | 23 ++++++++++++++++++++--- ostap/plotting/makestyles.py | 8 ++------ 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d5ba5d75..8a598959 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,8 +17,21 @@ if ( ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.15" ) ## https://cmake.org/cmake/help/latest/policy/CMP0094.html cmake_policy ( SET CMP0094 NEW ) endif() - - + + +if ( ${CMAKE_CXX_COMPILER_LAUNCHER} ) + message ( 'here-1' ) +else () + find_program(CCACHE_PROGRAM ccache) + message ( 'here-2' ${CCACHE_PROGRAM} ) + if(CCACHE_PROGRAM) + # Support Unix Makefiles and Ninja + ## set_property(GLOBAL PROPERTY CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") + set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_PROGRAM} ) + endif() +endif() + + project(ostap LANGUAGES CXX) include(CTest) @@ -38,11 +51,15 @@ set(OSTAP_PYTHON_SITE_DIR "") find_program(CMAKE_C_COMPILER NAMES $ENV{CC} gcc PATHS ENV PATH NO_DEFAULT_PATH) find_program(CMAKE_CXX_COMPILER NAMES $ENV{CXX} g++ PATHS ENV PATH NO_DEFAULT_PATH) + message ( "----> C-compiler : " $ENV{CC} ) message ( "----> C++-compiler : " $ENV{CXX} ) -message ( "----> C-compiler ID : " ${CMAKE_CXX_COMPILER_ID} ) +message ( "----> C-compiler ID : " ${CMAKE_C_COMPILER_ID} ) message ( "----> C++-compiler ID : " ${CMAKE_CXX_COMPILER_ID} ) +if ( CMAKE_CXX_COMPILER_LAUNCHER ) + message ( "----> c++-launcher : " ${CMAKE_CXX_COMPILER_LAUNCHER} ) +endif() # You need to tell CMake where to find the ROOT installation. This can be done in a number of ways: # - ROOT built with classic configure/make use the provided $ROOTSYS/etc/cmake/FindROOT.cmake # - ROOT built with CMake. Add in CMAKE_PREFIX_PATH the installation prefix for ROOT diff --git a/ostap/plotting/makestyles.py b/ostap/plotting/makestyles.py index a27602cb..7b5c0844 100644 --- a/ostap/plotting/makestyles.py +++ b/ostap/plotting/makestyles.py @@ -622,11 +622,8 @@ def make_styles ( config = None ) : logger.debug ( 'Create new generic style %s/%s' % ( name , description ) ) style = ROOT.TStyle ( name , description ) StyleStore.own_styles.update ( { name : style } ) - set_style ( style , section ) - - if name in StyleStore.styles : - logger.warning ( "The configuration %s replaced" % name ) - StyleStore.styles.update ( { name : style } ) + set_style ( style , section ) + StyleStore.styles.update ( { name : style } ) if name.startswith('Style') : nname = name[5:] @@ -944,7 +941,6 @@ def make_ostap_style ( name , logger.debug ( "Create new Ostap style `%s'" % name ) style = ROOT.TStyle ( name , description ) StyleStore.own_styles.update ( { name : style } ) - print ( 'CREATE NEW OSTAP STYLE', name ) StyleStore.styles.update ( { name : style } ) set_style ( style , conf , base_style = base_style )