diff options
Diffstat (limited to 'Tests/RunCMake/XcodeProject')
-rw-r--r-- | Tests/RunCMake/XcodeProject/ImplicitCMakeLists-check.cmake | 20 | ||||
-rw-r--r-- | Tests/RunCMake/XcodeProject/ImplicitCMakeLists.cmake | 0 | ||||
-rw-r--r-- | Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 1 |
3 files changed, 21 insertions, 0 deletions
diff --git a/Tests/RunCMake/XcodeProject/ImplicitCMakeLists-check.cmake b/Tests/RunCMake/XcodeProject/ImplicitCMakeLists-check.cmake new file mode 100644 index 0000000..c6bbc1b --- /dev/null +++ b/Tests/RunCMake/XcodeProject/ImplicitCMakeLists-check.cmake @@ -0,0 +1,20 @@ +set(xcProjectFile "${RunCMake_TEST_BINARY_DIR}/ImplicitCMakeLists.xcodeproj/project.pbxproj") +if(NOT EXISTS "${xcProjectFile}") + set(RunCMake_TEST_FAILED "Project file ${xcProjectFile} does not exist.") + return() +endif() + +set(foundCMakeLists 0) +file(STRINGS "${xcProjectFile}" lines) +foreach(line IN LISTS lines) + if(line MATCHES "PBXFileReference.*CMakeLists.txt") + if(foundCMakeLists) + set(RunCMake_TEST_FAILED "CMakeLists.txt referenced multiple times") + return() + endif() + set(foundCMakeLists 1) + endif() +endforeach() +if(NOT foundCMakeLists) + set(RunCMake_TEST_FAILED "CMakeLists.txt not referenced") +endif() diff --git a/Tests/RunCMake/XcodeProject/ImplicitCMakeLists.cmake b/Tests/RunCMake/XcodeProject/ImplicitCMakeLists.cmake new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/ImplicitCMakeLists.cmake diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index 1dfa8b2..9e82841 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -1,6 +1,7 @@ include(RunCMake) run_cmake(ExplicitCMakeLists) +run_cmake(ImplicitCMakeLists) run_cmake(XcodeFileType) run_cmake(XcodeAttributeLocation) |