make the /mp compile flag optional

This commit is contained in:
MA-DEVELOP\apeltauer
2019-04-10 06:55:53 +02:00
committed by wmayer
parent ab2338d9ac
commit debcb95709

View File

@@ -1180,10 +1180,14 @@ IF(MSVC)
IF(FREECAD_RELEASE_SEH)
SET (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /EHa")
ENDIF(FREECAD_RELEASE_SEH)
OPTION(MP_COMPILE_FLAG "Add /MP flag to the compiler definitions. Speeds up the compile on multi processor machines" OFF)
if( MP_COMPILE_FLAG )
# set "Build with Multiple Processes"
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
endif()
# Mark 32 bit executables large address aware so they can use > 2GB address space
# NOTE: This setting only has an effect on machines with at least 3GB of RAM, although it sets the linker option it doesn't set the linker switch 'Enable Large Addresses'
IF(CMAKE_SIZEOF_VOID_P EQUAL 4)