Tests: Pass CMAKE_MAKE_PROGRAM instead of --build-makeprogram
Pass the CMAKE_TEST_MAKEPROGRAM, if any, to each test at CMake time in the CMAKE_MAKE_PROGRAM cache entry. Pass the CMAKE_TEST_MAKEPROGRAM into the ExportImport, Fortran, and MacRuntimePath tests so that they may do the same for the nested project configurations. Now "ctest --build-and-test" can get the make program from the test build tree cache, so drop the explicit --build-makeprogram.
This commit is contained in:
parent
68031abf15
commit
fd6076d075
|
@ -80,7 +80,6 @@ if(BUILD_TESTING)
|
||||||
|
|
||||||
set(build_generator_args
|
set(build_generator_args
|
||||||
--build-generator ${CMAKE_TEST_GENERATOR}
|
--build-generator ${CMAKE_TEST_GENERATOR}
|
||||||
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
|
|
||||||
)
|
)
|
||||||
if(CMAKE_TEST_GENERATOR_TOOLSET)
|
if(CMAKE_TEST_GENERATOR_TOOLSET)
|
||||||
list(APPEND build_generator_args
|
list(APPEND build_generator_args
|
||||||
|
@ -89,6 +88,9 @@ if(BUILD_TESTING)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(build_options)
|
set(build_options)
|
||||||
|
if(CMAKE_TEST_MAKEPROGRAM)
|
||||||
|
list(APPEND build_options -DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_TEST_MAKEPROGRAM})
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(CMakeLib)
|
add_subdirectory(CMakeLib)
|
||||||
add_subdirectory(CMakeOnly)
|
add_subdirectory(CMakeOnly)
|
||||||
|
@ -254,6 +256,7 @@ if(BUILD_TESTING)
|
||||||
ADD_TEST_MACRO(Assembler HelloAsm)
|
ADD_TEST_MACRO(Assembler HelloAsm)
|
||||||
ADD_TEST_MACRO(SourceGroups SourceGroups)
|
ADD_TEST_MACRO(SourceGroups SourceGroups)
|
||||||
ADD_TEST_MACRO(Preprocess Preprocess)
|
ADD_TEST_MACRO(Preprocess Preprocess)
|
||||||
|
set(ExportImport_BUILD_OPTIONS -DCMAKE_TEST_MAKEPROGRAM:FILEPATH=${CMAKE_TEST_MAKEPROGRAM})
|
||||||
ADD_TEST_MACRO(ExportImport ExportImport)
|
ADD_TEST_MACRO(ExportImport ExportImport)
|
||||||
ADD_TEST_MACRO(Unset Unset)
|
ADD_TEST_MACRO(Unset Unset)
|
||||||
ADD_TEST_MACRO(PolicyScope PolicyScope)
|
ADD_TEST_MACRO(PolicyScope PolicyScope)
|
||||||
|
@ -465,7 +468,6 @@ if(BUILD_TESTING)
|
||||||
--build-two-config
|
--build-two-config
|
||||||
--build-generator "Eclipse CDT4 - Unix Makefiles"
|
--build-generator "Eclipse CDT4 - Unix Makefiles"
|
||||||
--build-generator-toolset "${CMAKE_TEST_GENERATOR_TOOLSET}"
|
--build-generator-toolset "${CMAKE_TEST_GENERATOR_TOOLSET}"
|
||||||
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
|
|
||||||
--build-project Simple
|
--build-project Simple
|
||||||
--build-options ${build_options}
|
--build-options ${build_options}
|
||||||
--test-command Simple)
|
--test-command Simple)
|
||||||
|
@ -481,7 +483,6 @@ if(BUILD_TESTING)
|
||||||
--build-two-config
|
--build-two-config
|
||||||
--build-generator "CodeBlocks - Unix Makefiles"
|
--build-generator "CodeBlocks - Unix Makefiles"
|
||||||
--build-generator-toolset "${CMAKE_TEST_GENERATOR_TOOLSET}"
|
--build-generator-toolset "${CMAKE_TEST_GENERATOR_TOOLSET}"
|
||||||
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
|
|
||||||
--build-project Simple
|
--build-project Simple
|
||||||
--build-options ${build_options}
|
--build-options ${build_options}
|
||||||
--test-command Simple)
|
--test-command Simple)
|
||||||
|
@ -496,7 +497,6 @@ if(BUILD_TESTING)
|
||||||
--build-two-config
|
--build-two-config
|
||||||
--build-generator "KDevelop3 - Unix Makefiles"
|
--build-generator "KDevelop3 - Unix Makefiles"
|
||||||
--build-generator-toolset "${CMAKE_TEST_GENERATOR_TOOLSET}"
|
--build-generator-toolset "${CMAKE_TEST_GENERATOR_TOOLSET}"
|
||||||
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
|
|
||||||
--build-project Simple
|
--build-project Simple
|
||||||
--build-options ${build_options}
|
--build-options ${build_options}
|
||||||
--test-command Simple)
|
--test-command Simple)
|
||||||
|
@ -1352,6 +1352,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
|
||||||
${build_generator_args}
|
${build_generator_args}
|
||||||
--build-project MacRuntimePath
|
--build-project MacRuntimePath
|
||||||
--build-options ${build_options}
|
--build-options ${build_options}
|
||||||
|
-DCMAKE_TEST_MAKEPROGRAM:FILEPATH=${CMAKE_TEST_MAKEPROGRAM}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -2504,6 +2505,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
|
||||||
--build-project testf
|
--build-project testf
|
||||||
--build-two-config
|
--build-two-config
|
||||||
--build-options ${build_options}
|
--build-options ${build_options}
|
||||||
|
-DCMAKE_TEST_MAKEPROGRAM:FILEPATH=${CMAKE_TEST_MAKEPROGRAM}
|
||||||
--test-command testf)
|
--test-command testf)
|
||||||
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Fortran")
|
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Fortran")
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ add_custom_command(
|
||||||
--build-target install
|
--build-target install
|
||||||
--build-generator ${CMAKE_GENERATOR}
|
--build-generator ${CMAKE_GENERATOR}
|
||||||
--build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
|
--build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
|
||||||
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
|
|
||||||
--build-options -C${ExportImport_BINARY_DIR}/InitialCache.cmake
|
--build-options -C${ExportImport_BINARY_DIR}/InitialCache.cmake
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
|
@ -64,7 +63,6 @@ add_custom_command(
|
||||||
--build-project Import
|
--build-project Import
|
||||||
--build-generator ${CMAKE_GENERATOR}
|
--build-generator ${CMAKE_GENERATOR}
|
||||||
--build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
|
--build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
|
||||||
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
|
|
||||||
--build-options -C${ExportImport_BINARY_DIR}/InitialCache.cmake
|
--build-options -C${ExportImport_BINARY_DIR}/InitialCache.cmake
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
set(CMAKE_MAKE_PROGRAM "@CMAKE_TEST_MAKEPROGRAM@" CACHE FILEPATH "Make Program")
|
||||||
set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@" CACHE STRING "C Compiler")
|
set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@" CACHE STRING "C Compiler")
|
||||||
set(CMAKE_C_FLAGS "@CMAKE_C_FLAGS@" CACHE STRING "C Flags")
|
set(CMAKE_C_FLAGS "@CMAKE_C_FLAGS@" CACHE STRING "C Flags")
|
||||||
set(CMAKE_C_FLAGS_DEBUG "@CMAKE_C_FLAGS_DEBUG@" CACHE STRING "C Flags")
|
set(CMAKE_C_FLAGS_DEBUG "@CMAKE_C_FLAGS_DEBUG@" CACHE STRING "C Flags")
|
||||||
|
|
|
@ -198,13 +198,13 @@ if(TEST_MODULE_DEPENDS)
|
||||||
--build-project ExtFort
|
--build-project ExtFort
|
||||||
--build-generator ${CMAKE_GENERATOR}
|
--build-generator ${CMAKE_GENERATOR}
|
||||||
--build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
|
--build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
|
||||||
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
|
|
||||||
--build-options -DCMAKE_Fortran_COMPILER:STRING=${CMAKE_Fortran_COMPILER}
|
--build-options -DCMAKE_Fortran_COMPILER:STRING=${CMAKE_Fortran_COMPILER}
|
||||||
-DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS}
|
-DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS}
|
||||||
-DCMAKE_Fortran_FLAGS_DEBUG:STRING=${CMAKE_Fortran_FLAGS_DEBUG}
|
-DCMAKE_Fortran_FLAGS_DEBUG:STRING=${CMAKE_Fortran_FLAGS_DEBUG}
|
||||||
-DCMAKE_Fortran_FLAGS_RELEASE:STRING=${CMAKE_Fortran_FLAGS_RELEASE}
|
-DCMAKE_Fortran_FLAGS_RELEASE:STRING=${CMAKE_Fortran_FLAGS_RELEASE}
|
||||||
-DCMAKE_Fortran_FLAGS_MINSIZEREL:STRING=${CMAKE_Fortran_FLAGS_MINSIZEREL}
|
-DCMAKE_Fortran_FLAGS_MINSIZEREL:STRING=${CMAKE_Fortran_FLAGS_MINSIZEREL}
|
||||||
-DCMAKE_Fortran_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_Fortran_FLAGS_RELWITHDEBINFO}
|
-DCMAKE_Fortran_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_Fortran_FLAGS_RELWITHDEBINFO}
|
||||||
|
-DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_TEST_MAKEPROGRAM}
|
||||||
${External_BUILD_TYPE}
|
${External_BUILD_TYPE}
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
|
|
|
@ -38,7 +38,6 @@ add_custom_command(
|
||||||
--build-target install
|
--build-target install
|
||||||
--build-generator ${CMAKE_GENERATOR}
|
--build-generator ${CMAKE_GENERATOR}
|
||||||
--build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
|
--build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
|
||||||
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
|
|
||||||
--build-options -C${MacRuntimePath_BINARY_DIR}/InitialCache.cmake
|
--build-options -C${MacRuntimePath_BINARY_DIR}/InitialCache.cmake
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
|
@ -60,7 +59,6 @@ add_custom_command(
|
||||||
--build-project MacRuntimePath_B
|
--build-project MacRuntimePath_B
|
||||||
--build-generator ${CMAKE_GENERATOR}
|
--build-generator ${CMAKE_GENERATOR}
|
||||||
--build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
|
--build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
|
||||||
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
|
|
||||||
--build-options -C${MacRuntimePath_BINARY_DIR}/InitialCache.cmake
|
--build-options -C${MacRuntimePath_BINARY_DIR}/InitialCache.cmake
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
set(CMAKE_MAKE_PROGRAM "@CMAKE_TEST_MAKEPROGRAM@" CACHE FILEPATH "Make Program")
|
||||||
set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@" CACHE STRING "C Compiler")
|
set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@" CACHE STRING "C Compiler")
|
||||||
set(CMAKE_C_FLAGS "@CMAKE_C_FLAGS@" CACHE STRING "C Flags")
|
set(CMAKE_C_FLAGS "@CMAKE_C_FLAGS@" CACHE STRING "C Flags")
|
||||||
set(CMAKE_C_FLAGS_DEBUG "@CMAKE_C_FLAGS_DEBUG@" CACHE STRING "C Flags")
|
set(CMAKE_C_FLAGS_DEBUG "@CMAKE_C_FLAGS_DEBUG@" CACHE STRING "C Flags")
|
||||||
|
|
Loading…
Reference in New Issue