From 32519473eaec96636a13e2718932141ba06760da Mon Sep 17 00:00:00 2001 From: zachcran Date: Mon, 23 Jun 2025 19:03:58 -0600 Subject: [PATCH 1/5] Add CMake minimum version command matching minimum version of CMaize --- tests/docs/bare_bones_cmake/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/docs/bare_bones_cmake/CMakeLists.txt b/tests/docs/bare_bones_cmake/CMakeLists.txt index b40623c3..3237d8a5 100644 --- a/tests/docs/bare_bones_cmake/CMakeLists.txt +++ b/tests/docs/bare_bones_cmake/CMakeLists.txt @@ -12,6 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Minimum version required as of CMake 4.0 +# (see https://cmake.org/cmake/help/latest/policy/CMP0000.html). +# Match this with minimum version from 'CMaize/CMakeLists.txt'. +cmake_minimum_required(VERSION 3.19) + add_executable(hello_world hello_world.cpp) # The below lines of code are used in unit testing this code example From cf13de166f23e28ba213048ff39655831a83c9cb Mon Sep 17 00:00:00 2001 From: zachcran Date: Mon, 23 Jun 2025 19:05:29 -0600 Subject: [PATCH 2/5] Remove old 'cpp/' test directory reference and use relative paths for test names --- tests/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a145d317..f6cb7b40 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -13,6 +13,5 @@ include(cmake_test/cmake_test) set(BUILD_TESTING "${build_testing_old}" CACHE BOOL "" FORCE) -# ct_add_dir("cpp") -ct_add_dir("cmaize") +ct_add_dir("cmaize" USE_REL_PATH_NAMES) add_subdirectory(docs) From 074fc497a7a7b96473320c9872ed220dad43c105 Mon Sep 17 00:00:00 2001 From: zachcran Date: Mon, 23 Jun 2025 19:06:34 -0600 Subject: [PATCH 3/5] Default to using VERBOSE log level in tests --- tests/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f6cb7b40..6205df57 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -13,5 +13,10 @@ include(cmake_test/cmake_test) set(BUILD_TESTING "${build_testing_old}" CACHE BOOL "" FORCE) -ct_add_dir("cmaize" USE_REL_PATH_NAMES) +ct_add_dir( + "cmaize" + USE_REL_PATH_NAMES + CMAKE_OPTIONS + -DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE +) add_subdirectory(docs) From d05b637dc00571c8fff38112688fbed512a8c246 Mon Sep 17 00:00:00 2001 From: zachcran Date: Mon, 23 Jun 2025 19:13:21 -0600 Subject: [PATCH 4/5] Fix line numbers referencing bare_bones_cmake from the docs --- docs/src/background/redundancy.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/background/redundancy.rst b/docs/src/background/redundancy.rst index 05ff49f0..73297c14 100644 --- a/docs/src/background/redundancy.rst +++ b/docs/src/background/redundancy.rst @@ -60,7 +60,7 @@ then the minimal ``CMakeLists.txt`` file looks like: .. literalinclude:: /../../tests/docs/bare_bones_cmake/CMakeLists.txt :language: CMake - :lines: 15 + :lines: 18-20 :linenos: :lineno-start: 1 From 1623f63efe2c0299de48ba2b656b467a89ae87d4 Mon Sep 17 00:00:00 2001 From: zachcran Date: Mon, 23 Jun 2025 19:14:20 -0600 Subject: [PATCH 5/5] Revert minimum version of bare_bones_cmake example back to 3.5 to match other examples --- tests/docs/bare_bones_cmake/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docs/bare_bones_cmake/CMakeLists.txt b/tests/docs/bare_bones_cmake/CMakeLists.txt index 3237d8a5..1bb7717a 100644 --- a/tests/docs/bare_bones_cmake/CMakeLists.txt +++ b/tests/docs/bare_bones_cmake/CMakeLists.txt @@ -15,7 +15,7 @@ # Minimum version required as of CMake 4.0 # (see https://cmake.org/cmake/help/latest/policy/CMP0000.html). # Match this with minimum version from 'CMaize/CMakeLists.txt'. -cmake_minimum_required(VERSION 3.19) +cmake_minimum_required(VERSION 3.5) # Required as of CMake 4.0 add_executable(hello_world hello_world.cpp)