summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/try_compile
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/try_compile')
-rw-r--r--Tests/RunCMake/try_compile/BadLinkLibraries-result.txt1
-rw-r--r--Tests/RunCMake/try_compile/BadLinkLibraries-stderr.txt5
-rw-r--r--Tests/RunCMake/try_compile/BadLinkLibraries.cmake3
-rw-r--r--Tests/RunCMake/try_compile/BadSources1-result.txt1
-rw-r--r--Tests/RunCMake/try_compile/BadSources1-stderr.txt12
-rw-r--r--Tests/RunCMake/try_compile/BadSources1.cmake1
-rw-r--r--Tests/RunCMake/try_compile/BadSources2-result.txt1
-rw-r--r--Tests/RunCMake/try_compile/BadSources2-stderr.txt12
-rw-r--r--Tests/RunCMake/try_compile/BadSources2.cmake5
-rw-r--r--Tests/RunCMake/try_compile/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/try_compile/CopyFileErrorNoCopyFile-result.txt1
-rw-r--r--Tests/RunCMake/try_compile/CopyFileErrorNoCopyFile-stderr.txt4
-rw-r--r--Tests/RunCMake/try_compile/CopyFileErrorNoCopyFile.cmake2
-rw-r--r--Tests/RunCMake/try_compile/NoArgs-result.txt1
-rw-r--r--Tests/RunCMake/try_compile/NoArgs-stderr.txt4
-rw-r--r--Tests/RunCMake/try_compile/NoArgs.cmake1
-rw-r--r--Tests/RunCMake/try_compile/NoCopyFile-result.txt1
-rw-r--r--Tests/RunCMake/try_compile/NoCopyFile-stderr.txt4
-rw-r--r--Tests/RunCMake/try_compile/NoCopyFile.cmake2
-rw-r--r--Tests/RunCMake/try_compile/NoCopyFile2-result.txt1
-rw-r--r--Tests/RunCMake/try_compile/NoCopyFile2-stderr.txt4
-rw-r--r--Tests/RunCMake/try_compile/NoCopyFile2.cmake2
-rw-r--r--Tests/RunCMake/try_compile/NoCopyFileError-result.txt1
-rw-r--r--Tests/RunCMake/try_compile/NoCopyFileError-stderr.txt4
-rw-r--r--Tests/RunCMake/try_compile/NoCopyFileError.cmake2
-rw-r--r--Tests/RunCMake/try_compile/NoOutputVariable-result.txt1
-rw-r--r--Tests/RunCMake/try_compile/NoOutputVariable-stderr.txt4
-rw-r--r--Tests/RunCMake/try_compile/NoOutputVariable.cmake2
-rw-r--r--Tests/RunCMake/try_compile/NoOutputVariable2-result.txt1
-rw-r--r--Tests/RunCMake/try_compile/NoOutputVariable2-stderr.txt4
-rw-r--r--Tests/RunCMake/try_compile/NoOutputVariable2.cmake2
-rw-r--r--Tests/RunCMake/try_compile/NoSources-result.txt1
-rw-r--r--Tests/RunCMake/try_compile/NoSources-stderr.txt4
-rw-r--r--Tests/RunCMake/try_compile/NoSources.cmake1
-rw-r--r--Tests/RunCMake/try_compile/NonSourceCompileDefinitions-result.txt1
-rw-r--r--Tests/RunCMake/try_compile/NonSourceCompileDefinitions-stderr.txt4
-rw-r--r--Tests/RunCMake/try_compile/NonSourceCompileDefinitions.cmake2
-rw-r--r--Tests/RunCMake/try_compile/NonSourceCopyFile-result.txt1
-rw-r--r--Tests/RunCMake/try_compile/NonSourceCopyFile-stderr.txt4
-rw-r--r--Tests/RunCMake/try_compile/NonSourceCopyFile.cmake2
-rw-r--r--Tests/RunCMake/try_compile/OneArg-result.txt1
-rw-r--r--Tests/RunCMake/try_compile/OneArg-stderr.txt4
-rw-r--r--Tests/RunCMake/try_compile/OneArg.cmake1
-rw-r--r--Tests/RunCMake/try_compile/RunCMakeTest.cmake17
-rw-r--r--Tests/RunCMake/try_compile/TwoArgs-result.txt1
-rw-r--r--Tests/RunCMake/try_compile/TwoArgs-stderr.txt4
-rw-r--r--Tests/RunCMake/try_compile/TwoArgs.cmake1
-rw-r--r--Tests/RunCMake/try_compile/proj/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/try_compile/src.c1
49 files changed, 144 insertions, 0 deletions
diff --git a/Tests/RunCMake/try_compile/BadLinkLibraries-result.txt b/Tests/RunCMake/try_compile/BadLinkLibraries-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/try_compile/BadLinkLibraries-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/try_compile/BadLinkLibraries-stderr.txt b/Tests/RunCMake/try_compile/BadLinkLibraries-stderr.txt
new file mode 100644
index 000000000..eceffecc8
--- /dev/null
+++ b/Tests/RunCMake/try_compile/BadLinkLibraries-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at BadLinkLibraries.cmake:2 \(try_compile\):
+ Only libraries may be used as try_compile IMPORTED LINK_LIBRARIES. Got
+ not_a_library of type UTILITY.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/try_compile/BadLinkLibraries.cmake b/Tests/RunCMake/try_compile/BadLinkLibraries.cmake
new file mode 100644
index 000000000..e8b5add87
--- /dev/null
+++ b/Tests/RunCMake/try_compile/BadLinkLibraries.cmake
@@ -0,0 +1,3 @@
+add_custom_target(not_a_library)
+try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src.c
+ LINK_LIBRARIES not_a_library)
diff --git a/Tests/RunCMake/try_compile/BadSources1-result.txt b/Tests/RunCMake/try_compile/BadSources1-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/try_compile/BadSources1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/try_compile/BadSources1-stderr.txt b/Tests/RunCMake/try_compile/BadSources1-stderr.txt
new file mode 100644
index 000000000..864a2942c
--- /dev/null
+++ b/Tests/RunCMake/try_compile/BadSources1-stderr.txt
@@ -0,0 +1,12 @@
+CMake Error at BadSources1.cmake:1 \(try_compile\):
+ Unknown extension ".c" for file
+
+ .*/Tests/RunCMake/try_compile/src.c
+
+ try_compile\(\) works only for enabled languages. Currently these are:
+
+ NONE
+
+ See project\(\) command to enable other languages.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/try_compile/BadSources1.cmake b/Tests/RunCMake/try_compile/BadSources1.cmake
new file mode 100644
index 000000000..aa4dc5ee5
--- /dev/null
+++ b/Tests/RunCMake/try_compile/BadSources1.cmake
@@ -0,0 +1 @@
+try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src.c)
diff --git a/Tests/RunCMake/try_compile/BadSources2-result.txt b/Tests/RunCMake/try_compile/BadSources2-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/try_compile/BadSources2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/try_compile/BadSources2-stderr.txt b/Tests/RunCMake/try_compile/BadSources2-stderr.txt
new file mode 100644
index 000000000..3313f9933
--- /dev/null
+++ b/Tests/RunCMake/try_compile/BadSources2-stderr.txt
@@ -0,0 +1,12 @@
+CMake Error at BadSources2.cmake:2 \(try_compile\):
+ Unknown extension ".cxx" for file
+
+ .*/Tests/RunCMake/try_compile/src.cxx
+
+ try_compile\(\) works only for enabled languages. Currently these are:
+
+ C NONE( RC)?
+
+ See project\(\) command to enable other languages.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/try_compile/BadSources2.cmake b/Tests/RunCMake/try_compile/BadSources2.cmake
new file mode 100644
index 000000000..ed2b0364d
--- /dev/null
+++ b/Tests/RunCMake/try_compile/BadSources2.cmake
@@ -0,0 +1,5 @@
+enable_language(C)
+try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR}
+ SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src.cxx
+ )
diff --git a/Tests/RunCMake/try_compile/CMakeLists.txt b/Tests/RunCMake/try_compile/CMakeLists.txt
new file mode 100644
index 000000000..12cd3c775
--- /dev/null
+++ b/Tests/RunCMake/try_compile/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 2.8.4)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/try_compile/CopyFileErrorNoCopyFile-result.txt b/Tests/RunCMake/try_compile/CopyFileErrorNoCopyFile-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/try_compile/CopyFileErrorNoCopyFile-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/try_compile/CopyFileErrorNoCopyFile-stderr.txt b/Tests/RunCMake/try_compile/CopyFileErrorNoCopyFile-stderr.txt
new file mode 100644
index 000000000..5d09c0c61
--- /dev/null
+++ b/Tests/RunCMake/try_compile/CopyFileErrorNoCopyFile-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CopyFileErrorNoCopyFile.cmake:1 \(try_compile\):
+ COPY_FILE_ERROR may be used only with COPY_FILE
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/try_compile/CopyFileErrorNoCopyFile.cmake b/Tests/RunCMake/try_compile/CopyFileErrorNoCopyFile.cmake
new file mode 100644
index 000000000..8d7cb0e7f
--- /dev/null
+++ b/Tests/RunCMake/try_compile/CopyFileErrorNoCopyFile.cmake
@@ -0,0 +1,2 @@
+try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src.c
+ COPY_FILE_ERROR _copied)
diff --git a/Tests/RunCMake/try_compile/NoArgs-result.txt b/Tests/RunCMake/try_compile/NoArgs-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoArgs-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/try_compile/NoArgs-stderr.txt b/Tests/RunCMake/try_compile/NoArgs-stderr.txt
new file mode 100644
index 000000000..8808fd19a
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoArgs-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at NoArgs.cmake:1 \(try_compile\):
+ try_compile unknown error.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/try_compile/NoArgs.cmake b/Tests/RunCMake/try_compile/NoArgs.cmake
new file mode 100644
index 000000000..8f751d9a2
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoArgs.cmake
@@ -0,0 +1 @@
+try_compile()
diff --git a/Tests/RunCMake/try_compile/NoCopyFile-result.txt b/Tests/RunCMake/try_compile/NoCopyFile-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoCopyFile-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/try_compile/NoCopyFile-stderr.txt b/Tests/RunCMake/try_compile/NoCopyFile-stderr.txt
new file mode 100644
index 000000000..d65d94883
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoCopyFile-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at NoCopyFile.cmake:1 \(try_compile\):
+ COPY_FILE must be followed by a file path
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/try_compile/NoCopyFile.cmake b/Tests/RunCMake/try_compile/NoCopyFile.cmake
new file mode 100644
index 000000000..8c648ff32
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoCopyFile.cmake
@@ -0,0 +1,2 @@
+try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src.c
+ COPY_FILE)
diff --git a/Tests/RunCMake/try_compile/NoCopyFile2-result.txt b/Tests/RunCMake/try_compile/NoCopyFile2-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoCopyFile2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/try_compile/NoCopyFile2-stderr.txt b/Tests/RunCMake/try_compile/NoCopyFile2-stderr.txt
new file mode 100644
index 000000000..e88952475
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoCopyFile2-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at NoCopyFile2.cmake:1 \(try_compile\):
+ COPY_FILE must be followed by a file path
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/try_compile/NoCopyFile2.cmake b/Tests/RunCMake/try_compile/NoCopyFile2.cmake
new file mode 100644
index 000000000..04b7f6882
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoCopyFile2.cmake
@@ -0,0 +1,2 @@
+try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src.c
+ COPY_FILE CMAKE_FLAGS -DA=B)
diff --git a/Tests/RunCMake/try_compile/NoCopyFileError-result.txt b/Tests/RunCMake/try_compile/NoCopyFileError-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoCopyFileError-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/try_compile/NoCopyFileError-stderr.txt b/Tests/RunCMake/try_compile/NoCopyFileError-stderr.txt
new file mode 100644
index 000000000..ed552fd8e
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoCopyFileError-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at NoCopyFileError.cmake:1 \(try_compile\):
+ COPY_FILE_ERROR must be followed by a variable name
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/try_compile/NoCopyFileError.cmake b/Tests/RunCMake/try_compile/NoCopyFileError.cmake
new file mode 100644
index 000000000..d4d69ee01
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoCopyFileError.cmake
@@ -0,0 +1,2 @@
+try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src.c
+ COPY_FILE ${CMAKE_CURRENT_BINARY_DIR}/copied.bin COPY_FILE_ERROR)
diff --git a/Tests/RunCMake/try_compile/NoOutputVariable-result.txt b/Tests/RunCMake/try_compile/NoOutputVariable-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoOutputVariable-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/try_compile/NoOutputVariable-stderr.txt b/Tests/RunCMake/try_compile/NoOutputVariable-stderr.txt
new file mode 100644
index 000000000..18ad751cf
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoOutputVariable-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at NoOutputVariable.cmake:1 \(try_compile\):
+ OUTPUT_VARIABLE must be followed by a variable name
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/try_compile/NoOutputVariable.cmake b/Tests/RunCMake/try_compile/NoOutputVariable.cmake
new file mode 100644
index 000000000..3b9cb345b
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoOutputVariable.cmake
@@ -0,0 +1,2 @@
+try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src.c
+ OUTPUT_VARIABLE)
diff --git a/Tests/RunCMake/try_compile/NoOutputVariable2-result.txt b/Tests/RunCMake/try_compile/NoOutputVariable2-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoOutputVariable2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/try_compile/NoOutputVariable2-stderr.txt b/Tests/RunCMake/try_compile/NoOutputVariable2-stderr.txt
new file mode 100644
index 000000000..8b2cc254c
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoOutputVariable2-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at NoOutputVariable2.cmake:1 \(try_compile\):
+ OUTPUT_VARIABLE must be followed by a variable name
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/try_compile/NoOutputVariable2.cmake b/Tests/RunCMake/try_compile/NoOutputVariable2.cmake
new file mode 100644
index 000000000..ad9ac9ac5
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoOutputVariable2.cmake
@@ -0,0 +1,2 @@
+try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src.c
+ OUTPUT_VARIABLE CMAKE_FLAGS -DA=B)
diff --git a/Tests/RunCMake/try_compile/NoSources-result.txt b/Tests/RunCMake/try_compile/NoSources-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoSources-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/try_compile/NoSources-stderr.txt b/Tests/RunCMake/try_compile/NoSources-stderr.txt
new file mode 100644
index 000000000..023032b60
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoSources-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at NoSources.cmake:1 \(try_compile\):
+ SOURCES must be followed by at least one source file
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/try_compile/NoSources.cmake b/Tests/RunCMake/try_compile/NoSources.cmake
new file mode 100644
index 000000000..8a73af42c
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NoSources.cmake
@@ -0,0 +1 @@
+try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} SOURCES)
diff --git a/Tests/RunCMake/try_compile/NonSourceCompileDefinitions-result.txt b/Tests/RunCMake/try_compile/NonSourceCompileDefinitions-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NonSourceCompileDefinitions-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/try_compile/NonSourceCompileDefinitions-stderr.txt b/Tests/RunCMake/try_compile/NonSourceCompileDefinitions-stderr.txt
new file mode 100644
index 000000000..025e65868
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NonSourceCompileDefinitions-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at NonSourceCompileDefinitions.cmake:1 \(try_compile\):
+ COMPILE_DEFINITIONS specified on a srcdir type TRY_COMPILE
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/try_compile/NonSourceCompileDefinitions.cmake b/Tests/RunCMake/try_compile/NonSourceCompileDefinitions.cmake
new file mode 100644
index 000000000..8eb0d47a0
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NonSourceCompileDefinitions.cmake
@@ -0,0 +1,2 @@
+try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/proj
+ TestProject COMPILE_DEFINITIONS DEF)
diff --git a/Tests/RunCMake/try_compile/NonSourceCopyFile-result.txt b/Tests/RunCMake/try_compile/NonSourceCopyFile-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NonSourceCopyFile-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/try_compile/NonSourceCopyFile-stderr.txt b/Tests/RunCMake/try_compile/NonSourceCopyFile-stderr.txt
new file mode 100644
index 000000000..f5893e19f
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NonSourceCopyFile-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at NonSourceCopyFile.cmake:1 \(try_compile\):
+ COPY_FILE specified on a srcdir type TRY_COMPILE
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/try_compile/NonSourceCopyFile.cmake b/Tests/RunCMake/try_compile/NonSourceCopyFile.cmake
new file mode 100644
index 000000000..c44192f9e
--- /dev/null
+++ b/Tests/RunCMake/try_compile/NonSourceCopyFile.cmake
@@ -0,0 +1,2 @@
+try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/proj
+ TestProject COPY_FILE ${CMAKE_CURRENT_BINARY_DIR}/result)
diff --git a/Tests/RunCMake/try_compile/OneArg-result.txt b/Tests/RunCMake/try_compile/OneArg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/try_compile/OneArg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/try_compile/OneArg-stderr.txt b/Tests/RunCMake/try_compile/OneArg-stderr.txt
new file mode 100644
index 000000000..12835bed6
--- /dev/null
+++ b/Tests/RunCMake/try_compile/OneArg-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at OneArg.cmake:1 \(try_compile\):
+ try_compile unknown error.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/try_compile/OneArg.cmake b/Tests/RunCMake/try_compile/OneArg.cmake
new file mode 100644
index 000000000..e60a46207
--- /dev/null
+++ b/Tests/RunCMake/try_compile/OneArg.cmake
@@ -0,0 +1 @@
+try_compile(RESULT)
diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
new file mode 100644
index 000000000..c93445876
--- /dev/null
+++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
@@ -0,0 +1,17 @@
+include(RunCMake)
+
+run_cmake(CopyFileErrorNoCopyFile)
+run_cmake(NoArgs)
+run_cmake(OneArg)
+run_cmake(TwoArgs)
+run_cmake(NoCopyFile)
+run_cmake(NoCopyFile2)
+run_cmake(NoCopyFileError)
+run_cmake(NoOutputVariable)
+run_cmake(NoOutputVariable2)
+run_cmake(NoSources)
+run_cmake(BadLinkLibraries)
+run_cmake(BadSources1)
+run_cmake(BadSources2)
+run_cmake(NonSourceCopyFile)
+run_cmake(NonSourceCompileDefinitions)
diff --git a/Tests/RunCMake/try_compile/TwoArgs-result.txt b/Tests/RunCMake/try_compile/TwoArgs-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/try_compile/TwoArgs-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/try_compile/TwoArgs-stderr.txt b/Tests/RunCMake/try_compile/TwoArgs-stderr.txt
new file mode 100644
index 000000000..b9c08fc9d
--- /dev/null
+++ b/Tests/RunCMake/try_compile/TwoArgs-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at TwoArgs.cmake:1 \(try_compile\):
+ try_compile unknown error.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/try_compile/TwoArgs.cmake b/Tests/RunCMake/try_compile/TwoArgs.cmake
new file mode 100644
index 000000000..7f2212d62
--- /dev/null
+++ b/Tests/RunCMake/try_compile/TwoArgs.cmake
@@ -0,0 +1 @@
+try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR})
diff --git a/Tests/RunCMake/try_compile/proj/CMakeLists.txt b/Tests/RunCMake/try_compile/proj/CMakeLists.txt
new file mode 100644
index 000000000..78a87c016
--- /dev/null
+++ b/Tests/RunCMake/try_compile/proj/CMakeLists.txt
@@ -0,0 +1,2 @@
+cmake_minimum_required(VERSION 2.8.10)
+project(TestProject NONE)
diff --git a/Tests/RunCMake/try_compile/src.c b/Tests/RunCMake/try_compile/src.c
new file mode 100644
index 000000000..78f2de106
--- /dev/null
+++ b/Tests/RunCMake/try_compile/src.c
@@ -0,0 +1 @@
+int main(void) { return 0; }