mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-07 04:02:23 +03:00
Tests/CXXModulesCompile: remove excess examples/ directory
Now that the test is split, it doesn't make sense to have the directory anymore. It also helps with shortening paths.
This commit is contained in:
1 parent
beabe25af1
commit
3e7ffddf2f
360 files changed
+481
-481
No files matched your search
@@ -76,8 +76,8 @@ function (run_cxx_module_test directory)
|
||||
list(POP_FRONT ARGN test_name)
|
||||
endif ()
|
||||
|
||||
set(RunCMake_TEST_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/examples/${directory}")
|
||||
set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/examples/${test_name}-build")
|
||||
set(RunCMake_TEST_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/${directory}")
|
||||
set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/${test_name}-build")
|
||||
|
||||
if (RunCMake_GENERATOR_IS_MULTI_CONFIG)
|
||||
set(RunCMake_TEST_OPTIONS -DCMAKE_CONFIGURATION_TYPES=Debug)
|
||||
@@ -90,7 +90,7 @@ function (run_cxx_module_test directory)
|
||||
endif ()
|
||||
|
||||
if (RunCMake_CXXModules_INSTALL)
|
||||
set(prefix "${RunCMake_BINARY_DIR}/examples/${test_name}-install")
|
||||
set(prefix "${RunCMake_BINARY_DIR}/${test_name}-install")
|
||||
file(REMOVE_RECURSE "${prefix}")
|
||||
list(APPEND RunCMake_TEST_OPTIONS
|
||||
"-DCMAKE_INSTALL_PREFIX=${prefix}")
|
||||
@@ -99,12 +99,12 @@ function (run_cxx_module_test directory)
|
||||
list(APPEND RunCMake_TEST_OPTIONS
|
||||
"-DCMake_TEST_MODULE_COMPILATION_RULES=${CMake_TEST_MODULE_COMPILATION_RULES}"
|
||||
${ARGN})
|
||||
run_cmake("examples/${test_name}")
|
||||
run_cmake("${test_name}")
|
||||
set(RunCMake_TEST_NO_CLEAN 1)
|
||||
if (RunCMake_CXXModules_TARGET)
|
||||
run_cmake_command("examples/${test_name}-build" "${CMAKE_COMMAND}" --build . --config Debug --target "${RunCMake_CXXModules_TARGET}")
|
||||
run_cmake_command("${test_name}-build" "${CMAKE_COMMAND}" --build . --config Debug --target "${RunCMake_CXXModules_TARGET}")
|
||||
else ()
|
||||
run_cmake_command("examples/${test_name}-build" "${CMAKE_COMMAND}" --build . --config Debug)
|
||||
run_cmake_command("${test_name}-build" "${CMAKE_COMMAND}" --build . --config Debug)
|
||||
foreach (RunCMake_CXXModules_TARGET IN LISTS RunCMake_CXXModules_TARGETS)
|
||||
set(RunCMake_CXXModules_CONFIG "Debug")
|
||||
set(RunCMake_CXXModules_NAME_SUFFIX "")
|
||||
@@ -113,20 +113,20 @@ function (run_cxx_module_test directory)
|
||||
set(RunCMake_CXXModules_CONFIG "${CMAKE_MATCH_2}")
|
||||
set(RunCMake_CXXModules_NAME_SUFFIX "-${RunCMake_CXXModules_CONFIG}")
|
||||
endif ()
|
||||
run_cmake_command("examples/${test_name}-target-${RunCMake_CXXModules_TARGET}${RunCMake_CXXModules_NAME_SUFFIX}" "${CMAKE_COMMAND}" --build . --target "${RunCMake_CXXModules_TARGET}" --config "${RunCMake_CXXModules_CONFIG}")
|
||||
run_cmake_command("${test_name}-target-${RunCMake_CXXModules_TARGET}${RunCMake_CXXModules_NAME_SUFFIX}" "${CMAKE_COMMAND}" --build . --target "${RunCMake_CXXModules_TARGET}" --config "${RunCMake_CXXModules_CONFIG}")
|
||||
endforeach ()
|
||||
endif ()
|
||||
if (RunCMake_CXXModules_INSTALL)
|
||||
run_cmake_command("examples/${test_name}-install" "${CMAKE_COMMAND}" --build . --target install --config Debug)
|
||||
run_cmake_command("${test_name}-install" "${CMAKE_COMMAND}" --build . --target install --config Debug)
|
||||
endif ()
|
||||
if (NOT RunCMake_CXXModules_NO_TEST)
|
||||
run_cmake_command("examples/${test_name}-test" "${CMAKE_CTEST_COMMAND}" -C Debug --output-on-failure)
|
||||
run_cmake_command("${test_name}-test" "${CMAKE_CTEST_COMMAND}" -C Debug --output-on-failure)
|
||||
endif ()
|
||||
if (RunCMake_CXXModules_REBUILD)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1.125) # handle 1s resolution
|
||||
include("${RunCMake_TEST_SOURCE_DIR}/pre-rebuild.cmake")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1.125) # handle 1s resolution
|
||||
run_cmake_command("examples/${test_name}-rebuild" "${CMAKE_COMMAND}" --build . --config Debug)
|
||||
run_cmake_command("${test_name}-rebuild" "${CMAKE_COMMAND}" --build . --config Debug)
|
||||
endif ()
|
||||
endfunction ()
|
||||
|
||||
@@ -190,15 +190,15 @@ if ("named" IN_LIST CMake_TEST_MODULE_COMPILATION)
|
||||
|
||||
if ("collation" IN_LIST CMake_TEST_MODULE_COMPILATION)
|
||||
run_cxx_module_test(imp-std-not-in-exp-build)
|
||||
run_cxx_module_test(imp-std-trans imp-std-trans-not-in-exp-build "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/examples/imp-std-not-in-exp-build-build")
|
||||
run_cxx_module_test(imp-std-trans imp-std-trans-not-in-exp-build "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/imp-std-not-in-exp-build-build")
|
||||
|
||||
set(RunCMake_CXXModules_INSTALL 1)
|
||||
run_cxx_module_test(imp-std-not-in-exp-install)
|
||||
unset(RunCMake_CXXModules_INSTALL)
|
||||
run_cxx_module_test(imp-std-trans imp-std-trans-not-in-exp-install "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/examples/imp-std-not-in-exp-install-install")
|
||||
run_cxx_module_test(imp-std-trans imp-std-trans-not-in-exp-install "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/imp-std-not-in-exp-install-install")
|
||||
|
||||
run_cxx_module_test(imp-std-trans imp-std-trans-exp-no-std-build "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/examples/imp-std-exp-no-std-build-build" -DEXPORT_NO_STD=1)
|
||||
run_cxx_module_test(imp-std-trans imp-std-trans-exp-no-std-install "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/examples/imp-std-exp-no-std-install-install" -DEXPORT_NO_STD=1)
|
||||
run_cxx_module_test(imp-std-trans imp-std-trans-exp-no-std-build "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/imp-std-exp-no-std-build-build" -DEXPORT_NO_STD=1)
|
||||
run_cxx_module_test(imp-std-trans imp-std-trans-exp-no-std-install "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/imp-std-exp-no-std-install-install" -DEXPORT_NO_STD=1)
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
@@ -271,7 +271,7 @@ function (run_cxx_module_import_test type name)
|
||||
list(APPEND ARGN -DCMAKE_EXPORT_BUILD_DATABASE=1)
|
||||
endif ()
|
||||
|
||||
run_cxx_module_test(imp-mods "imp-mods-${name}" "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/examples/${name}-${type}" ${ARGN})
|
||||
run_cxx_module_test(imp-mods "imp-mods-${name}" "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/${name}-${type}" ${ARGN})
|
||||
endfunction ()
|
||||
|
||||
# Tests which install BMIs
|
||||
@@ -285,7 +285,7 @@ if ("export_bmi" IN_LIST CMake_TEST_MODULE_COMPILATION)
|
||||
run_cxx_module_test(exp-command-sepdir-build)
|
||||
run_cxx_module_test(exp-trans-targets-build)
|
||||
run_cxx_module_test(exp-trans-mods1-build)
|
||||
run_cxx_module_test(exp-trans-mods-build exp-trans-mods-build "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/examples/exp-trans-mods1-build-build" )
|
||||
run_cxx_module_test(exp-trans-mods-build exp-trans-mods-build "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/exp-trans-mods1-build-build" )
|
||||
run_cxx_module_test(exp-with-headers-build)
|
||||
|
||||
if ("collation" IN_LIST CMake_TEST_MODULE_COMPILATION AND
|
||||
@@ -327,7 +327,7 @@ if ("install_bmi" IN_LIST CMake_TEST_MODULE_COMPILATION)
|
||||
run_cxx_module_test(exp-command-sepdir-install)
|
||||
run_cxx_module_test(exp-trans-targets-install)
|
||||
run_cxx_module_test(exp-trans-mods1-install)
|
||||
run_cxx_module_test(exp-trans-mods-install exp-trans-mods-install "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/examples/exp-trans-mods1-install-install" )
|
||||
run_cxx_module_test(exp-trans-mods-install exp-trans-mods-install "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/exp-trans-mods1-install-install" )
|
||||
run_cxx_module_test(exp-with-headers-install)
|
||||
|
||||
if ("collation" IN_LIST CMake_TEST_MODULE_COMPILATION AND
|
||||
@@ -369,4 +369,4 @@ set(RunCMake_CXXModules_INSTALL 0)
|
||||
|
||||
set(test_set mods-from-ninja)
|
||||
run_cxx_module_test_ninja("exp-${test_set}")
|
||||
run_cxx_module_test(imp-mods "imp-${test_set}" "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/examples/exp-${test_set}-ninja-install" -DFROM_NINJA=1)
|
||||
run_cxx_module_test(imp-mods "imp-${test_set}" "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/exp-${test_set}-ninja-install" -DFROM_NINJA=1)
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/../check-json.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/check-json.cmake")
|
||||
|
||||
function (check_build_database expect_basename fname component)
|
||||
if (component STREQUAL "NO_EXIST")
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -2,7 +2,7 @@ CMake Warning \(dev\) in CMakeLists\.txt:
|
||||
Target "duplicate_sources" has source file
|
||||
|
||||
[^
|
||||
]*/Tests/RunCMake/CXXModulesCompile/examples/duplicate-sources/duplicate\.cxx
|
||||
]*/Tests/RunCMake/CXXModulesCompile/duplicate-sources/duplicate\.cxx
|
||||
|
||||
in a "FILE_SET TYPE CXX_MODULES" multiple times\.
|
||||
This warning is for project developers\. Use -Wno-dev to suppress it\.
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1 +0,0 @@
|
||||
CMake Error: Public C\+\+ module source `.*/Tests/RunCMake/CXXModulesCompile/examples/public-req-priv/pub\.cxx` requires the `priv` C\+\+ module which is provided by a private source
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 360 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user