File tree 7 files changed +49
-11
lines changed
python/rapids-logger/rapids_logger
7 files changed +49
-11
lines changed Original file line number Diff line number Diff line change 64
64
date : ${{ inputs.date }}
65
65
package-name : rapids_logger
66
66
package-type : cpp
67
+ static-build :
68
+ needs : style
69
+ secrets : inherit
70
+ uses :
rapidsai/shared-workflows/.github/workflows/[email protected]
71
+ with :
72
+ build_type : ${{ inputs.build_type || 'branch' }}
73
+ branch : ${{ inputs.branch }}
74
+ sha : ${{ inputs.sha }}
75
+ date : ${{ inputs.date }}
76
+ container_image : " rapidsai/ci-wheel:latest"
77
+ run_script : " ci/build_static.sh"
Original file line number Diff line number Diff line change 39
39
build_type : pull-request
40
40
matrix_filter : group_by(.ARCH) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
41
41
script : ci/build_wheel.sh
42
+ static-build :
43
+ needs : style
44
+ secrets : inherit
45
+ uses :
rapidsai/shared-workflows/.github/workflows/[email protected]
46
+ with :
47
+ build_type : pull-request
48
+ container_image : " rapidsai/ci-wheel:latest"
49
+ run_script : " ci/build_static.sh"
Original file line number Diff line number Diff line change @@ -33,15 +33,18 @@ rapids_cmake_build_type(Release)
33
33
34
34
rapids_cpm_init()
35
35
36
- option (RAPIDS_LOGGER_HIDE_ALL_SPDLOG_SYMBOLS
37
- "Build and link to spdlog in a way that maximizes all symbol hiding" ON
38
- )
39
36
option (BUILD_TESTS "Configure CMake to build tests" ON )
40
37
option (BUILD_SHARED_LIBS "Build shared libraries" ON )
41
38
42
39
include (CMakeDependentOption)
43
- # If we are hiding all spdlog symbols then we need to use the bundled fmt library, so this option
44
- # depends on what the above is set to.
40
+ # We cannot hide all spdlog symbols if we are building a static library.
41
+ cmake_dependent_option(
42
+ RAPIDS_LOGGER_HIDE_ALL_SPDLOG_SYMBOLS
43
+ "Build and link to spdlog in a way that maximizes all symbol hiding" ON "BUILD_SHARED_LIBS" OFF
44
+ )
45
+
46
+ # If we are hiding all spdlog symbols then we need to use the bundled fmt library, so this option is
47
+ # only configurable if we are not hiding those symbols.
45
48
cmake_dependent_option(
46
49
RAPIDS_LOGGER_FMT_OPTION "The fmt option to use when building spdlog." "EXTERNAL_FMT_HO"
47
50
"NOT RAPIDS_LOGGER_HIDE_ALL_SPDLOG_SYMBOLS" "BUNDLED"
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # Copyright (c) 2025, NVIDIA CORPORATION.
3
+
4
+ set -euo pipefail
5
+
6
+ source rapids-date-string
7
+
8
+ rapids-logger " Static cpp build"
9
+
10
+ cmake -S . -B build -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=ON
11
+ cmake --build build
12
+ ctest --test-dir build --output-on-failure
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- from rapids_logger ._version import __git_commit__ , __version__
15
+ from rapids_logger ._version import __version__
16
16
from rapids_logger .load import load_library
17
17
18
- __all__ = ["__git_commit__" , " __version__" , "load_library" ]
18
+ __all__ = ["__version__" , "load_library" ]
Original file line number Diff line number Diff line change @@ -48,16 +48,19 @@ function(add_cmake_test source_or_dir)
48
48
endforeach ()
49
49
endif ()
50
50
51
+ find_program (NINJA_EXECUTABLE ninja)
52
+ set (generator)
53
+ if (NOT "${NINJA_EXECUTABLE} " STREQUAL "NINJA_EXECUTABLE-NOTFOUND" )
54
+ set (generator "-GNinja" )
55
+ endif ()
56
+
51
57
set (build_dir "${CMAKE_CURRENT_BINARY_DIR} /${test_name} -build" )
52
58
add_test (
53
59
NAME ${test_name} _configure
54
60
COMMAND
55
61
${CMAKE_COMMAND} -S ${src_dir} -B ${build_dir}
56
62
# This function assumes _version is set in the calling file.
57
- -Drapids_logger_version=${_version}
58
- # Hardcoding Ninja to simplify things. Assumes Ninja is available when running tests, which is
59
- # not a very onerous requirement.
60
- -G Ninja ${extra_args}
63
+ -Drapids_logger_version=${_version} ${generator} ${extra_args}
61
64
)
62
65
63
66
add_test (NAME ${test_name} _build COMMAND ${CMAKE_COMMAND} --build ${build_dir} )
Original file line number Diff line number Diff line change @@ -30,3 +30,4 @@ target_include_directories(
30
30
generate_logger_macros PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR} /include>"
31
31
"$<INSTALL_INTERFACE:include>"
32
32
)
33
+ set_target_properties (generate_logger_macros PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON )
You can’t perform that action at this time.
0 commit comments