GNUInstallDirs: Add tests for reconfigure

Signed-off-by: Cristian Le <git@lecris.dev>
This commit is contained in:
Cristian Le
2025-04-03 19:46:36 +02:00
parent 07a30dc075
commit 6bab9e3149
2 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
if(DEFINED case)
set(PROJECT_NAME ${case})
include(${case}.cmake)
else()
# If no case is defined it is an initial setup
# Start with the same setup as UsrLocal
set(PROJECT_NAME UsrLocal)
set(CMAKE_INSTALL_PREFIX "/usr/local")
include(Common.cmake)
endif()

View File

@@ -21,5 +21,21 @@ foreach(case
unset(RunCMake-stderr-file)
endforeach()
block()
set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/Reconfigure-build")
set(RunCMake-stderr-file UsrLocal${variant}-stderr.txt)
run_cmake_with_options(Reconfigure)
set(RunCMake_TEST_NO_CLEAN 1)
foreach(case
Opt
Root
Usr
UsrLocal
)
set(RunCMake-stderr-file ${case}${variant}-stderr.txt)
run_cmake_with_options(Reconfigure -Dcase=${case})
endforeach()
endblock()
run_cmake(GetAbs)
run_cmake(NoSystem)