Skip to content

Commit 6fc9791

Browse files
authored
Bring in multiple hot patches for the library into main (#15)
* Remove not_null (not used anymore) * Bring version 0.1.1 into main (#12) (#13) * Add support for builtin detection * Update comments to be more eye catching * Add clang-cl and apple clang support * Fix bug with MSVC where not checking for nan * Remove msvc specific code in favor of generic approach * Prepare for 0.1.0 release. * Add doxygen docs * Finalize min/max * Add todo for later work on remquo * Cleanup main for 0.1.0 release * Bring standard back to C++17 * Minor cleanup to cmake list * Prep files for v0.1.0 release * Prepare for 0.1.0 release. * Add doxygen docs * Finalize min/max * Add todo for later work on remquo * Cleanup main for 0.1.0 release * Bring standard back to C++17 * Minor cleanup to cmake list * Prep files for v0.1.0 release * Bring everything in * Remove artifacts that mistakenly got pushed to main * Implement isgreater * Implement isgreaterequal * Implement isless * Implement islessequal * Implement islessgreater * Implement isnormal * Implement isunordered * Add test cases for all new compare functions * Add boilerplate code for future unit tests * Update progress * A lot of work done so far on log * log now far more efficient and accurate * Update readme progress * Continue work on log for double * remove unnecessary include * remove msvc section of unlikely * improve variable names * remove old log impl * Cleanup double implementation of log * cleanup of log details and add more comments. * Finalize work on log function * Update current progress * Fix bug with ±0 in log * Update test cases to cover all major edge cases * Move to correct folder * Add headers for log and log2 * Remove dependency on Threads * Initial addition of Contribution Guide * Cleanup README and add extra information * Update project version to v0.1.1 * Add top12 bits function for upcoming work * Finalize work with log function * Initial working revision of log2 * Push current work. Need to revise log2 to resolve bugs later. * Initial implementation of lerp * Fix scope bug * remove the direct use of cmath. * Update include to use cfloat instead of float.h * Cleanup macros and fix minor bugs * Fix bug where we were improperly assigning a correct value to the wrong variable * Update docs to mention not accounting for big-endian * Add comment to mention we are mirroring impl from cmath * Remove MSVC fallback that was inconsistent with every other impl * Add additional helpers for future work * Add test for static_assert support and some additional tests * Finalize implementation of log2 * Remove static_assert for now * Update README.md * Bring version 0.1.1 into main (#12) (#14) * Add support for builtin detection * Update comments to be more eye catching * Add clang-cl and apple clang support * Fix bug with MSVC where not checking for nan * Remove msvc specific code in favor of generic approach * Prepare for 0.1.0 release. * Add doxygen docs * Finalize min/max * Add todo for later work on remquo * Cleanup main for 0.1.0 release * Bring standard back to C++17 * Minor cleanup to cmake list * Prep files for v0.1.0 release * Prepare for 0.1.0 release. * Add doxygen docs * Finalize min/max * Add todo for later work on remquo * Cleanup main for 0.1.0 release * Bring standard back to C++17 * Minor cleanup to cmake list * Prep files for v0.1.0 release * Bring everything in * Remove artifacts that mistakenly got pushed to main * Implement isgreater * Implement isgreaterequal * Implement isless * Implement islessequal * Implement islessgreater * Implement isnormal * Implement isunordered * Add test cases for all new compare functions * Add boilerplate code for future unit tests * Update progress * A lot of work done so far on log * log now far more efficient and accurate * Update readme progress * Continue work on log for double * remove unnecessary include * remove msvc section of unlikely * improve variable names * remove old log impl * Cleanup double implementation of log * cleanup of log details and add more comments. * Finalize work on log function * Update current progress * Fix bug with ±0 in log * Update test cases to cover all major edge cases * Move to correct folder * Add headers for log and log2 * Remove dependency on Threads * Initial addition of Contribution Guide * Cleanup README and add extra information * Update project version to v0.1.1 * Add top12 bits function for upcoming work * Finalize work with log function * Initial working revision of log2 * Push current work. Need to revise log2 to resolve bugs later. * Initial implementation of lerp * Fix scope bug * remove the direct use of cmath. * Update include to use cfloat instead of float.h * Cleanup macros and fix minor bugs * Fix bug where we were improperly assigning a correct value to the wrong variable * Update docs to mention not accounting for big-endian * Add comment to mention we are mirroring impl from cmath * Remove MSVC fallback that was inconsistent with every other impl * Add additional helpers for future work * Add test for static_assert support and some additional tests * Finalize implementation of log2 * Remove static_assert for now * Update README.md * Update bullet points for features of library * Remove unused helpers * add float_t and double_t to monolithic header * Cleanup and minor adjustments * Update sources to remove deleted headers * Fix ambiguity bug between float and integer * Fix ambiguity issues * Implement basic benchmarking for log and log2 * Update all test suite to use the monolithic header instead of function specific header. * Setup some basic benchmark suites for log and abs * Minor cleanup * Add first class support for Intel DPC++ * Fix small bug with compiler identification * Add first class support to Nvidia HPC C++ * Having internal issues with detection of NVidia HPC C++. Removing specific section for now * Add support for Nvidia HPC and remove use of enums. * Fix minor bug with NVHPC * Re-enable static_assert for fpclassify and verify it works with CI * Re-enable static_assert for fpclassify and verify it works with CI * Add extra comment to static_assert
1 parent 025db73 commit 6fc9791

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+401
-983
lines changed

CMakeLists.txt

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
cmake_minimum_required(VERSION 3.18)
22

3-
enable_language(CXX)
4-
53
set(CCMATH_BUILD_VERSION 0.1.1)
64
set(INTERNAL_PROJ_DEFAULT_NAME ccmath)
75

@@ -33,6 +31,12 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL Clang OR CMAKE_CXX_COMPILER_ID STREQUAL GNU)
3331
target_compile_options(${PROJECT_NAME}-compile-options INTERFACE
3432
-Wall -Wextra -Wpedantic -Wconversion -Werror=return-type
3533
)
34+
# TODO: Remove this later.
35+
# Some variables have been provided but are not currently being used, but it would not atm make sense to remove them.
36+
# So to clean up the warnings we are just silencing these specific cases.
37+
target_compile_options(${PROJECT_NAME}-compile-options INTERFACE
38+
-Wno-unused-but-set-variable -Wno-unused-value
39+
)
3640
endif()
3741

3842
if(CMAKE_CXX_COMPILER_ID STREQUAL MSVC)
@@ -58,16 +62,18 @@ target_link_libraries(${PROJECT_NAME} INTERFACE
5862
)
5963

6064

61-
62-
6365
configure_file(cmake/version.hpp.in "${CMAKE_CURRENT_BINARY_DIR}/include/${PROJECT_NAME}/version.hpp" @ONLY)
6466

67+
if (CCMATH_BUILD_EXAMPLES OR CCMATH_BUILD_BENCHMARKS OR CCMATH_BUILD_TEST)
68+
add_subdirectory(ext)
69+
endif()
70+
6571
if (CCMATH_BUILD_EXAMPLES)
6672
add_subdirectory(example)
6773
endif()
6874

69-
if (CCMATH_BUILD_EXAMPLES OR CCMATH_BUILD_BENCHMARKS OR CCMATH_BUILD_TEST)
70-
add_subdirectory(ext)
75+
if (CCMATH_BUILD_BENCHMARKS)
76+
add_subdirectory(benchmark)
7177
endif()
7278

7379
if (CCMATH_BUILD_TEST)
@@ -77,7 +83,7 @@ endif()
7783

7884
if (CCMATH_USE_SIMD)
7985
# TODO: Add a better way to handle enabling simd internally.
80-
add_compile_definitions(INTERNAL_ENABLE_CHECK_FOR_SIMD)
86+
add_compile_definitions(INTERNAL_CCMATH_ENABLE_CHECK_FOR_SIMD)
8187
endif ()
8288

8389

CMakePresets.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,26 @@
2525
"CMAKE_CXX_COMPILER": "clang++"
2626
}
2727
},
28+
{
29+
"name": "ninja-intel",
30+
"description": "Build configuration using Ninja Multi-config / clang",
31+
"inherits": "default",
32+
"binaryDir": "${sourceDir}/out/intel",
33+
"cacheVariables": {
34+
"CMAKE_C_COMPILER": "icx",
35+
"CMAKE_CXX_COMPILER": "icx"
36+
}
37+
},
38+
{
39+
"name": "ninja-nvidia-hpc",
40+
"description": "Build configuration using Ninja Multi-config / clang",
41+
"inherits": "default",
42+
"binaryDir": "${sourceDir}/out/nvidia-hpc",
43+
"cacheVariables": {
44+
"CMAKE_C_COMPILER": "nvc",
45+
"CMAKE_CXX_COMPILER": "nvc++"
46+
}
47+
},
2848
{
2949
"name": "ninja-ubsan",
3050
"description": "UBSan build configuration using Ninja Multi-config",

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ ccmath is a C++17 library that provides a re-implementation of the standard `<cm
44

55
## Features
66

7-
- **Full constexpr Compatibility**: All functions provided by ccmath are implemented as `constexpr`, allowing them to be evaluated at compile time when used with constant expressions.
7+
- **Full constexpr Compatibility**: All functions provided by ccmath are implemented as `constexpr` along with an active effort made to ensure all functions work within `static_assert`. The primary goal is to ensure every function can be evaluated at compile time.
88

9-
- **Standard Math Functions**: ccmath provides a comprehensive set of mathematical functions similar to those in the standard `<cmath>` library, including trigonometric, exponential, logarithmic, and other common mathematical operations. If `<cmath>` has it then it is likely ccmath has implemented it.
9+
- **Dropin Replacement for Standard Math Library**: ccmath provides a comprehensive set of mathematical functions that are 1:1 compatible with the C++ standard library `<cmath>`. The goal of ccmath is to effectively be a drop in replacement for `<cmath>` with little to no discernable difference between the two. This includes trigonometric, exponential, logarithmic, and other common mathematical operations. If `<cmath>` has it then it is likely ccmath has implemented it.
1010

11-
- **Performance Optimization**: By leveraging constexpr, ccmath aims to optimize performance by computing mathematical expressions at compile time when possible, reducing runtime overhead.
11+
- **Performance Optimization**: Past all of the functions being able to be evaluated at compile time, ccmath was also built with speed in mind. We strive to have speeds nearly as fast as the standards implementation.
1212

1313
- **No External Dependencies**: ccmath has no external dependencies and only requires a C++17-compliant compiler.
1414

@@ -33,7 +33,7 @@ int main() {
3333
ccmath has a comprehensive cmake setup and can be easily included in your project using fetchcontent like so:
3434

3535
```cmake
36-
cmake_minimum_required(VERSION 3.11) # FetchContent is new in version 3.11.
36+
cmake_minimum_required(VERSION 3.18)
3737
3838
include(FetchContent)
3939
FetchContent_Declare(

benchmark/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ add_executable(${PROJECT_NAME})
1414
add_executable(${INTERNAL_PROJ_DEFAULT_NAME}::benchmark ALIAS ${PROJECT_NAME})
1515
target_link_libraries(${PROJECT_NAME} PUBLIC
1616
ccmath::ccmath
17+
benchmark::benchmark
1718
)
1819
target_include_directories(${PROJECT_NAME} PUBLIC .)
1920
target_sources(${PROJECT_NAME} PRIVATE

benchmark/ccmath_benchmark_main.cpp

Lines changed: 131 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,135 @@
66
* See LICENSE for more information.
77
*/
88

9-
int main(int argc, char** argv)
10-
{
9+
#include <benchmark/benchmark.h>
10+
#include <vector>
11+
#include <random>
12+
13+
#include <cmath>
14+
#include "ccmath/ccmath.hpp"
15+
16+
namespace bm = benchmark;
17+
18+
// Global seed value for random number generator
19+
constexpr unsigned int DefaultSeed = 937162211; // Using a long prime number as our default seed
20+
21+
// Generate a fixed set of random integers for benchmarking
22+
std::vector<int> generateRandomIntegers(size_t count, unsigned int seed) {
23+
std::vector<int> randomIntegers;
24+
std::mt19937 gen(seed);
25+
std::uniform_int_distribution<int> dist(std::numeric_limits<int>::min(), std::numeric_limits<int>::max());
26+
for (size_t i = 0; i < count; ++i) {
27+
randomIntegers.push_back(dist(gen));
28+
}
29+
return randomIntegers;
30+
}
31+
32+
// Generate a fixed set of random integers for benchmarking
33+
std::vector<double> generateRandomDoubles(size_t count, unsigned int seed) {
34+
std::vector<double> randomDouble;
35+
std::mt19937 gen(seed);
36+
std::uniform_real_distribution<double> dist(std::numeric_limits<double>::min(), std::numeric_limits<double>::max());
37+
for (size_t i = 0; i < count; ++i) {
38+
randomDouble.push_back(dist(gen));
39+
}
40+
return randomDouble;
41+
}
42+
43+
// Benchmarking std::abs with the same set of random integers
44+
static void BM_std_abs_rand_int(benchmark::State& state) {
45+
auto randomIntegers = generateRandomIntegers(static_cast<size_t>(state.range(0)), DefaultSeed);
46+
while (state.KeepRunning()) {
47+
for (auto x : randomIntegers) {
48+
benchmark::DoNotOptimize(std::abs(x));
49+
}
50+
}
51+
state.SetComplexityN(state.range(0));
1152
}
53+
BENCHMARK(BM_std_abs_rand_int)->Range(8, 8<<10)->Complexity();
54+
55+
// Benchmarking ccm::abs with the same set of random integers
56+
static void BM_ccm_abs_rand_int(benchmark::State& state) {
57+
auto randomIntegers = generateRandomIntegers(static_cast<size_t>(state.range(0)), DefaultSeed);
58+
while (state.KeepRunning()) {
59+
for (auto x : randomIntegers) {
60+
benchmark::DoNotOptimize(ccm::abs(x));
61+
}
62+
}
63+
state.SetComplexityN(state.range(0));
64+
}
65+
BENCHMARK(BM_ccm_abs_rand_int)->Range(8, 8<<10)->Complexity();
66+
67+
// Benchmarking std::abs with the same set of random integers
68+
static void BM_std_abs_rand_double(benchmark::State& state) {
69+
auto randomIntegers = generateRandomDoubles(static_cast<size_t>(state.range(0)), DefaultSeed);
70+
while (state.KeepRunning()) {
71+
for (auto x : randomIntegers) {
72+
benchmark::DoNotOptimize(std::abs(x));
73+
}
74+
}
75+
state.SetComplexityN(state.range(0));
76+
}
77+
BENCHMARK(BM_std_abs_rand_double)->Range(8, 8<<10)->Complexity();
78+
79+
// Benchmarking ccm::abs with the same set of random integers
80+
static void BM_ccm_abs_rand_double(benchmark::State& state) {
81+
auto randomIntegers = generateRandomDoubles(static_cast<size_t>(state.range(0)), DefaultSeed);
82+
while (state.KeepRunning()) {
83+
for (auto x : randomIntegers) {
84+
benchmark::DoNotOptimize(ccm::abs(x));
85+
}
86+
}
87+
state.SetComplexityN(state.range(0));
88+
}
89+
BENCHMARK(BM_ccm_abs_rand_double)->Range(8, 8<<10)->Complexity();
90+
91+
92+
static void BM_std_abs(benchmark::State& state) {
93+
for (auto _ : state) {
94+
benchmark::DoNotOptimize(std::abs(state.range(0)));
95+
}
96+
state.SetComplexityN(state.range(0));
97+
}
98+
BENCHMARK(BM_std_abs)->Arg(16)->Arg(256)->Arg(4096)->Arg(65536)->Complexity();
99+
100+
static void BM_ccm_abs(benchmark::State& state) {
101+
for (auto _ : state) {
102+
benchmark::DoNotOptimize(ccm::abs(state.range(0)));
103+
}
104+
state.SetComplexityN(state.range(0));
105+
}
106+
BENCHMARK(BM_ccm_abs)->Arg(16)->Arg(256)->Arg(4096)->Arg(65536)->Complexity();
107+
108+
109+
static void BM_ccm_log(bm::State& state) {
110+
for (auto _ : state) {
111+
bm::DoNotOptimize(ccm::log(state.range(0)));
112+
}
113+
}
114+
BENCHMARK(BM_ccm_log)->Arg(16)->Arg(256)->Arg(4096)->Arg(65536)->Complexity();
115+
116+
static void BM_std_log(bm::State& state) {
117+
for (auto _ : state) {
118+
bm::DoNotOptimize(std::log(state.range(0)));
119+
}
120+
state.SetComplexityN(state.range(0));
121+
}
122+
BENCHMARK(BM_std_log)->Arg(16)->Arg(256)->Arg(4096)->Arg(65536)->Complexity();
123+
124+
static void BM_ccm_log2(bm::State& state) {
125+
for (auto _ : state) {
126+
bm::DoNotOptimize(ccm::log2(state.range(0)));
127+
}
128+
state.SetComplexityN(state.range(0));
129+
}
130+
BENCHMARK(BM_ccm_log2)->Arg(16)->Arg(256)->Arg(4096)->Arg(65536)->Complexity();
131+
132+
static void BM_std_log2(bm::State& state) {
133+
for (auto _ : state) {
134+
bm::DoNotOptimize(std::log2(state.range(0)));
135+
}
136+
state.SetComplexityN(state.range(0));
137+
}
138+
BENCHMARK(BM_std_log2)->Arg(16)->Arg(256)->Arg(4096)->Arg(65536)->Complexity();
139+
140+
BENCHMARK_MAIN();

ccmath_headers.cmake

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
set(ccmath_internal_helpers_headers
2+
${CMAKE_CURRENT_SOURCE_DIR}/include/ccmath/internal/helpers/bits.hpp
23
${CMAKE_CURRENT_SOURCE_DIR}/include/ccmath/internal/helpers/endian.hpp
3-
${CMAKE_CURRENT_SOURCE_DIR}/include/ccmath/internal/helpers/narrow_cast.hpp
4-
${CMAKE_CURRENT_SOURCE_DIR}/include/ccmath/internal/helpers/promote.hpp
5-
${CMAKE_CURRENT_SOURCE_DIR}/include/ccmath/internal/helpers/make_mantisa.hpp
6-
${CMAKE_CURRENT_SOURCE_DIR}/include/ccmath/internal/helpers/not_null.hpp
7-
${CMAKE_CURRENT_SOURCE_DIR}/include/ccmath/internal/helpers/fpclassify_helper.hpp
8-
${CMAKE_CURRENT_SOURCE_DIR}/include/ccmath/internal/helpers/pow_integral.hpp
94
${CMAKE_CURRENT_SOURCE_DIR}/include/ccmath/internal/helpers/find_number.hpp
10-
${CMAKE_CURRENT_SOURCE_DIR}/include/ccmath/internal/helpers/is_odd.hpp
11-
${CMAKE_CURRENT_SOURCE_DIR}/include/ccmath/internal/helpers/exponentiation_helpers.hpp
12-
${CMAKE_CURRENT_SOURCE_DIR}/include/ccmath/internal/helpers/bits.hpp
5+
${CMAKE_CURRENT_SOURCE_DIR}/include/ccmath/internal/helpers/floating_point_type.hpp
6+
${CMAKE_CURRENT_SOURCE_DIR}/include/ccmath/internal/helpers/fpclassify_helper.hpp
137
)
148

159
set(ccmath_internal_predef_headers

cmake/GlobalConfig.cmake

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,24 @@ endif()
2525
# - GNUCXX can still be set on macOS when using Clang
2626
if(MSVC)
2727
set(CCMATH_COMPILER_MSVC 1)
28-
28+
# Identify if we are using clang-CL
2929
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
3030
set(CCMATH_COMPILER_CLANG_CL 1)
3131
endif()
32+
3233
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
3334
set(CCMATH_COMPILER_CLANG 1)
35+
elseif (CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
36+
set(CCMATH_COMPILER_INTEL 1)
37+
elseif (CMAKE_CXX_COMPILER_ID MATCHES "NVHPC")
38+
set(CCMATH_COMPILER_NVIDIA_HPC 1)
3439
elseif(CMAKE_COMPILER_IS_GNUCXX)
3540
set(CCMATH_COMPILER_GCC 1)
3641

3742
execute_process(COMMAND "${CMAKE_CXX_COMPILER}" "--version" OUTPUT_VARIABLE GCC_COMPILER_VERSION)
3843
string(REGEX MATCHALL ".*(tdm[64]*-[1-9]).*" CCMATH_COMPILER_GCC_TDM "${GCC_COMPILER_VERSION}")
3944
else()
40-
message(FATAL_ERROR "Unsupported compiler")
45+
message(WARNING "Unsupported compiler: ${CMAKE_CXX_COMPILER_ID}")
4146
return()
4247
endif()
4348

@@ -55,3 +60,7 @@ else()
5560
message(FATAL_ERROR "Unsupported architecture")
5661
return()
5762
endif()
63+
64+
message(STATUS "CCMake Detected OS: ${CMAKE_SYSTEM_NAME}")
65+
message(STATUS "CCMake Detected Compiler: ${CMAKE_CXX_COMPILER_ID}")
66+
message(STATUS "CCMake Detected Architecture: ${CMAKE_SYSTEM_PROCESSOR}")

include/ccmath/internal/helpers/is_odd.hpp renamed to example/calculate_half_life_of_carbon_14.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,7 @@
66
* See LICENSE for more information.
77
*/
88

9-
#pragma once
10-
11-
namespace ccm::helpers
9+
int main()
1210
{
13-
template <typename T>
14-
[[nodiscard]]
15-
inline constexpr bool is_odd(T value) noexcept
16-
{
17-
return value % 2 != 0;
18-
}
11+
1912
}

example/main.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@
66
* See LICENSE for more information.
77
*/
88

9+
#include "ccmath/ccmath.hpp"
10+
#include "iostream"
911

1012
int main()
1113
{
14+
auto test = ccm::log(1.0);
15+
16+
std::cout << test;
1217

1318
// TODO: Implement actual examples showcasing the library
1419

20+
21+
1522
return 0;
1623
}

ext/CMakeLists.txt

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,28 @@ project(${INTERNAL_PROJ_DEFAULT_NAME}-ext)
66

77
include(FetchContent)
88

9-
9+
if (CCMATH_BUILD_BENCHMARKS)
10+
# Intel does implement the regex library but google test is unable to detect this.
11+
# Lets help them out and set the var ourselves.
12+
if (CCMATH_COMPILER_INTEL)
13+
set(HAVE_STD_REGEX ON CACHE BOOL "" FORCE)
14+
endif ()
15+
set(BENCHMARK_ENABLE_TESTING NO)
16+
FetchContent_Declare(
17+
benchmark
18+
GIT_REPOSITORY https://github.com/google/benchmark.git
19+
GIT_TAG v1.8.3
20+
)
21+
FetchContent_MakeAvailable(benchmark)
22+
endif ()
1023

1124
if (CCMATH_BUILD_TEST)
25+
# Intel does implement the regex library but google test is unable to detect this.
26+
# Lets help them out and set the var ourselves.
27+
if (CCMATH_COMPILER_INTEL)
28+
set(HAVE_STD_REGEX ON CACHE BOOL "" FORCE)
29+
endif ()
30+
1231
# PThreads are not available on Windows
1332
# So tell gtest to not use them.
1433
if(CCMATH_WINDOWS)
@@ -42,3 +61,9 @@ if(CCMATH_BUILD_TEST)
4261
)
4362
endif ()
4463

64+
if(CCMATH_BUILD_BENCHMARKS)
65+
target_link_libraries(${PROJECT_NAME} INTERFACE
66+
benchmark::benchmark
67+
)
68+
endif ()
69+

0 commit comments

Comments
 (0)