summaryrefslogtreecommitdiffstats
path: root/Tests/SourceFileProperty
diff options
context:
space:
mode:
authorTushar Maheshwari <tushar27192@gmail.com>2019-08-27 16:58:34 (GMT)
committerTushar Maheshwari <tushar27192@gmail.com>2019-08-27 16:58:34 (GMT)
commit41ba3e28e6840fd560a537d400146d2cde67a239 (patch)
treeceeecdbd986e4b426c4a0aab2bcf40adaa599fac /Tests/SourceFileProperty
parenta40744c81a8d6dad994def5a63103fc229a75afc (diff)
downloadCMake-41ba3e28e6840fd560a537d400146d2cde67a239.zip
CMake-41ba3e28e6840fd560a537d400146d2cde67a239.tar.gz
CMake-41ba3e28e6840fd560a537d400146d2cde67a239.tar.bz2
Tests: Collect SourceFileProperty tests
- Move the related test from COnly to SourceFileProperty - Cover `get_source_file_property` and `get_property(... SOURCE ...)`
Diffstat (limited to 'Tests/SourceFileProperty')
-rw-r--r--Tests/SourceFileProperty/CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/Tests/SourceFileProperty/CMakeLists.txt b/Tests/SourceFileProperty/CMakeLists.txt
index 5dbc34f..5e55f7b 100644
--- a/Tests/SourceFileProperty/CMakeLists.txt
+++ b/Tests/SourceFileProperty/CMakeLists.txt
@@ -16,7 +16,12 @@ endif ()
add_executable(SourceFileProperty main.c)
target_sources(SourceFileProperty PRIVATE ICaseTest.c)
-get_property(LANG SOURCE ICaseTest.c PROPERTY LANGUAGE)
-if (NOT "${LANG}" STREQUAL "C")
+get_source_file_property(LANG_MAIN main.c LANGUAGE)
+if(NOT "${LANG_MAIN}" STREQUAL "C")
+ message(FATAL_ERROR "Bad language for file main.c")
+endif()
+
+get_property(LANG_TEST SOURCE ICaseTest.c PROPERTY LANGUAGE)
+if (NOT "${LANG_TEST}" STREQUAL "C")
message(FATAL_ERROR "Bad language for file ICaseTest.c")
endif ()