diff options
Diffstat (limited to 'Tests/RunCMake/CheckSourceRuns/CheckOBJCXXSourceRuns.cmake')
-rw-r--r-- | Tests/RunCMake/CheckSourceRuns/CheckOBJCXXSourceRuns.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/RunCMake/CheckSourceRuns/CheckOBJCXXSourceRuns.cmake b/Tests/RunCMake/CheckSourceRuns/CheckOBJCXXSourceRuns.cmake new file mode 100644 index 0000000..a218acd --- /dev/null +++ b/Tests/RunCMake/CheckSourceRuns/CheckOBJCXXSourceRuns.cmake @@ -0,0 +1,17 @@ +enable_language (OBJCXX) +include(CheckSourceRuns) + +check_source_runs(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() |