This repository was archived by the owner on Feb 26, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +22
-9
lines changed
Expand file tree Collapse file tree 3 files changed +22
-9
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ option(HIGHFIVE_TEST_HALF_FLOAT "Enable half-precision floats" OFF)
6060# TODO remove entirely.
6161option (HIGHFIVE_HAS_CONCEPTS "Print readable compiler errors w/ C++20 concepts" OFF )
6262
63+ set (HIGHFIVE_MAX_ERROR 0 "Maximum number of compiler errors." )
6364option (HIGHFIVE_HAS_WERROR "Convert warnings to errors." OFF )
6465option (HIGHFIVE_GLIBCXX_ASSERTIONS "Enable bounds check for STL." OFF )
6566# TODO these some magic to get a drop down menu in ccmake
Original file line number Diff line number Diff line change @@ -31,13 +31,20 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang"
3131 -Wcast-align
3232 -Wdouble-promotion
3333 )
34- endif ()
3534
36- if (HIGHFIVE_HAS_WERROR)
37- target_compile_options (HighFiveWarnings
38- INTERFACE
39- -Werror
40- -Wno-error=deprecated-declarations
41- )
35+ if (HIGHFIVE_MAX_ERRORS)
36+ target_compile_options (HighFiveWarnings
37+ INTERFACE
38+ -fmax-errors=${HIGHFIVE_MAX_ERRORS}
39+ )
40+ endif ()
41+
42+ if (HIGHFIVE_HAS_WERROR)
43+ target_compile_options (HighFiveWarnings
44+ INTERFACE
45+ -Werror
46+ -Wno-error=deprecated-declarations
47+ )
48+ endif ()
4249 endif ()
4350endif ()
Original file line number Diff line number Diff line change @@ -23,8 +23,13 @@ cmake --build build --parallel
2323ctest --test-dir build
2424```
2525
26- You might want to turn Boost ` -DHIGHFIVE_TEST_BOOST=On ` or optional
27- dependencies on.
26+ You might want to add:
27+ * ` -DHIGHFIVE_TEST_BOOST=On ` or other optional dependencies on,
28+ * ` -DHIGHFIVE_MAX_ERROR=3 ` to only show the first three errors.
29+
30+ Generic CMake reminders:
31+ * ` -DCMAKE_INSTALL_PREFIX ` defines where HighFive will be installed,
32+ * ` -DCMAKE_PREFIX_PATH ` defines where ` *Config.cmake ` files are found.
2833
2934## Contributing
3035There's numerous HDF5 features that haven't been wrapped yet. HighFive is a
You can’t perform that action at this time.
0 commit comments