Skip to content

Commit

Permalink
[test] Consistent use of cmake_minimum_required in test code. NFC
Browse files Browse the repository at this point in the history
Lower values were causing cmake to print verbose warnings on each test
run.

I chose 3.21 here since that is the oldest version of cmake that I know
of that we use to run tests.  Its the version installed on the
emscripten-releases builders.
  • Loading branch information
sbc100 committed Jan 29, 2025
1 parent 1e04f2b commit 0e36ca2
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion test/cmake/check_type_size/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.21)

project(test_cmake)

Expand Down
2 changes: 1 addition & 1 deletion test/cmake/cmake_with_emval/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.21)

project(cmake_with_emval)

Expand Down
2 changes: 1 addition & 1 deletion test/cmake/cpp_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.21)

project(cpp_library)

Expand Down
2 changes: 2 additions & 0 deletions test/cmake/emscripten_system_processor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
cmake_minimum_required(VERSION 3.21)

project(emscripten_system_processor)

# Test that EMSCRIPTEN_SYSTEM_PROCESSOR can be overridden, and that
Expand Down
2 changes: 2 additions & 0 deletions test/cmake/emscripten_version/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
cmake_minimum_required(VERSION 3.21)

project(emscripten_version)

# EMSCRIPTEN_VERSION CMake variable is introduced in Emscripten version 1.38.6,
Expand Down
2 changes: 1 addition & 1 deletion test/cmake/find_modules/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.21)
project(find_modules)

add_executable(test_prog test.c)
Expand Down
2 changes: 1 addition & 1 deletion test/cmake/find_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.21)

project(find_package VERSION 0.42)

Expand Down
2 changes: 1 addition & 1 deletion test/cmake/find_pkg_config/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.21)
project(find_pkg_config)

message(STATUS "PKG_CONFIG_LIBDIR: $ENV{PKG_CONFIG_LIBDIR}")
Expand Down
2 changes: 1 addition & 1 deletion test/cmake/find_stuff/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.21)

project(find_stuff)

Expand Down
2 changes: 1 addition & 1 deletion test/cmake/install_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.21)

project(foo VERSION 1.42)

Expand Down
2 changes: 1 addition & 1 deletion test/cmake/post_build/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.21)

project(post_build)

Expand Down
2 changes: 1 addition & 1 deletion test/cmake/static_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.21)

project(static_library)

Expand Down
2 changes: 1 addition & 1 deletion test/cmake/stdproperty/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.21)
project(helloworld)

add_executable(helloworld main.cpp)
Expand Down
2 changes: 1 addition & 1 deletion test/cmake/target_html/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.21)

project(hello_world_gles)

Expand Down
2 changes: 1 addition & 1 deletion test/cmake/target_js/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.21)

project(test_cmake)

Expand Down
2 changes: 1 addition & 1 deletion test/cmake/target_library/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.21)

project(test_cmake)

Expand Down
2 changes: 1 addition & 1 deletion test/cmake/threads/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.21)

project(threads VERSION 0.42)

Expand Down
2 changes: 1 addition & 1 deletion test/cmake/whole_archive/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.24)
cmake_minimum_required(VERSION 3.21)

project(whole)

Expand Down
2 changes: 1 addition & 1 deletion test/minimal_webgl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.29)

# Default to release build if not specified
if(NOT CMAKE_BUILD_TYPE)
Expand Down

0 comments on commit 0e36ca2

Please sign in to comment.