Skip to content

Commit 435d9ff

Browse files
committed
[C++] Pass C and C++ compilers to subprojects.
If a compiler set different from CC and CXX is used to build SBE and tests are enabled by using CMAKE_C_COMPILER and CMAKE_CXX_COMPILER, SBE source and the tests are built using different compilers.
1 parent ee02378 commit 435d9ff

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ if(SBE_TESTS)
5252
URL ${CMAKE_CURRENT_SOURCE_DIR}/cppbuild/googletest-release-1.8.0.zip
5353
URL_MD5 adfafc8512ab65fd3cf7955ef0100ff5
5454
PREFIX "${SBE_THIRDPARTY_BINARY_DIR}/gtest"
55+
CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER};-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
5556
BUILD_BYPRODUCTS "${SBE_THIRDPARTY_BINARY_DIR}/gtest/src/gtest-build/googlemock/${CMAKE_CFG_INTDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gmock${CMAKE_STATIC_LIBRARY_SUFFIX};${SBE_THIRDPARTY_BINARY_DIR}/gtest/src/gtest-build/googlemock/${CMAKE_CFG_INTDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gmock_main${CMAKE_STATIC_LIBRARY_SUFFIX}"
5657
INSTALL_COMMAND ""
5758
LOG_CONFIGURE ON

0 commit comments

Comments
 (0)