Skip to content
Snippets Groups Projects
Commit 6c8c49e6 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

parallel build with msvc, 2nd try

parent 00f770f4
Branches
Tags
No related merge requests found
Pipeline #
......@@ -56,7 +56,7 @@ windows64_msvc_ci:
- md build
- cd build
- cmake -DGMSH_EXTRA_VERSION=%EXTRA_VERSION:~0,13% ..
- msbuild /m package.vcxproj
- msbuild package.vcxproj
tags:
- windows64
- official
......
......@@ -199,17 +199,18 @@ endif(NOT ENABLE_BUILD_SHARED)
if(MSVC)
# remove annoying warning about bool/int cast performance
set(GMSH_CONFIG_PRAGMAS "#pragma warning(disable:4800 4244 4267)")
if(ENABLE_MSVC_STATIC_RUNTIME)
foreach(VAR
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
if(${VAR} MATCHES "/MD")
if(ENABLE_MSVC_STATIC_RUNTIME AND ${VAR} MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${VAR} "${${VAR}}")
endif(${VAR} MATCHES "/MD")
endif(ENABLE_MSVC_STATIC_RUNTIME AND ${VAR} MATCHES "/MD")
if(NOT ${VAR} MATCHES "/MP") # enable parallel compilation
set(${VAR} "${${VAR}} /MP")
endif(NOT ${VAR} MATCHES "/MP")
endforeach(VAR)
endif(ENABLE_MSVC_STATIC_RUNTIME)
if(ENABLE_BUILD_DYNAMIC OR ENABLE_BUILD_SHARED)
# automatically export .def file with all symbols (requires CMake 3.4);
# depending on the compiling options this might lead to more than 64k export
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment