CMakeNMakeWindowsSystemConfig.cmake 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. # Microsoft specific config file
  2. SET (WORDS_BIGENDIAN )
  3. SET (HAVE_LIMITS_H 1)
  4. SET (HAVE_UNISTD_H 1)
  5. # Suffixes
  6. SET (CMAKE_EXECUTABLE_SUFFIX ".exe" CACHE STRING
  7. "Executable suffix.")
  8. SET (CMAKE_MODULE_SUFFIX ".dll" CACHE STRING
  9. "Module library suffix.")
  10. SET (CMAKE_OBJECT_FILE_SUFFIX ".obj" CACHE STRING
  11. "Object file suffix.")
  12. SET (CMAKE_SHLIB_SUFFIX ".dll" CACHE STRING
  13. "Shared library suffix.")
  14. SET (CMAKE_STATICLIB_SUFFIX ".lib" CACHE STRING
  15. "Static library suffix.")
  16. # ANSI
  17. SET (CMAKE_ANSI_CFLAGS "" CACHE INTERNAL
  18. "What flags are required by the c++ compiler to make it ansi.")
  19. # Build type
  20. SET (CMAKE_BUILD_TYPE Debug CACHE STRING
  21. "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel.")
  22. # C++
  23. SET (CMAKE_CXX_COMPILER cl CACHE FILEPATH
  24. "Name of C++ compiler used.")
  25. SET (CMAKE_CXX_FLAGS "/W3 /Zm1000 /GX /GR" CACHE STRING
  26. "Flags used by the compiler during all build types, /GX /GR are for exceptions and rtti in VC++, /Zm1000 increases the compiler's memory allocation to support ANSI C++/stdlib.")
  27. SET (CMAKE_CXX_FLAGS_DEBUG "/MDd /Zi /Od /GZ" CACHE STRING
  28. "Flags used by the compiler during debug builds.")
  29. SET (CMAKE_CXX_FLAGS_MINSIZEREL "/MD /O1" CACHE STRING
  30. "Flags used by the compiler during release minsize builds.")
  31. SET (CMAKE_CXX_FLAGS_RELEASE "/MD /O2" CACHE STRING
  32. "Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
  33. SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD /Zi /O2" CACHE STRING
  34. "Flags used by the compiler during Release with Debug Info builds.")
  35. # C
  36. SET (CMAKE_C_COMPILER cl CACHE FILEPATH
  37. "Name of C compiler used.")
  38. SET (CMAKE_C_FLAGS "/W3 /Zm1000" CACHE STRING
  39. "Flags for C compiler.")
  40. SET (CMAKE_C_LIBPATH_FLAG "-LIBPATH:" CACHE STRING
  41. "Flags used to specify a link path. No space will be appended.")
  42. SET (CMAKE_C_LINK_EXECUTABLE_FLAG "/link" CACHE STRING
  43. "Flags used to create an executable.")
  44. SET (CMAKE_C_OUTPUT_EXECUTABLE_FILE_FLAG "/Fe" CACHE STRING
  45. "Flags used to specify executable filename. No space will be appended.")
  46. SET (CMAKE_C_OUTPUT_OBJECT_FILE_FLAG "/Fo" CACHE STRING
  47. "Flags used to specify output filename. No space will be appended.")
  48. # Library manager
  49. SET (CMAKE_LIBRARY_MANAGER lib CACHE FILEPATH
  50. "Name of the library manager used (static lib).")
  51. SET (CMAKE_LIBRARY_MANAGER_FLAGS "/nologo" CACHE STRING
  52. "Flags used by the library manager.")
  53. SET (CMAKE_LIBRARY_MANAGER_OUTPUT_FILE_FLAG "/out:" CACHE STRING
  54. "Flags used to specify output filename by the library manager. No space will be appended.")
  55. # Linker (DLL/exe)
  56. SET (CMAKE_LINKER link CACHE FILEPATH
  57. "Name of linker used.")
  58. SET (CMAKE_LINKER_FLAGS "/nologo /STACK:10000000 /machine:I386" CACHE STRING
  59. "Flags used by the linker.")
  60. SET (CMAKE_LINKER_FLAGS_DEBUG "/debug /pdbtype:sept" CACHE STRING
  61. "Flags used by the linker during debug builds.")
  62. SET (CMAKE_LINKER_FLAGS_MINSIZEREL "/stack:0x989680" CACHE STRING
  63. "Flags used by the linker during release minsize builds.")
  64. SET (CMAKE_LINKER_FLAGS_RELEASE "" CACHE STRING
  65. "Flags used by the linker during release builds.")
  66. SET (CMAKE_LINKER_FLAGS_RELWITHDEBINFO "/debug /pdbtype:sept" CACHE STRING
  67. "Flags used by the linker during Release with Debug Info builds.")
  68. SET (CMAKE_LINKER_OUTPUT_FILE_FLAG "/out:" CACHE STRING
  69. "Flags used to specify output filename by the linker. No space will be appended.")
  70. SET (CMAKE_LINKER_SHARED_LIBRARY_FLAG "/dll" CACHE STRING
  71. "Flags used to create a shared library.")
  72. # Standard lib
  73. SET (CMAKE_STANDARD_WINDOWS_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" CACHE STRING
  74. "Libraries linked by defalut with all applications.")
  75. # Make
  76. SET (CMAKE_MAKE_PROGRAM "nmake" CACHE STRING
  77. "Program used to build from makefiles.")
  78. # Threads
  79. SET (CMAKE_USE_WIN32_THREADS 1 CACHE BOOL
  80. "Use the win32 thread library.")
  81. # The following variables are advanced
  82. MARK_AS_ADVANCED(
  83. WORDS_BIGENDIAN
  84. HAVE_LIMITS_H
  85. HAVE_UNISTD_H
  86. CMAKE_EXECUTABLE_SUFFIX
  87. CMAKE_MODULE_SUFFIX
  88. CMAKE_OBJECT_FILE_SUFFIX
  89. CMAKE_SHLIB_SUFFIX
  90. CMAKE_STATICLIB_SUFFIX
  91. CMAKE_ANSI_CFLAGS
  92. CMAKE_BUILD_TYPE
  93. CMAKE_CXX_COMPILER
  94. CMAKE_CXX_FLAGS
  95. CMAKE_CXX_FLAGS_DEBUG
  96. CMAKE_CXX_FLAGS_MINSIZEREL
  97. CMAKE_CXX_FLAGS_RELEASE
  98. CMAKE_CXX_FLAGS_RELWITHDEBINFO
  99. CMAKE_C_COMPILER
  100. CMAKE_C_FLAGS
  101. CMAKE_C_LIBPATH_FLAG
  102. CMAKE_C_LINK_EXECUTABLE_FLAG
  103. CMAKE_C_OUTPUT_EXECUTABLE_FILE_FLAG
  104. CMAKE_C_OUTPUT_OBJECT_FILE_FLAG
  105. CMAKE_LIBRARY_MANAGER
  106. CMAKE_LIBRARY_MANAGER_FLAGS
  107. CMAKE_LIBRARY_MANAGER_OUTPUT_FILE_FLAG
  108. CMAKE_LINKER
  109. CMAKE_LINKER_FLAGS
  110. CMAKE_LINKER_FLAGS_DEBUG
  111. CMAKE_LINKER_FLAGS_MINSIZEREL
  112. CMAKE_LINKER_FLAGS_RELEASE
  113. CMAKE_LINKER_FLAGS_RELWITHDEBINFO
  114. CMAKE_LINKER_OUTPUT_FILE_FLAG
  115. CMAKE_LINKER_SHARED_LIBRARY_FLAG
  116. CMAKE_MAKE_PROGRAM
  117. CMAKE_STANDARD_WINDOWS_LIBRARIES
  118. CMAKE_USE_WIN32_THREADS
  119. )