Tests: Port GenerateExportHeader test to RunCMake infrastructure
This will allow build failure cases to be added later.
This commit is contained in:
parent
4feba34d02
commit
fc3dab0ea9
|
@ -485,7 +485,6 @@ if(BUILD_TESTING)
|
|||
)
|
||||
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Module/ExternalData")
|
||||
|
||||
ADD_TEST_MACRO(Module.GenerateExportHeader GenerateExportHeader)
|
||||
ADD_TEST_MACRO(Module.FindDependency FindDependency)
|
||||
|
||||
ADD_TEST_MACRO(Module.WriteCompilerDetectionHeader WriteCompilerDetectionHeader)
|
||||
|
|
|
@ -141,6 +141,9 @@ add_RunCMake_test(DisallowedCommands)
|
|||
add_RunCMake_test(ExternalData)
|
||||
add_RunCMake_test(FeatureSummary)
|
||||
add_RunCMake_test(FPHSA)
|
||||
if(NOT CMAKE_C_COMPILER_ID MATCHES "Watcom")
|
||||
add_RunCMake_test(GenerateExportHeader)
|
||||
endif()
|
||||
add_RunCMake_test(GeneratorExpression)
|
||||
add_RunCMake_test(GeneratorPlatform)
|
||||
add_RunCMake_test(GeneratorToolset)
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
cmake_minimum_required(VERSION 2.8.5)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
|
@ -0,0 +1 @@
|
|||
.*
|
|
@ -0,0 +1 @@
|
|||
.*
|
|
@ -78,6 +78,7 @@ add_subdirectory(lib_shared_and_static)
|
|||
add_compiler_export_flags()
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
message("#### COMPILER_HAS_DEPRECATED: " ${COMPILER_HAS_DEPRECATED})
|
||||
message("#### COMPILER_HAS_HIDDEN_VISIBILITY: " ${COMPILER_HAS_HIDDEN_VISIBILITY})
|
|
@ -0,0 +1,17 @@
|
|||
include(RunCMake)
|
||||
|
||||
function(run_GEH)
|
||||
# Use a single build tree for a few tests without cleaning.
|
||||
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/GEH-build)
|
||||
set(RunCMake_TEST_NO_CLEAN 1)
|
||||
if(RunCMake_GENERATOR MATCHES "Make|Ninja")
|
||||
set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug)
|
||||
endif()
|
||||
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
|
||||
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
|
||||
run_cmake(GEH)
|
||||
run_cmake_command(GEH-build ${CMAKE_COMMAND} --build . --config Debug)
|
||||
run_cmake_command(GEH-run ${RunCMake_TEST_BINARY_DIR}/GenerateExportHeader)
|
||||
endfunction()
|
||||
|
||||
run_GEH()
|
|
@ -126,7 +126,7 @@ $git_ls -z -- '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' |
|
|||
egrep -z -v '^Utilities/(KW|cm).*/' |
|
||||
|
||||
# Exclude reference content.
|
||||
egrep -z -v '^Tests/Module/GenerateExportHeader/reference/' |
|
||||
egrep -z -v '^Tests/RunCMake/GenerateExportHeader/reference/' |
|
||||
|
||||
# Exclude manually-formatted sources (e.g. with long lines).
|
||||
egrep -z -v '^Tests/PositionIndependentTargets/pic_test.h' |
|
||||
|
|
Loading…
Reference in New Issue