1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 16:55:20 +03:00

Enable multiprocessor compilation on windows

This commit is contained in:
Andre Bernet 2016-12-08 22:31:00 +01:00
parent ec56d2dbdb
commit f99cba75d1
3 changed files with 3 additions and 3 deletions

View file

@ -55,7 +55,7 @@ endif()
add_definitions(-DQXT_STATIC)
if(MSVC)
set(CMAKE_CXX_FLAGS "/EHsc /LD")
set(CMAKE_CXX_FLAGS "/EHsc /LD /MP")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS,5.01")
include_directories(${PROJECT_SOURCE_DIR}/winbuild C:/Programs/pthreads/Pre-built.2/include C:/Programs/msinttypes C:/Programs/dirent/include)
link_directories(C:/Programs/pthreads/Pre-built.2/lib/)

View file

@ -411,7 +411,7 @@ if(NOT MSVC)
else()
set(CMAKE_C_COMPILER avr-gcc)
set(CMAKE_CXX_COMPILER avr-gcc)
set(CMAKE_CXX_FLAGS "-mmcu=${MCU} -DF_CPU=16000000UL -O${OPT} -gdwarf-2 -fno-exceptions -flto -fwhole-program -fno-inline-small-functions -mstrict-X ${WARNING_FLAGS}")
set(CMAKE_CXX_FLAGS "-mmcu=${MCU} -DF_CPU=16000000UL -O${OPT} -gdwarf-2 -fno-exceptions -flto -fwhole-program -fno-inline-small-functions -mstrict-X ${WARNING_FLAGS} /MP")
# Remove once the minimum cmake version is set to 3.1 in the main CmakeLists.tx
if (${CMAKE_VERSION} VERSION_LESS 3.1.0})

View file

@ -39,7 +39,7 @@ if(Qt5Widgets_FOUND)
endif()
if(MSVC)
set(CMAKE_CXX_FLAGS "/EHsc /LD")
set(CMAKE_CXX_FLAGS "/EHsc /LD /MP")
include_directories(${PROJECT_SOURCE_DIR}/winbuild C:/Programs/pthreads/Pre-built.2/include C:/Programs/msinttypes C:/Programs/dirent/include)
target_link_libraries(${SIMULATOR_TARGET} PRIVATE C:/Programs/pthreads/Pre-built.2/lib/pthreadVC2.lib)
else()