From 56bd77af4e9dee059f374b3ba32141f030c489f0 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 29 Aug 2018 15:51:09 +0200 Subject: [PATCH] cmake: enable parallel build on MSVC --- cmake_configure.cmake | 4 ++++ cmake_options.cmake | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake_configure.cmake b/cmake_configure.cmake index e030c859..b466f73f 100644 --- a/cmake_configure.cmake +++ b/cmake_configure.cmake @@ -21,6 +21,10 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") "_SCL_SECURE_NO_WARNINGS" "_CRT_SECURE_NO_WARNINGS" ) + target_compile_options(rw_interface + INTERFACE + "/MP" + ) else() message(FATAL_ERROR "Unknown compiler ID: '${CMAKE_CXX_COMPILER_ID}'") endif() diff --git a/cmake_options.cmake b/cmake_options.cmake index 3d3fae67..2243b549 100644 --- a/cmake_options.cmake +++ b/cmake_options.cmake @@ -16,7 +16,7 @@ set(FILESYSTEM_LIBRARY "BOOST" CACHE STRING "Which filesystem library to use") set_property(CACHE FILESYSTEM_LIBRARY PROPERTY STRINGS "CXX17" "CXXTS" "BOOST") if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: Debug Release") + set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel") endif() option(CHECK_IWYU "Enable IncludeWhatYouUse (Analyze #includes in C and C++ source files)")