Browse Source

CMake: Implement test for HAVE_IOS_BINARY.

Sam Edwards 9 years ago
parent
commit
b326c6e12d
1 changed files with 5 additions and 2 deletions
  1. 5 2
      dtool/LocalSetup.cmake

+ 5 - 2
dtool/LocalSetup.cmake

@@ -101,8 +101,11 @@ int main(int argc, char *argv[]) { return 0; }
 set(HAVE_IOS_TYPEDEFS 1)
 
 # Define if the C++ iostream library defines ios::binary.
-#TODO make test case
-#$[cdefine HAVE_IOS_BINARY]
+check_cxx_source_compiles("
+#include <ios>
+std::ios::openmode binary = std::ios::binary;
+int main(int argc, char *argv[]) { return 0; }
+" HAVE_IOS_BINARY)
 
 # Can we safely call getenv() at static init time?
 #TODO make test case? can we make a reliable one?