Mercurial > hg > orthanc-stone
diff Applications/Samples/CMakeLists.txt @ 548:d10a295b607a ct-pet-dose-struct
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 02 Apr 2019 13:27:51 +0200 |
parents | d4046c7f284d |
children | adc1be326b62 |
line wrap: on
line diff
--- a/Applications/Samples/CMakeLists.txt Tue Apr 02 11:54:28 2019 +0200 +++ b/Applications/Samples/CMakeLists.txt Tue Apr 02 13:27:51 2019 +0200 @@ -12,6 +12,20 @@ add_definitions(-DOPENSSL_NO_CAPIENG=1) endif() + +# the following block has been borrowed from orthanc/**/Compiler.cmake +if (MSVC_MULTIPLE_PROCESSES) +# "If you omit the processMax argument in the /MP option, the +# compiler obtains the number of effective processors from the +# operating system, and then creates one process per effective +# processor" +# https://blog.kitware.com/cmake-building-with-all-your-cores/ +# https://docs.microsoft.com/en-us/cpp/build/reference/mp-build-with-multiple-processes +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") +endif() + + #set(ENABLE_DCMTK ON) set(ENABLE_SDL OFF CACHE BOOL "Target SDL Native application")