Tests: Add RunCMake.try_compile case covering empty value arguments

This commit is contained in:
Brad King
2022-06-28 11:30:19 -04:00
parent 6a85813806
commit e1d4984706
4 changed files with 15 additions and 0 deletions

View File

@@ -0,0 +1 @@
1

View File

@@ -0,0 +1,9 @@
CMake Error at EmptyValueArgs.cmake:[0-9]+ \(try_compile\):
COPY_FILE must be followed by a file path
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)
+
CMake Error at EmptyValueArgs.cmake:[0-9]+ \(try_compile\):
COPY_FILE_ERROR must be followed by a variable name
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)

View File

@@ -0,0 +1,4 @@
try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src.c
COPY_FILE "")
try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src.c
COPY_FILE "x" COPY_FILE_ERROR "")

View File

@@ -17,6 +17,7 @@ run_cmake(NonSourceCopyFile)
run_cmake(NonSourceCompileDefinitions)
run_cmake(BinDirEmpty)
run_cmake(BinDirRelative)
run_cmake(EmptyValueArgs)
run_cmake(EmptyListArgs)
run_cmake(EnvConfig)