summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Tests/RunCMake/try_compile/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/try_compile/TryRunArgs-stderr.txt71
-rw-r--r--Tests/RunCMake/try_compile/TryRunArgs.cmake11
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
+ )