Skip to content

Commit

Permalink
compile time improved on MSVC with /MP flag
Browse files Browse the repository at this point in the history
  • Loading branch information
chambbj committed May 31, 2013
1 parent cb86468 commit 7197051
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion CMakeLists.txt
Expand Up @@ -151,7 +151,19 @@ if(WIN32)
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()
endif()

if(MSVC90 OR MSVC10 OR MSVC11)
if (NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} LESS 2.8.6)
include(ProcessorCount)
ProcessorCount(N)
if(NOT N EQUAL 0)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP${N}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP${N}")
endif()
endif()
endif()

endif(MSVC)

set(CMAKE_INCLUDE_PATH c:/osgeo4w/include;$ENV{CMAKE_INCLUDE_PATH})
set(CMAKE_LIBRARY_PATH c:/osgeo4w/lib;$ENV{CMAKE_LIBRARY_PATH})
Expand Down

0 comments on commit 7197051

Please sign in to comment.