diff options
Diffstat (limited to 'Tests/RunCMake')
8 files changed, 110 insertions, 0 deletions
diff --git a/Tests/RunCMake/get_property/RunCMakeTest.cmake b/Tests/RunCMake/get_property/RunCMakeTest.cmake index 6e36473..c4ee53d 100644 --- a/Tests/RunCMake/get_property/RunCMakeTest.cmake +++ b/Tests/RunCMake/get_property/RunCMakeTest.cmake @@ -5,6 +5,7 @@ run_cmake(directory_properties) run_cmake(global_properties) run_cmake(install_properties) run_cmake(source_properties) +run_cmake(source_properties_failures) run_cmake(target_properties) run_cmake(test_properties) run_cmake(DebugConfigurations) diff --git a/Tests/RunCMake/get_property/source_properties_failures-result.txt b/Tests/RunCMake/get_property/source_properties_failures-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/get_property/source_properties_failures-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/get_property/source_properties_failures-stderr.txt b/Tests/RunCMake/get_property/source_properties_failures-stderr.txt new file mode 100644 index 0000000..a500e2e --- /dev/null +++ b/Tests/RunCMake/get_property/source_properties_failures-stderr.txt @@ -0,0 +1,66 @@ +^CMake Error at source_properties_failures.cmake:1 \(set_source_files_properties\): + set_source_files_properties called with incorrect number of arguments no + value provided to the DIRECTORY option +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at source_properties_failures.cmake:2 \(set_source_files_properties\): + set_source_files_properties given non-existent DIRECTORY non_existing_dir +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at source_properties_failures.cmake:3 \(set_source_files_properties\): + set_source_files_properties called with incorrect number of arguments no + value provided to the TARGET_DIRECTORY option +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at source_properties_failures.cmake:4 \(set_source_files_properties\): + set_source_files_properties given non-existent target for DIRECTORY_TARGET + non_existing_target +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at source_properties_failures.cmake:6 \(get_property\): + get_property called with incorrect number of arguments no value provided to + the DIRECTORY option +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at source_properties_failures.cmake:7 \(get_property\): + get_property given non-existent DIRECTORY non_existing_dir +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at source_properties_failures.cmake:8 \(get_property\): + get_property called with incorrect number of arguments no value provided to + the TARGET_DIRECTORY option +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at source_properties_failures.cmake:9 \(get_property\): + get_property given non-existent target for DIRECTORY_TARGET + non_existing_dir +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at source_properties_failures.cmake:11 \(get_source_file_property\): + get_source_file_property given non-existent DIRECTORY PROPERTY +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at source_properties_failures.cmake:12 \(get_source_file_property\): + get_source_file_property called with incorrect number of arguments +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at source_properties_failures.cmake:13 \(get_source_file_property\): + get_source_file_property given non-existent target for DIRECTORY_TARGET + PROPERTY +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at source_properties_failures.cmake:14 \(get_source_file_property\): + get_source_file_property called with incorrect number of arguments +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/source_properties_failures.cmake b/Tests/RunCMake/get_property/source_properties_failures.cmake new file mode 100644 index 0000000..f4b87f9 --- /dev/null +++ b/Tests/RunCMake/get_property/source_properties_failures.cmake @@ -0,0 +1,14 @@ +set_source_files_properties(a.txt DIRECTORY PROPERTIES COMPILE_DEFINITIONS "def") +set_source_files_properties(a.txt DIRECTORY non_existing_dir PROPERTIES COMPILE_DEFINITIONS "def") +set_source_files_properties(a.txt TARGET_DIRECTORY PROPERTIES COMPILE_DEFINITIONS "def") +set_source_files_properties(a.txt TARGET_DIRECTORY non_existing_target PROPERTIES COMPILE_DEFINITIONS "def") + +get_property(in_var SOURCE a.txt DIRECTORY PROPERTY COMPILE_DEFINITIONS) +get_property(in_var SOURCE a.txt DIRECTORY non_existing_dir PROPERTY COMPILE_DEFINITIONS) +get_property(in_var SOURCE a.txt TARGET_DIRECTORY PROPERTY COMPILE_DEFINITIONS) +get_property(in_var SOURCE a.txt TARGET_DIRECTORY non_existing_dir PROPERTY COMPILE_DEFINITIONS) + +get_source_file_property(in_var a.txt DIRECTORY PROPERTY COMPILE_DEFINITIONS) +get_source_file_property(in_var a.txt DIRECTORY non_existing_dir PROPERTY COMPILE_DEFINITIONS) +get_source_file_property(in_var a.txt TARGET_DIRECTORY PROPERTY COMPILE_DEFINITIONS) +get_source_file_property(in_var a.txt TARGET_DIRECTORY non_existing_dir PROPERTY COMPILE_DEFINITIONS) diff --git a/Tests/RunCMake/set_property/RunCMakeTest.cmake b/Tests/RunCMake/set_property/RunCMakeTest.cmake index 8d4614c..692c6b9 100644 --- a/Tests/RunCMake/set_property/RunCMakeTest.cmake +++ b/Tests/RunCMake/set_property/RunCMakeTest.cmake @@ -9,6 +9,7 @@ run_cmake(LINK_OPTIONS) run_cmake(LINK_DIRECTORIES) run_cmake(LINK_LIBRARIES) run_cmake(SOURCES) +run_cmake(SOURCE_FILE) run_cmake(TYPE) run_cmake(USER_PROP) run_cmake(USER_PROP_INHERITED) diff --git a/Tests/RunCMake/set_property/SOURCE_FILE-result.txt b/Tests/RunCMake/set_property/SOURCE_FILE-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/set_property/SOURCE_FILE-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/set_property/SOURCE_FILE-stderr.txt b/Tests/RunCMake/set_property/SOURCE_FILE-stderr.txt new file mode 100644 index 0000000..2e0b238 --- /dev/null +++ b/Tests/RunCMake/set_property/SOURCE_FILE-stderr.txt @@ -0,0 +1,22 @@ +^CMake Error at SOURCE_FILE.cmake:1 \(set_property\): + set_property called with incorrect number of arguments no value provided to + the DIRECTORY option +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at SOURCE_FILE.cmake:2 \(set_property\): + set_property given non-existent DIRECTORY non_existing_dir +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at SOURCE_FILE.cmake:3 \(set_property\): + set_property called with incorrect number of arguments no value provided to + the TARGET_DIRECTORY option +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at SOURCE_FILE.cmake:4 \(set_property\): + set_property given non-existent target for DIRECTORY_TARGET + non_existing_target +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/set_property/SOURCE_FILE.cmake b/Tests/RunCMake/set_property/SOURCE_FILE.cmake new file mode 100644 index 0000000..b1d78bd --- /dev/null +++ b/Tests/RunCMake/set_property/SOURCE_FILE.cmake @@ -0,0 +1,4 @@ +set_property(SOURCE a.txt DIRECTORY PROPERTY COMPILE_DEFINITIONS "def") +set_property(SOURCE a.txt DIRECTORY non_existing_dir PROPERTY COMPILE_DEFINITIONS "def") +set_property(SOURCE a.txt TARGET_DIRECTORY PROPERTY COMPILE_DEFINITIONS "def") +set_property(SOURCE a.txt TARGET_DIRECTORY non_existing_target PROPERTY COMPILE_DEFINITIONS "def") |