Skip to content

Commit 3a469d8

Browse files
committed
Marked several variables as 'advanced'
Many of the variables generated by CMake when searching for executables for items such as clang-format or such would remain and pollute the GUI or ccmake view. By marking such variables as 'advanced', these variables are hidden by default, but can be easily displayed by entering advanced mode. In these cases it's fairly safe, since error messages occur if the items in question cannot be found.
1 parent 1fea292 commit 3a469d8

File tree

5 files changed

+9
-0
lines changed

5 files changed

+9
-0
lines changed

code-coverage.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ find_program(LLVM_COV_PATH llvm-cov)
8484
find_program(LLVM_PROFDATA_PATH llvm-profdata)
8585
find_program(LCOV_PATH lcov)
8686
find_program(GENHTML_PATH genhtml)
87+
# Hide behind the 'advanced' mode flag for GUI/ccmake
88+
mark_as_advanced(FORCE LLVM_COV_PATH LLVM_PROFDATA_PATH LCOV_PATH GENHTML_PATH)
8789

8890
# Variables
8991
set(CMAKE_COVERAGE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/ccov)

dependency-graph.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# the License.
1515

1616
find_program(DOT_EXE "dot")
17+
mark_as_advanced(FORCE DOT_EXE)
1718
if(DOT_EXE)
1819
message(STATUS "dot found: ${DOT_EXE}")
1920
else()

formatting.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
# clang-format
1818
#
1919
find_program(CLANG_FORMAT_EXE "clang-format")
20+
mark_as_advanced(FORCE CLANG_FORMAT_EXE)
2021
if(CLANG_FORMAT_EXE)
2122
message(STATUS "clang-format found: ${CLANG_FORMAT_EXE}")
2223
else()
@@ -91,6 +92,7 @@ endfunction()
9192
# cmake-format
9293
#
9394
find_program(CMAKE_FORMAT_EXE "cmake-format")
95+
mark_as_advanced(FORCE CMAKE_FORMAT_EXE)
9496
if(CMAKE_FORMAT_EXE)
9597
message(STATUS "cmake-format found: ${CMAKE_FORMAT_EXE}")
9698
else()

prepare_catch.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ option(FORCE_CATCH_CLONE
1919

2020
# Attempts to find a local header of the Catch test frameword
2121
find_file(HAVE_CATCH_HPP catch.hpp PATH_SUFFIXES catch2 catch)
22+
mark_as_advanced(FORCE HAVE_CATCH_HPP)
2223

2324
# Attempts to add the infrastructure necessary for automatically adding C/C++
2425
# tests using the Catch2 library, including either an interface or pre-compiled

tools.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ macro(cppcheck)
4242
endmacro()
4343

4444
find_program(CLANG_TIDY_EXE NAMES "clang-tidy")
45+
mark_as_advanced(FORCE CLANG_TIDY_EXE)
4546
if(CLANG_TIDY_EXE)
4647
message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}")
4748
if(NOT CLANG_TIDY)
@@ -63,6 +64,7 @@ else()
6364
endif()
6465

6566
find_program(IWYU_EXE NAMES "include-what-you-use")
67+
mark_as_advanced(FORCE IWYU_EXE)
6668
if(IWYU_EXE)
6769
message(STATUS "include-what-you-use found: ${IWYU_EXE}")
6870
if(NOT IWYU)
@@ -85,6 +87,7 @@ else()
8587
endif()
8688

8789
find_program(CPPCHECK_EXE NAMES "cppcheck")
90+
mark_as_advanced(FORCE CPPCHECK_EXE)
8891
if(CPPCHECK_EXE)
8992
message(STATUS "cppcheck found: ${CPPCHECK_EXE}")
9093
if(CPPECHECK)

0 commit comments

Comments
 (0)