cmake: Move /MP flag to MSVC compile flag section

This commit is contained in:
Florent Castelli 2017-01-25 06:08:19 +01:00
parent 221f991f1e
commit 2fd034789e
1 changed files with 5 additions and 5 deletions

View File

@ -191,6 +191,11 @@ endif()
if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
check_and_add_flag(EXCEPTIONS /EHsc)
# Only MSBuild needs this, other generators will compile one file at a time
if(CMAKE_GENERATOR MATCHES "Visual Studio")
add_compile_options("/MP")
endif()
else()
add_definitions(-D_DEFAULT_SOURCE)
check_and_add_flag(HAVE_WALL -Wall)
@ -238,11 +243,6 @@ else()
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
# Only MSBuild needs this, other generators will compile one file at a time
if(CMAKE_GENERATOR MATCHES "Visual Studio")
add_compile_options("/MP")
endif()
add_definitions(-DNOMINMAX)
add_definitions(-DUNICODE)
add_definitions(-D_UNICODE)