diff options
Diffstat (limited to 'Tests/RunCMake/CheckSourceCompiles/CheckSourceCompilesOBJC.cmake')
-rw-r--r-- | Tests/RunCMake/CheckSourceCompiles/CheckSourceCompilesOBJC.cmake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/CheckSourceCompiles/CheckSourceCompilesOBJC.cmake b/Tests/RunCMake/CheckSourceCompiles/CheckSourceCompilesOBJC.cmake new file mode 100644 index 0000000..76a5009 --- /dev/null +++ b/Tests/RunCMake/CheckSourceCompiles/CheckSourceCompilesOBJC.cmake @@ -0,0 +1,16 @@ +enable_language (OBJC) +include(CheckSourceCompiles) + +set(OBJC 1) # test that this is tolerated + +check_source_compiles(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() |