diff --git a/src/libs/logging/CMakeLists.txt b/src/libs/logging/CMakeLists.txt index 0d93cd9d1..a7af395a3 100644 --- a/src/libs/logging/CMakeLists.txt +++ b/src/libs/logging/CMakeLists.txt @@ -2,7 +2,12 @@ # Project developers. See top-level LICENSE AND COPYRIGHT files for dates and # other details. No copyright assignment is required to contribute to Ascent. +# gen config header +configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/ascent_logging_config.h.in" + "${CMAKE_CURRENT_BINARY_DIR}/ascent_logging_config.h") + set(ascent_logging_headers + ${CMAKE_CURRENT_BINARY_DIR}/ascent_logging_config.h ascent_logging.hpp ascent_logging_timer.hpp ascent_annotations.hpp @@ -27,10 +32,11 @@ blt_add_library(NAME ascent_logging HEADERS ${aascent_logging_headers} DEPENDS_ON ${ascent_logging_deps}) +# for generated config header +target_include_directories(ascent_logging PUBLIC $) target_include_directories(ascent_logging PUBLIC $) # extra defs and props -target_compile_definitions(ascent_logging PUBLIC ASCENT_LOGGING_ENABLE_CALIPER) target_compile_definitions(ascent_logging PRIVATE ASCENT_EXPORTS_FLAG) if(ENABLE_HIDDEN_VISIBILITY) diff --git a/src/libs/logging/ascent_annotations.hpp b/src/libs/logging/ascent_annotations.hpp index 69dcd4743..cac2aa886 100644 --- a/src/libs/logging/ascent_annotations.hpp +++ b/src/libs/logging/ascent_annotations.hpp @@ -15,6 +15,7 @@ // -- ascent includes -- //----------------------------------------------------------------------------- #include +#include #include //----------------------------------------------------------------------------- diff --git a/src/libs/logging/ascent_logging.hpp b/src/libs/logging/ascent_logging.hpp index b3f61f3de..f4a4c1de8 100644 --- a/src/libs/logging/ascent_logging.hpp +++ b/src/libs/logging/ascent_logging.hpp @@ -13,6 +13,7 @@ #define ASCENT_LOGGING_HPP #include +#include #include #include diff --git a/src/libs/logging/ascent_logging_config.h.in b/src/libs/logging/ascent_logging_config.h.in new file mode 100644 index 000000000..b62710f74 --- /dev/null +++ b/src/libs/logging/ascent_logging_config.h.in @@ -0,0 +1,19 @@ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// +// Copyright (c) Lawrence Livermore National Security, LLC and other Ascent +// Project developers. See top-level LICENSE AND COPYRIGHT files for dates and +// other details. No copyright assignment is required to contribute to Ascent. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// + + +//----------------------------------------------------------------------------- +/// +/// file: ascent_logging_config.h +/// +//----------------------------------------------------------------------------- + +#ifndef ASCENT_LOGGING_CONFIG_H +#define ASCENT_LOGGING_CONFIG_H + +#cmakedefine ASCENT_LOGGING_CALIPER_ENABLED "@CALIPER_FOUND@" + +#endif