Przeglądaj źródła

- CMake: enable multicore compilation with msvc.

Alexander Gessler 12 lat temu
rodzic
commit
b786d6e375
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      CMakeLists.txt

+ 3 - 0
CMakeLists.txt

@@ -22,6 +22,9 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
   add_definitions(-fPIC) # this is a very important switch and some libraries seem now to have it....
   add_definitions(-fPIC) # this is a very important switch and some libraries seem now to have it....
   ## hide all not-exported symbols
   ## hide all not-exported symbols
   add_definitions( -fvisibility=hidden -Wall )
   add_definitions( -fvisibility=hidden -Wall )
+elseif(MSVC)
+  # enable multi-core compilation with MSVC
+  add_definitions(/MP)
 endif()
 endif()
 
 
 INCLUDE (FindPkgConfig)
 INCLUDE (FindPkgConfig)