diff options
Diffstat (limited to 'Tests/RunCMake/CheckSourceRuns/CheckOBJCSourceRuns.cmake')
-rw-r--r-- | Tests/RunCMake/CheckSourceRuns/CheckOBJCSourceRuns.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/RunCMake/CheckSourceRuns/CheckOBJCSourceRuns.cmake b/Tests/RunCMake/CheckSourceRuns/CheckOBJCSourceRuns.cmake new file mode 100644 index 0000000..55f28f3 --- /dev/null +++ b/Tests/RunCMake/CheckSourceRuns/CheckOBJCSourceRuns.cmake @@ -0,0 +1,14 @@ +enable_language (OBJC) +include(CheckSourceRuns) + +check_source_runs(OBJC [[ + #import <Foundation/Foundation.h> + int main() { + NSObject *foo; + return 0; + } +]] SHOULD_BUILD) + +if(NOT SHOULD_BUILD) + message(SEND_ERROR "Test fail for valid OBJC source.") +endif() |