Skip to content

Commit

Permalink
make the /mp compile flag optional
Browse files Browse the repository at this point in the history
  • Loading branch information
apeltauer authored and wwmayer committed Apr 14, 2019
1 parent ab2338d commit debcb95
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Expand Up @@ -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)
Expand Down

0 comments on commit debcb95

Please sign in to comment.