diff --git a/CMakeLists.txt b/CMakeLists.txt index 65570b445..ee69fe1d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,6 +166,10 @@ if(CMAKE_COMPILER_IS_GNUCC) set(OPENJPEG_LIBRARY_COMPILE_OPTIONS ${OPENJPEG_LIBRARY_COMPILE_OPTIONS} "$<$:-ffast-math>") set(OPENJP2_COMPILE_OPTIONS ${OPENJP2_COMPILE_OPTIONS} "$<$:-ffast-math>" -Wall -Wextra -Wconversion -Wunused-parameter -Wdeclaration-after-statement -Werror=declaration-after-statement -Wstrict-prototypes -Werror=strict-prototypes -Wmissing-prototypes -Werror=missing-prototypes) endif() +if(MSVC) + # Parallel source file compilation in MSVC + set(OPENJP2_COMPILE_OPTIONS ${OPENJP2_COMPILE_OPTIONS} "/MP") +endif() #----------------------------------------------------------------------------- # opj_config.h generation (1/2)