diff options
author | Matthew Woehlke <matthew.woehlke@kitware.com> | 2022-09-30 18:50:25 (GMT) |
---|---|---|
committer | Matthew Woehlke <matthew.woehlke@kitware.com> | 2022-09-30 18:50:25 (GMT) |
commit | 0f28653ba9dea36564dbd41388536982c56a96eb (patch) | |
tree | f1655de6a7ed6c16a41eec3eb918a42ab9f9f006 /Tests | |
parent | cadcb6a5f0e1ebaefd74f8c52151e410c57cfa96 (diff) | |
download | CMake-0f28653ba9dea36564dbd41388536982c56a96eb.zip CMake-0f28653ba9dea36564dbd41388536982c56a96eb.tar.gz CMake-0f28653ba9dea36564dbd41388536982c56a96eb.tar.bz2 |
try_compile: Rename SOURCE_FROM_ARG -> SOURCE_FROM_CONTENT
Change the SOURCE_FROM_ARG keyword to try_compile to SOURCE_FROM_CONTENT
(which we can do because it was recently added and hasn't been in a
release yet). The new name should be clearer as to what it does, and
also more consistent with the CONTENT arguments to some other commands.
Also, fix a typo in an error message.
Diffstat (limited to 'Tests')
7 files changed, 11 insertions, 11 deletions
diff --git a/Tests/RunCMake/try_compile/SourceFromBadName-stderr.txt b/Tests/RunCMake/try_compile/SourceFromBadName-stderr.txt index ef6847c..041f3f1 100644 --- a/Tests/RunCMake/try_compile/SourceFromBadName-stderr.txt +++ b/Tests/RunCMake/try_compile/SourceFromBadName-stderr.txt @@ -1,4 +1,4 @@ CMake Error at SourceFromBadName.cmake:[0-9]+ \(try_compile\): - SOURCES_FROM_ARG given invalid filename "bad/name.c" + SOURCE_FROM_CONTENT given invalid filename "bad/name.c" Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/try_compile/SourceFromBadName.cmake b/Tests/RunCMake/try_compile/SourceFromBadName.cmake index e53a73f..44d92fd 100644 --- a/Tests/RunCMake/try_compile/SourceFromBadName.cmake +++ b/Tests/RunCMake/try_compile/SourceFromBadName.cmake @@ -1 +1 @@ -try_compile(RESULT SOURCE_FROM_ARG bad/name.c "int main();") +try_compile(RESULT SOURCE_FROM_CONTENT bad/name.c "int main();") diff --git a/Tests/RunCMake/try_compile/SourceFromOneArg-stderr.txt b/Tests/RunCMake/try_compile/SourceFromOneArg-stderr.txt index bebe8bb..8b2248a 100644 --- a/Tests/RunCMake/try_compile/SourceFromOneArg-stderr.txt +++ b/Tests/RunCMake/try_compile/SourceFromOneArg-stderr.txt @@ -1,4 +1,4 @@ CMake Error at SourceFromOneArg.cmake:[0-9]+ \(try_compile\): - SOURCE_FROM_ARG requires exactly two arguments + SOURCE_FROM_CONTENT requires exactly two arguments Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/try_compile/SourceFromOneArg.cmake b/Tests/RunCMake/try_compile/SourceFromOneArg.cmake index 39ca11e..5a50499 100644 --- a/Tests/RunCMake/try_compile/SourceFromOneArg.cmake +++ b/Tests/RunCMake/try_compile/SourceFromOneArg.cmake @@ -1 +1 @@ -try_compile(RESULT SOURCE_FROM_ARG test.c) +try_compile(RESULT SOURCE_FROM_CONTENT test.c) diff --git a/Tests/RunCMake/try_compile/SourceFromThreeArgs-stderr.txt b/Tests/RunCMake/try_compile/SourceFromThreeArgs-stderr.txt index 2cf201d..5f2ff61 100644 --- a/Tests/RunCMake/try_compile/SourceFromThreeArgs-stderr.txt +++ b/Tests/RunCMake/try_compile/SourceFromThreeArgs-stderr.txt @@ -1,4 +1,4 @@ CMake Error at SourceFromThreeArgs.cmake:[0-9]+ \(try_compile\): - SOURCE_FROM_ARG requires exactly two arguments + SOURCE_FROM_CONTENT requires exactly two arguments Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/try_compile/SourceFromThreeArgs.cmake b/Tests/RunCMake/try_compile/SourceFromThreeArgs.cmake index af6340d..196851a 100644 --- a/Tests/RunCMake/try_compile/SourceFromThreeArgs.cmake +++ b/Tests/RunCMake/try_compile/SourceFromThreeArgs.cmake @@ -1 +1 @@ -try_compile(RESULT SOURCE_FROM_ARG test.c "int" "main();") +try_compile(RESULT SOURCE_FROM_CONTENT test.c "int" "main();") diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt index 9396cfa..5f540e9 100644 --- a/Tests/TryCompile/CMakeLists.txt +++ b/Tests/TryCompile/CMakeLists.txt @@ -78,7 +78,7 @@ include(old_and_new_signature_tests.cmake) # try to compile an empty source specified directly try_compile(SHOULD_FAIL_DUE_TO_EMPTY_SOURCE - SOURCE_FROM_ARG empty.c "") + SOURCE_FROM_CONTENT empty.c "") if(SHOULD_FAIL_DUE_TO_EMPTY_SOURCE) message(SEND_ERROR "Trying to compile an empty source succeeded?") endif() @@ -103,11 +103,11 @@ set(TRY_RUN_EXT_CODE "int answer() { return 42; }\n") try_run(SHOULD_EXIT_WITH_ERROR SHOULD_COMPILE - SOURCE_FROM_ARG main.c "${TRY_RUN_MAIN_CODE}" - SOURCE_FROM_ARG answer.c "${TRY_RUN_EXT_CODE}" + SOURCE_FROM_CONTENT main.c "${TRY_RUN_MAIN_CODE}" + SOURCE_FROM_CONTENT answer.c "${TRY_RUN_EXT_CODE}" COMPILE_OUTPUT_VARIABLE COMPILE_OUTPUT) -EXPECT_COMPILED("SOURCE_FROM_ARG" SHOULD_COMPILE "${COMPILE_OUTPUT}") -EXPECT_RUN_RESULT("SOURCE_FROM_ARG" SHOULD_EXIT_WITH_ERROR 42) +EXPECT_COMPILED("SOURCE_FROM_CONTENT" SHOULD_COMPILE "${COMPILE_OUTPUT}") +EXPECT_RUN_RESULT("SOURCE_FROM_CONTENT" SHOULD_EXIT_WITH_ERROR 42) try_run(SHOULD_EXIT_WITH_ERROR SHOULD_COMPILE SOURCE_FROM_VAR main.c TRY_RUN_MAIN_CODE |