diff options
author | Brad King <brad.king@kitware.com> | 2022-08-02 12:03:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-08-02 12:03:53 (GMT) |
commit | 3218ea60dea79819aa415bfa60c285e43326985e (patch) | |
tree | bf0d40c06fc52cb47f3a7b703765679252b81d95 | |
parent | b8e551ed320569b3ca0fd68477c5fa951baa5095 (diff) | |
download | CMake-3218ea60dea79819aa415bfa60c285e43326985e.zip CMake-3218ea60dea79819aa415bfa60c285e43326985e.tar.gz CMake-3218ea60dea79819aa415bfa60c285e43326985e.tar.bz2 |
Tests: Add RunCMake.try_compile case for try_run-only args
-rw-r--r-- | Tests/RunCMake/try_compile/RunCMakeTest.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/try_compile/TryRunArgs-stderr.txt | 71 | ||||
-rw-r--r-- | Tests/RunCMake/try_compile/TryRunArgs.cmake | 11 |
3 files changed, 83 insertions, 0 deletions
diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake index d377cce..881ef16 100644 --- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake +++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake @@ -19,6 +19,7 @@ run_cmake(BinDirEmpty) run_cmake(BinDirRelative) run_cmake(EmptyValueArgs) run_cmake(EmptyListArgs) +run_cmake(TryRunArgs) run_cmake(EnvConfig) diff --git a/Tests/RunCMake/try_compile/TryRunArgs-stderr.txt b/Tests/RunCMake/try_compile/TryRunArgs-stderr.txt new file mode 100644 index 0000000..d9346be --- /dev/null +++ b/Tests/RunCMake/try_compile/TryRunArgs-stderr.txt @@ -0,0 +1,71 @@ +^CMake Warning \(dev\) at TryRunArgs.cmake:[0-9]+ \(try_compile\): + try_compile given unknown argument "COMPILE_OUTPUT_VARIABLE". +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. ++ +CMake Warning \(dev\) at TryRunArgs.cmake:[0-9]+ \(try_compile\): + try_compile given unknown argument "compOutputVar". +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. ++ +CMake Warning \(dev\) at TryRunArgs.cmake:[0-9]+ \(try_compile\): + try_compile given unknown argument "RUN_OUTPUT_VARIABLE". +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. ++ +CMake Warning \(dev\) at TryRunArgs.cmake:[0-9]+ \(try_compile\): + try_compile given unknown argument "runOutputVar". +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. ++ +CMake Warning \(dev\) at TryRunArgs.cmake:[0-9]+ \(try_compile\): + try_compile given unknown argument "RUN_OUTPUT_STDOUT_VARIABLE". +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. ++ +CMake Warning \(dev\) at TryRunArgs.cmake:[0-9]+ \(try_compile\): + try_compile given unknown argument "runOutputStdOutVar". +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. ++ +CMake Warning \(dev\) at TryRunArgs.cmake:[0-9]+ \(try_compile\): + try_compile given unknown argument "RUN_OUTPUT_STDERR_VARIABLE". +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. ++ +CMake Warning \(dev\) at TryRunArgs.cmake:[0-9]+ \(try_compile\): + try_compile given unknown argument "runOutputStdErrVar". +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. ++ +CMake Warning \(dev\) at TryRunArgs.cmake:[0-9]+ \(try_compile\): + try_compile given unknown argument "WORKING_DIRECTORY". +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. ++ +CMake Warning \(dev\) at TryRunArgs.cmake:[0-9]+ \(try_compile\): + try_compile given unknown argument "runWorkDir". +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. ++ +CMake Warning \(dev\) at TryRunArgs.cmake:[0-9]+ \(try_compile\): + try_compile given unknown argument "ARGS". +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. ++ +CMake Warning \(dev\) at TryRunArgs.cmake:[0-9]+ \(try_compile\): + try_compile given unknown argument "runArgs". +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) +This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/RunCMake/try_compile/TryRunArgs.cmake b/Tests/RunCMake/try_compile/TryRunArgs.cmake new file mode 100644 index 0000000..1a60270 --- /dev/null +++ b/Tests/RunCMake/try_compile/TryRunArgs.cmake @@ -0,0 +1,11 @@ +enable_language(C) + +try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src.c + COPY_FILE "${CMAKE_CURRENT_BINARY_DIR}/out.bin" + COMPILE_OUTPUT_VARIABLE compOutputVar + RUN_OUTPUT_VARIABLE runOutputVar + RUN_OUTPUT_STDOUT_VARIABLE runOutputStdOutVar + RUN_OUTPUT_STDERR_VARIABLE runOutputStdErrVar + WORKING_DIRECTORY runWorkDir + ARGS runArgs + ) |