Skip to content

Commit f132bae

Browse files
committed
[3.5.1] compile MSVC++ project with /bigobj option and forward runtime environment configuration to tacopie. #71
1 parent c2802c4 commit f132bae

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

CMakeLists.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ project(${PROJECT} CXX)
4545
# compilation options
4646
###
4747
IF (WIN32)
48-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /O2")
48+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /O2 /bigobj")
4949

5050
# was causing conflics with gtest build
5151
string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
@@ -168,9 +168,17 @@ install (DIRECTORY ${CPP_REDIS_INCLUDES}/ DESTINATION include USE_SOURCE_PERMISS
168168
# tacopie
169169
###
170170
IF (NOT USE_CUSTOM_TCP_CLIENT)
171+
# Path to tacopie
172+
set(TACOPIE_CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${PROJECT_SOURCE_DIR}/deps")
173+
# For windows, forward the runtime environment configuration
174+
IF (WIN32)
175+
set(TACOPIE_CMAKE_ARGS "${TACOPIE_CMAKE_ARGS} -DMSVC_RUNTIME_LIBRARY_CONFIG=${MSVC_RUNTIME_LIBRARY_CONFIG}")
176+
ENDIF (WIN32)
177+
178+
# Add tacopie as dependency
171179
ExternalProject_Add("tacopie"
172180
GIT_SUBMODULES ""
173-
CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${PROJECT_SOURCE_DIR}/deps"
181+
CMAKE_ARGS ${TACOPIE_CMAKE_ARGS}
174182
SOURCE_DIR "${PROJECT_SOURCE_DIR}/tacopie")
175183
ENDIF (NOT USE_CUSTOM_TCP_CLIENT)
176184

tacopie

0 commit comments

Comments
 (0)