diff options
Diffstat (limited to 'Tests/RunCMake/ExternalProject')
14 files changed, 71 insertions, 8 deletions
diff --git a/Tests/RunCMake/ExternalProject/NoOptions-stderr.txt b/Tests/RunCMake/ExternalProject/NoOptions-stderr.txt index 2fc7d29..72c4b81 100644 --- a/Tests/RunCMake/ExternalProject/NoOptions-stderr.txt +++ b/Tests/RunCMake/ExternalProject/NoOptions-stderr.txt @@ -1,4 +1,4 @@ -^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\): +^CMake Error at .*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(message\): No download info given for 'MyProj' and its source directory: .*/Tests/RunCMake/ExternalProject/NoOptions-build/MyProj-prefix/src/MyProj diff --git a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake index ffaa46c..98e3996 100644 --- a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake @@ -18,6 +18,7 @@ run_cmake(BadIndependentStep2) run_cmake(NoOptions) run_cmake(SourceEmpty) run_cmake(SourceMissing) +run_cmake(SourceDirExisting) run_cmake(CMAKE_CACHE_ARGS) run_cmake(CMAKE_CACHE_DEFAULT_ARGS) run_cmake(CMAKE_CACHE_mix) @@ -210,7 +211,7 @@ function(__ep_test_BUILD_ALWAYS) file(WRITE "${RunCMake_TEST_BINARY_DIR}/once-configure.cmake" [[message(FATAL_ERROR "once: configure should not run again")]]) file(WRITE "${RunCMake_TEST_BINARY_DIR}/once-build.cmake" [[message(FATAL_ERROR "once: build should not run again")]]) file(WRITE "${RunCMake_TEST_BINARY_DIR}/once-install.cmake" [[message(FATAL_ERROR "once: install should not run again")]]) - if(NOT RunCMake_GENERATOR MATCHES "^(Xcode|Visual Studio 9 )") + if(NOT RunCMake_GENERATOR STREQUAL "Xcode") # The Xcode and VS 9 build systems decide to run this every time. file(WRITE "${RunCMake_TEST_BINARY_DIR}/always-configure.cmake" [[message(FATAL_ERROR "always: configure should not run again")]]) endif() @@ -244,9 +245,7 @@ function(__ep_test_CONFIGURE_HANDLED_BY_BUILD) run_cmake_command(CONFIGURE_HANDLED_BY_BUILD-rebuild ${CMAKE_COMMAND} --build . ${BUILD_CONFIG}) endfunction() -if(NOT RunCMake_GENERATOR MATCHES "Visual Studio 9 ") - __ep_test_CONFIGURE_HANDLED_BY_BUILD() -endif() +__ep_test_CONFIGURE_HANDLED_BY_BUILD() find_package(Git QUIET) if(GIT_EXECUTABLE) @@ -254,5 +253,9 @@ if(GIT_EXECUTABLE) # on some platforms. It may go to stdout or stderr, so force it to be merged. set(RunCMake_TEST_OUTPUT_MERGE TRUE) run_cmake(FetchGitRefs) - set(RunCMake_TEST_OUTPUT_MERGE FALSE) + unset(RunCMake_TEST_OUTPUT_MERGE) + + run_cmake(TLSVersionBadArg) + run_cmake(TLSVersionBadVar) + run_cmake(TLSVersionBadEnv) endif() diff --git a/Tests/RunCMake/ExternalProject/SourceDirExisting.cmake b/Tests/RunCMake/ExternalProject/SourceDirExisting.cmake new file mode 100644 index 0000000..761bb8e --- /dev/null +++ b/Tests/RunCMake/ExternalProject/SourceDirExisting.cmake @@ -0,0 +1,16 @@ +# We're providing a pre-existing source directory. Make sure we don't trigger +# an error if the undocumented but used-in-the-wild CMAKE_DISABLE_SOURCE_CHANGES +# variable is set. +set(CMAKE_DISABLE_SOURCE_CHANGES TRUE) + +include(ExternalProject) + +ExternalProject_Add(source_dir_existing + SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/Foo" + DOWNLOAD_COMMAND "${CMAKE_COMMAND}" -E echo "Download command executed" + UPDATE_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + TEST_COMMAND "" + INSTALL_COMMAND "" +) diff --git a/Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt b/Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt index 07c6e87..8789dde 100644 --- a/Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt +++ b/Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt @@ -1,4 +1,4 @@ -^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\): +^CMake Error at .*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(message\): No download info given for 'MyProj' and its source directory: .*/Tests/RunCMake/ExternalProject/SourceEmpty-build/SourceEmpty diff --git a/Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt b/Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt index 373f6e3..9ff2681 100644 --- a/Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt +++ b/Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt @@ -1,4 +1,4 @@ -^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\): +^CMake Error at .*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(message\): No download info given for 'MyProj' and its source directory: .*/Tests/RunCMake/ExternalProject/SourceMissing-build/SourceMissing diff --git a/Tests/RunCMake/ExternalProject/TLSVersionBadArg-result.txt b/Tests/RunCMake/ExternalProject/TLSVersionBadArg-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/ExternalProject/TLSVersionBadArg-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/ExternalProject/TLSVersionBadArg-stderr.txt b/Tests/RunCMake/ExternalProject/TLSVersionBadArg-stderr.txt new file mode 100644 index 0000000..f0973ba --- /dev/null +++ b/Tests/RunCMake/ExternalProject/TLSVersionBadArg-stderr.txt @@ -0,0 +1,10 @@ +^CMake Error at [^ +]*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(message\): + TLS_VERSION 'bad-arg' not known +Call Stack \(most recent call first\): + [^ +]*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(_ep_get_tls_version\) + [^ +]*/Modules/ExternalProject\.cmake:[0-9]+ \(_ep_add_download_command\) + TLSVersionBadArg\.cmake:[0-9]+ \(ExternalProject_Add\) + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/ExternalProject/TLSVersionBadArg.cmake b/Tests/RunCMake/ExternalProject/TLSVersionBadArg.cmake new file mode 100644 index 0000000..d212982 --- /dev/null +++ b/Tests/RunCMake/ExternalProject/TLSVersionBadArg.cmake @@ -0,0 +1,4 @@ +include(ExternalProject) +set(ENV{CMAKE_TLS_VERSION} bad-env) +set(CMAKE_TLS_VERSION bad-var) +ExternalProject_Add(MyProj GIT_REPOSITORY "fake" TLS_VERSION bad-arg) diff --git a/Tests/RunCMake/ExternalProject/TLSVersionBadEnv-result.txt b/Tests/RunCMake/ExternalProject/TLSVersionBadEnv-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/ExternalProject/TLSVersionBadEnv-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/ExternalProject/TLSVersionBadEnv-stderr.txt b/Tests/RunCMake/ExternalProject/TLSVersionBadEnv-stderr.txt new file mode 100644 index 0000000..4069159 --- /dev/null +++ b/Tests/RunCMake/ExternalProject/TLSVersionBadEnv-stderr.txt @@ -0,0 +1,10 @@ +^CMake Error at [^ +]*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(message\): + ENV{CMAKE_TLS_VERSION} 'bad-env' not known +Call Stack \(most recent call first\): + [^ +]*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(_ep_get_tls_version\) + [^ +]*/Modules/ExternalProject\.cmake:[0-9]+ \(_ep_add_download_command\) + TLSVersionBadEnv\.cmake:[0-9]+ \(ExternalProject_Add\) + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/ExternalProject/TLSVersionBadEnv.cmake b/Tests/RunCMake/ExternalProject/TLSVersionBadEnv.cmake new file mode 100644 index 0000000..8018642 --- /dev/null +++ b/Tests/RunCMake/ExternalProject/TLSVersionBadEnv.cmake @@ -0,0 +1,3 @@ +include(ExternalProject) +set(ENV{CMAKE_TLS_VERSION} bad-env) +ExternalProject_Add(MyProj GIT_REPOSITORY "fake") diff --git a/Tests/RunCMake/ExternalProject/TLSVersionBadVar-result.txt b/Tests/RunCMake/ExternalProject/TLSVersionBadVar-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/ExternalProject/TLSVersionBadVar-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/ExternalProject/TLSVersionBadVar-stderr.txt b/Tests/RunCMake/ExternalProject/TLSVersionBadVar-stderr.txt new file mode 100644 index 0000000..a5f7d64 --- /dev/null +++ b/Tests/RunCMake/ExternalProject/TLSVersionBadVar-stderr.txt @@ -0,0 +1,10 @@ +^CMake Error at [^ +]*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(message\): + CMAKE_TLS_VERSION 'bad-var' not known +Call Stack \(most recent call first\): + [^ +]*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(_ep_get_tls_version\) + [^ +]*/Modules/ExternalProject\.cmake:[0-9]+ \(_ep_add_download_command\) + TLSVersionBadVar\.cmake:[0-9]+ \(ExternalProject_Add\) + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/ExternalProject/TLSVersionBadVar.cmake b/Tests/RunCMake/ExternalProject/TLSVersionBadVar.cmake new file mode 100644 index 0000000..f52dd2e --- /dev/null +++ b/Tests/RunCMake/ExternalProject/TLSVersionBadVar.cmake @@ -0,0 +1,4 @@ +include(ExternalProject) +set(ENV{CMAKE_TLS_VERSION} bad-env) +set(CMAKE_TLS_VERSION bad-var) +ExternalProject_Add(MyProj GIT_REPOSITORY "fake") |