summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/FindPython/SOABI/CMakeLists.txt10
-rw-r--r--Tests/FindX11/Test/CMakeLists.txt11
-rw-r--r--Tests/FortranModules/CMakeLists.txt2
-rw-r--r--Tests/FortranOnly/CMakeLists.txt50
-rw-r--r--Tests/ObjectLibrary/CMakeLists.txt2
-rw-r--r--Tests/ObjectLibrary/Transitive/CMakeLists.txt12
-rw-r--r--Tests/ObjectLibrary/Transitive/FooObject.c4
-rw-r--r--Tests/ObjectLibrary/Transitive/FooStatic.c4
-rw-r--r--Tests/ObjectLibrary/Transitive/Transitive.c7
-rw-r--r--Tests/Preprocess/preprocess.c12
-rw-r--r--Tests/Preprocess/preprocess.cxx15
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json15
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json15
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-build-check.cmake3
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-clean-ninja-check.cmake3
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-release-in-debug-graph-ninja-check.cmake3
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/NoUnusedVariables.cmake1
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake14
-rw-r--r--Tests/RunCMake/Syntax/CommandEOF-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_command/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_message-stderr.txt1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_message.cmake1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-result.txt1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-stderr.txt5
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error.cmake5
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_no_code-result.txt1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_no_code-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_no_code.cmake1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-result.txt1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters.cmake1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message-stderr.txt1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message.cmake2
33 files changed, 162 insertions, 52 deletions
diff --git a/Tests/FindPython/SOABI/CMakeLists.txt b/Tests/FindPython/SOABI/CMakeLists.txt
index aea2baf..4a6aea3 100644
--- a/Tests/FindPython/SOABI/CMakeLists.txt
+++ b/Tests/FindPython/SOABI/CMakeLists.txt
@@ -10,3 +10,13 @@ endif()
if(NOT DEFINED Python3_SOABI)
message(FATAL_ERROR "Python3_SOABI for ${CMake_TEST_FindPython_COMPONENT} not found")
endif()
+
+if (Python3_Development_FOUND AND Python3_SOABI)
+ Python3_add_library (spam3 MODULE WITH_SOABI ../spam.c)
+ target_compile_definitions (spam3 PRIVATE PYTHON3)
+
+ get_property (suffix TARGET spam3 PROPERTY SUFFIX)
+ if (NOT suffix MATCHES "^.${Python3_SOABI}")
+ message(FATAL_ERROR "Module suffix do not include Python3_SOABI")
+ endif()
+endif()
diff --git a/Tests/FindX11/Test/CMakeLists.txt b/Tests/FindX11/Test/CMakeLists.txt
index 769271f..b2adfb2 100644
--- a/Tests/FindX11/Test/CMakeLists.txt
+++ b/Tests/FindX11/Test/CMakeLists.txt
@@ -29,6 +29,10 @@ test_x11_component(x11_components SM)
set(X11_X11_FOUND ${X11_FOUND})
test_x11_component(x11_components X11)
test_x11_component(x11_components Xau)
+test_x11_component(x11_components xcb)
+test_x11_component(x11_components X11_xcb)
+test_x11_component(x11_components xcb_icccm)
+test_x11_component(x11_components xcb_xkb)
test_x11_component(x11_components Xcomposite)
test_x11_component(x11_components Xdamage)
test_x11_component(x11_components Xdmcp)
@@ -41,6 +45,8 @@ test_x11_component(x11_components Xfixes)
test_x11_component(x11_components_ignore Xft)
test_x11_component(x11_components Xi)
test_x11_component(x11_components Xinerama)
+test_x11_component(x11_components xkbcommon)
+test_x11_component(x11_components xkbcommon_X11)
test_x11_component(x11_components Xkb)
test_x11_component(x11_components xkbfile)
test_x11_component(x11_components Xmu)
@@ -61,6 +67,9 @@ target_link_libraries(test_var PRIVATE ${X11_LIBRARIES})
# Not included in X11_LIBRARIES.
foreach(lib
Xau
+ xcb
+ X11_xcb
+ xcb_icccm
Xcomposite
Xdamage
Xdmcp
@@ -69,6 +78,8 @@ foreach(lib
Xfixes
Xi
Xinerama
+ xkbcommon
+ xkbcommon_X11
Xkb
xkbfile
Xmu
diff --git a/Tests/FortranModules/CMakeLists.txt b/Tests/FortranModules/CMakeLists.txt
index d056b43..b7a6f68 100644
--- a/Tests/FortranModules/CMakeLists.txt
+++ b/Tests/FortranModules/CMakeLists.txt
@@ -21,7 +21,7 @@ end module parent
submodule ( parent ) child
contains
module procedure id
- f = x
+ id = x
end procedure id
end submodule child
program main
diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt
index d945375..4327c2f 100644
--- a/Tests/FortranOnly/CMakeLists.txt
+++ b/Tests/FortranOnly/CMakeLists.txt
@@ -51,40 +51,36 @@ add_custom_target(checksayhello ALL
)
add_dependencies(checksayhello sayhello)
-# Exclude this test on IBM XL for now because the check strangely
-# fails with 'ld: 0706-029 Use a number with the -H flag'.
-if(NOT CMAKE_Fortran_COMPILER_ID STREQUAL XL)
- set(err_log ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log)
- file(REMOVE "${err_log}")
- include(CheckFortranSourceCompiles)
- unset(HAVE_PRINT CACHE)
- CHECK_Fortran_SOURCE_COMPILES([[
+set(err_log ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log)
+file(REMOVE "${err_log}")
+include(CheckFortranSourceCompiles)
+unset(HAVE_PRINT CACHE)
+CHECK_Fortran_SOURCE_COMPILES([[
PROGRAM TEST_HAVE_PRINT
PRINT *, 'Hello'
END
]] HAVE_PRINT)
- if(NOT HAVE_PRINT)
- if(EXISTS "${err_log}")
- file(READ "${err_log}" err)
- endif()
- string(REPLACE "\n" "\n " err " ${err}")
- message(SEND_ERROR "CHECK_Fortran_SOURCE_COMPILES for HAVE_PRINT failed:\n"
- "${err}")
+if(NOT HAVE_PRINT)
+ if(EXISTS "${err_log}")
+ file(READ "${err_log}" err)
endif()
+ string(REPLACE "\n" "\n " err " ${err}")
+ message(SEND_ERROR "CHECK_Fortran_SOURCE_COMPILES for HAVE_PRINT failed:\n"
+ "${err}")
+endif()
- unset(Fortran_BOGUS_FLAG CACHE)
- include(CheckFortranCompilerFlag)
- CHECK_Fortran_COMPILER_FLAG(-_this_is_not_a_flag_ Fortran_BOGUS_FLAG)
- if (Fortran_BOGUS_FLAG)
- message(SEND_ERROR "CHECK_Fortran_COMPILER_FLAG() succeeded, but should have failed")
- endif()
+unset(Fortran_BOGUS_FLAG CACHE)
+include(CheckFortranCompilerFlag)
+CHECK_Fortran_COMPILER_FLAG(-_this_is_not_a_flag_ Fortran_BOGUS_FLAG)
+if (Fortran_BOGUS_FLAG)
+ message(SEND_ERROR "CHECK_Fortran_COMPILER_FLAG() succeeded, but should have failed")
+endif()
- unset(Fortran_RUN_FLAG CACHE)
- include(CheckFortranSourceRuns)
- check_fortran_source_runs("program a; end program" Fortran_RUN_FLAG SRC_EXT F90)
- if(NOT Fortran_RUN_FLAG)
- message(SEND_ERROR "CHECK_Fortran_SOURCE_RUNS() failed")
- endif()
+unset(Fortran_RUN_FLAG CACHE)
+include(CheckFortranSourceRuns)
+check_fortran_source_runs("program a; end program" Fortran_RUN_FLAG SRC_EXT F90)
+if(NOT Fortran_RUN_FLAG)
+ message(SEND_ERROR "CHECK_Fortran_SOURCE_RUNS() failed")
endif()
# Test generation of preprocessed sources.
diff --git a/Tests/ObjectLibrary/CMakeLists.txt b/Tests/ObjectLibrary/CMakeLists.txt
index 7897ab9..fca5f41 100644
--- a/Tests/ObjectLibrary/CMakeLists.txt
+++ b/Tests/ObjectLibrary/CMakeLists.txt
@@ -73,3 +73,5 @@ add_executable(UseABstaticObjs $<TARGET_OBJECTS:UseABstatic>)
target_link_libraries(UseABstaticObjs ABstatic)
add_subdirectory(ExportLanguages)
+
+add_subdirectory(Transitive)
diff --git a/Tests/ObjectLibrary/Transitive/CMakeLists.txt b/Tests/ObjectLibrary/Transitive/CMakeLists.txt
new file mode 100644
index 0000000..d616cda
--- /dev/null
+++ b/Tests/ObjectLibrary/Transitive/CMakeLists.txt
@@ -0,0 +1,12 @@
+cmake_policy(SET CMP0022 NEW)
+add_library(FooStatic STATIC FooStatic.c)
+
+add_library(FooObject1 OBJECT FooObject.c)
+target_link_libraries(FooObject1 PRIVATE FooStatic)
+add_executable(Transitive1 Transitive.c)
+target_link_libraries(Transitive1 PRIVATE FooObject1)
+
+add_library(FooObject2 OBJECT FooObject.c)
+target_link_libraries(FooObject2 INTERFACE FooStatic)
+add_executable(Transitive2 Transitive.c)
+target_link_libraries(Transitive2 PRIVATE FooObject2)
diff --git a/Tests/ObjectLibrary/Transitive/FooObject.c b/Tests/ObjectLibrary/Transitive/FooObject.c
new file mode 100644
index 0000000..54c1f29
--- /dev/null
+++ b/Tests/ObjectLibrary/Transitive/FooObject.c
@@ -0,0 +1,4 @@
+int FooObject(void)
+{
+ return 0;
+}
diff --git a/Tests/ObjectLibrary/Transitive/FooStatic.c b/Tests/ObjectLibrary/Transitive/FooStatic.c
new file mode 100644
index 0000000..84649c7
--- /dev/null
+++ b/Tests/ObjectLibrary/Transitive/FooStatic.c
@@ -0,0 +1,4 @@
+int FooStatic(void)
+{
+ return 0;
+}
diff --git a/Tests/ObjectLibrary/Transitive/Transitive.c b/Tests/ObjectLibrary/Transitive/Transitive.c
new file mode 100644
index 0000000..43089b8
--- /dev/null
+++ b/Tests/ObjectLibrary/Transitive/Transitive.c
@@ -0,0 +1,7 @@
+extern int FooObject(void);
+extern int FooStatic(void);
+
+int main(void)
+{
+ return FooObject() + FooStatic();
+}
diff --git a/Tests/Preprocess/preprocess.c b/Tests/Preprocess/preprocess.c
index 958c77e..b3117da 100644
--- a/Tests/Preprocess/preprocess.c
+++ b/Tests/Preprocess/preprocess.c
@@ -15,21 +15,21 @@ int check_defines_C(void)
result = 0;
}
if (strcmp(TARGET_STRING, STRING_VALUE) != 0) {
- fprintf(stderr, "TARGET_STRING has wrong value in C [%s]\n",
- TARGET_STRING);
+ fprintf(stderr, "TARGET_STRING has wrong value in C [%s] vs [%s]\n",
+ TARGET_STRING, STRING_VALUE);
result = 0;
}
{
int x = 2;
int y = 3;
if ((FILE_EXPR) != (EXPR)) {
- fprintf(stderr, "FILE_EXPR did not work in C [%s]\n",
- TO_STRING(FILE_EXPR));
+ fprintf(stderr, "FILE_EXPR did not work in C [%s] vs [%s]\n",
+ TO_STRING(FILE_EXPR), TO_STRING(EXPR));
result = 0;
}
if ((TARGET_EXPR) != (EXPR)) {
- fprintf(stderr, "TARGET_EXPR did not work in C [%s]\n",
- TO_STRING(FILE_EXPR));
+ fprintf(stderr, "TARGET_EXPR did not work in C [%s] vs [%s]\n",
+ TO_STRING(TARGET_EXPR), TO_STRING(EXPR));
result = 0;
}
}
diff --git a/Tests/Preprocess/preprocess.cxx b/Tests/Preprocess/preprocess.cxx
index 34a69c6..f2fffef 100644
--- a/Tests/Preprocess/preprocess.cxx
+++ b/Tests/Preprocess/preprocess.cxx
@@ -12,25 +12,26 @@ int check_defines_CXX()
{
int result = 1;
if (strcmp(FILE_STRING, STRING_VALUE) != 0) {
- fprintf(stderr, "FILE_STRING has wrong value in CXX [%s]\n", FILE_STRING);
+ fprintf(stderr, "FILE_STRING has wrong value in CXX [%s] vs [%s]\n",
+ FILE_STRING, STRING_VALUE);
result = 0;
}
if (strcmp(TARGET_STRING, STRING_VALUE) != 0) {
- fprintf(stderr, "TARGET_STRING has wrong value in CXX [%s]\n",
- TARGET_STRING);
+ fprintf(stderr, "TARGET_STRING has wrong value in CXX [%s] vs [%s]\n",
+ TARGET_STRING, STRING_VALUE);
result = 0;
}
{
int x = 2;
int y = 3;
if ((FILE_EXPR) != (EXPR)) {
- fprintf(stderr, "FILE_EXPR did not work in CXX [%s]\n",
- TO_STRING(FILE_EXPR));
+ fprintf(stderr, "FILE_EXPR did not work in CXX [%s] vs [%s]\n",
+ TO_STRING(FILE_EXPR), TO_STRING(EXPR));
result = 0;
}
if ((TARGET_EXPR) != (EXPR)) {
- fprintf(stderr, "TARGET_EXPR did not work in CXX [%s]\n",
- TO_STRING(FILE_EXPR));
+ fprintf(stderr, "TARGET_EXPR did not work in CXX [%s] vs [%s]\n",
+ TO_STRING(TARGET_EXPR), TO_STRING(EXPR));
result = 0;
}
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json
index 91951c3..3c9ace3 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json
@@ -131,7 +131,20 @@
"dependencies": [
{
"id": "^c_object_lib::@5ed5358f70faf8d8af7a$",
- "backtrace": null
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": 7,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
},
{
"id": "^ZERO_CHECK::@5ed5358f70faf8d8af7a$",
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json
index a33370a..119c91d 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json
@@ -131,7 +131,20 @@
"dependencies": [
{
"id": "^cxx_object_lib::@5ed5358f70faf8d8af7a$",
- "backtrace": null
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": 11,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
},
{
"id": "^ZERO_CHECK::@5ed5358f70faf8d8af7a$",
diff --git a/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-build-check.cmake b/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-build-check.cmake
index f534319..167f5b9 100644
--- a/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-build-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-build-check.cmake
@@ -23,12 +23,11 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_OBJECT_FILES_generatorobj_Release}
- ${TARGET_OBJECT_FILES_emptyobj_Release}
-
EXCLUDE
${TARGET_OBJECT_FILES_generator_Debug}
${TARGET_OBJECT_FILES_generated_Release}
+ ${TARGET_OBJECT_FILES_emptyobj_Release}
${TARGET_OBJECT_FILES_generator_MinSizeRel}
${TARGET_OBJECT_FILES_generated_MinSizeRel}
diff --git a/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-clean-ninja-check.cmake b/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-clean-ninja-check.cmake
index 5e30bfe..1e4cbe1 100644
--- a/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-clean-ninja-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-clean-ninja-check.cmake
@@ -11,8 +11,6 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_OBJECT_FILES_generatorobj_Release}
- ${TARGET_OBJECT_FILES_emptyobj_Release}
-
EXCLUDE
${TARGET_OBJECT_FILES_generator_Debug}
${TARGET_OBJECT_FILES_generated_Debug}
@@ -21,6 +19,7 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_OBJECT_FILES_emptyobj_Debug}
${TARGET_OBJECT_FILES_generated_Release}
+ ${TARGET_OBJECT_FILES_emptyobj_Release}
${TARGET_OBJECT_FILES_generator_MinSizeRel}
${TARGET_OBJECT_FILES_generated_MinSizeRel}
diff --git a/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-release-in-debug-graph-ninja-check.cmake b/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-release-in-debug-graph-ninja-check.cmake
index 9500cda..faf392e 100644
--- a/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-release-in-debug-graph-ninja-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-release-in-debug-graph-ninja-check.cmake
@@ -12,8 +12,6 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_OBJECT_FILES_generatorobj_Debug}
- ${TARGET_OBJECT_FILES_emptyobj_Debug}
-
${TARGET_FILE_generator_Release}
${TARGET_OBJECT_FILES_generator_Release}
@@ -30,6 +28,7 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
EXCLUDE
${TARGET_OBJECT_FILES_generated_Debug}
+ ${TARGET_OBJECT_FILES_emptyobj_Debug}
${TARGET_OBJECT_FILES_generator_MinSizeRel}
${TARGET_OBJECT_FILES_generated_MinSizeRel}
diff --git a/Tests/RunCMake/NinjaMultiConfig/NoUnusedVariables.cmake b/Tests/RunCMake/NinjaMultiConfig/NoUnusedVariables.cmake
new file mode 100644
index 0000000..bb7b160
--- /dev/null
+++ b/Tests/RunCMake/NinjaMultiConfig/NoUnusedVariables.cmake
@@ -0,0 +1 @@
+# Intentionally empty
diff --git a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
index b07b4f7..6472f46 100644
--- a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
@@ -78,8 +78,6 @@ endfunction()
###############################################################################
-set(RunCMake_TEST_NO_CLEAN 1)
-
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Simple-build)
# IMPORTANT: Setting RelWithDebInfo as the first item in CMAKE_CONFIGURATION_TYPES
# generates a build.ninja file with that configuration
@@ -203,6 +201,7 @@ unset(RunCMake_TEST_OPTIONS)
include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
run_cmake_build(FrameworkDependencyAutogen framework Release test2:Debug)
+set(RunCMake_TEST_NO_CLEAN 1)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CustomCommandGenerator-build)
set(RunCMake_TEST_OPTIONS "-DCMAKE_CONFIGURATION_TYPES=Debug\\;Release\\;MinSizeRel\\;RelWithDebInfo;-DCMAKE_CROSS_CONFIGS=all")
run_cmake_configure(CustomCommandGenerator)
@@ -219,6 +218,7 @@ run_cmake_command(CustomCommandGenerator-debug-in-release-graph-generated "${TAR
run_ninja(CustomCommandGenerator debug-in-release-graph-clean build-Debug.ninja clean:Debug)
run_ninja(CustomCommandGenerator release-in-debug-graph build-Debug.ninja generated:Release)
run_cmake_command(CustomCommandGenerator-release-in-debug-graph-generated "${TARGET_FILE_generated_Release}")
+unset(RunCMake_TEST_NO_CLEAN)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CustomCommandsAndTargets-build)
set(RunCMake_TEST_OPTIONS "-DCMAKE_CROSS_CONFIGS=all")
@@ -275,6 +275,16 @@ run_ninja(Install debug-in-release-graph-install build-Release.ninja install:Deb
#run_cmake_configure(AutoMocExecutable)
#run_cmake_build(AutoMocExecutable debug-in-release-graph Release exe)
+# Need to test this manually because run_cmake() adds --no-warn-unused-cli
+set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/NoUnusedVariables-build)
+run_cmake_command(NoUnusedVariables ${CMAKE_COMMAND} ${CMAKE_CURRENT_LIST_DIR}
+ -G "Ninja Multi-Config"
+ "-DRunCMake_TEST=NoUnusedVariables"
+ "-DCMAKE_CROSS_CONFIGS=all"
+ "-DCMAKE_DEFAULT_BUILD_TYPE=Debug"
+ "-DCMAKE_DEFAULT_CONFIGS=all"
+ )
+
if(CMake_TEST_CUDA)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CudaSimple-build)
run_cmake_configure(CudaSimple)
diff --git a/Tests/RunCMake/Syntax/CommandEOF-stderr.txt b/Tests/RunCMake/Syntax/CommandEOF-stderr.txt
index 31cbc08..b9f8fd1 100644
--- a/Tests/RunCMake/Syntax/CommandEOF-stderr.txt
+++ b/Tests/RunCMake/Syntax/CommandEOF-stderr.txt
@@ -1,4 +1,4 @@
-^CMake Error in CommandEOF.cmake:
+^CMake Error at CommandEOF.cmake:1:
Unexpected end of file.
Parse error. Function missing opening "\(".
diff --git a/Tests/RunCMake/cmake_command/RunCMakeTest.cmake b/Tests/RunCMake/cmake_command/RunCMakeTest.cmake
index d338cd8..2b6e7a2 100644
--- a/Tests/RunCMake/cmake_command/RunCMakeTest.cmake
+++ b/Tests/RunCMake/cmake_command/RunCMakeTest.cmake
@@ -6,3 +6,8 @@ run_cmake(cmake_command_invoke_message)
run_cmake(cmake_command_invoke_message_fatal_error)
run_cmake(cmake_command_invoke_no_parameters)
run_cmake(cmake_command_invoke_unknown_function)
+run_cmake(cmake_command_eval_message)
+run_cmake(cmake_command_eval_message_fatal_error)
+run_cmake(cmake_command_eval_no_code)
+run_cmake(cmake_command_eval_no_parameters)
+run_cmake(cmake_command_eval_variable_outside_message)
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_message-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_message-stderr.txt
new file mode 100644
index 0000000..cfc8694
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_message-stderr.txt
@@ -0,0 +1 @@
+WORKS!
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_message.cmake b/Tests/RunCMake/cmake_command/cmake_command_eval_message.cmake
new file mode 100644
index 0000000..9ef5e25
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_message.cmake
@@ -0,0 +1 @@
+cmake_command(EVAL CODE message(WORKS!))
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-result.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-stderr.txt
new file mode 100644
index 0000000..6a8a124
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at cmake_command_eval_message_fatal_error.cmake:1:EVAL:2 \(message\):
+ error!
+Call Stack \(most recent call first\):
+ cmake_command_eval_message_fatal_error.cmake:1 \(cmake_command\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error.cmake b/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error.cmake
new file mode 100644
index 0000000..22913de
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error.cmake
@@ -0,0 +1,5 @@
+cmake_command(EVAL CODE
+"
+ message(FATAL_ERROR error!)
+"
+)
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_no_code-result.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_no_code-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_no_code-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_no_code-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_no_code-stderr.txt
new file mode 100644
index 0000000..ee53312
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_no_code-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at cmake_command_eval_no_code.cmake:1 \(cmake_command\):
+ cmake_command called without CODE argument
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_no_code.cmake b/Tests/RunCMake/cmake_command/cmake_command_eval_no_code.cmake
new file mode 100644
index 0000000..22e1667
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_no_code.cmake
@@ -0,0 +1 @@
+cmake_command(EVAL message "too many parameters")
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-result.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-stderr.txt
new file mode 100644
index 0000000..e9fc317
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at cmake_command_eval_no_parameters.cmake:1 \(cmake_command\):
+ cmake_command called with incorrect number of arguments
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters.cmake b/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters.cmake
new file mode 100644
index 0000000..a5ba2c7
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters.cmake
@@ -0,0 +1 @@
+cmake_command(EVAL)
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message-stderr.txt
new file mode 100644
index 0000000..cfc8694
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message-stderr.txt
@@ -0,0 +1 @@
+WORKS!
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message.cmake b/Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message.cmake
new file mode 100644
index 0000000..b7a06a5
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message.cmake
@@ -0,0 +1,2 @@
+cmake_command(EVAL CODE "set(phrase \"WORKS!\")")
+message(${phrase})