Instructions on porting Yzis

From Yzis Wiki

Jump to: navigation, search

Random thoughts

cmake files

Inside cmake files (CMakeLists.txt) the following defines can be used

  • MSVC : when compiling on windows using the Microsoft Virtual C++ compiler
  • MINGW : when compiling on windows using mingw32 compiler
  • UNIX
  • APPLE

Examples:

 if (MINGW)
     # do something if we are using MINGW
 endif (MINGW)
 if (NOT UNIX)
     # do something if we are NOT on Unix
 endif (NOT UNIX)

Defines

Inside the code, the following defines can be used:

  • YZIS_WIN32 when compiling under windows (either mingw32 or msvc)
  • YZIS_WIN32_GCC when compiling under windows/mingw32
  • YZIS_WIN32_MSVC when compiling under windows/msvc
  • YZIS_UNIX on unix
  • YZIS_APPLE on MacOsX

Examples:

 #ifdef YZIS_UNIX
         // do something if we are on Unix
 #endif
 #ifndef YZIS_APPLE
         // something if we are NOT on Apple MacOS X
 #endif
Personal tools