diff options
Diffstat (limited to 'Tests/RunCMake/CheckSourceCompiles/CheckOBJCXXSourceCompiles.cmake')
-rw-r--r-- | Tests/RunCMake/CheckSourceCompiles/CheckOBJCXXSourceCompiles.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/RunCMake/CheckSourceCompiles/CheckOBJCXXSourceCompiles.cmake b/Tests/RunCMake/CheckSourceCompiles/CheckOBJCXXSourceCompiles.cmake new file mode 100644 index 0000000..805d513 --- /dev/null +++ b/Tests/RunCMake/CheckSourceCompiles/CheckOBJCXXSourceCompiles.cmake @@ -0,0 +1,17 @@ +enable_language (OBJCXX) +include(CheckSourceCompiles) + +check_source_compiles(OBJCXX [[ + #include <vector> + #import <Foundation/Foundation.h> + int main() { + std::vector<int> v; + NSObject *foo; + return 0; + } +]] SHOULD_BUILD) + + +if(NOT SHOULD_BUILD) + message(SEND_ERROR "Test fail for OBJCXX source.") +endif() |