From fbb0bd7556f1fe7c6e9540e1a40af085c7861032 Mon Sep 17 00:00:00 2001 From: Joe Burzinski Date: Mon, 18 Nov 2019 21:45:14 -0600 Subject: [PATCH] Update tests that generate CMake projects to use the CMAKE_CXX_COMPILER the main project was CMake'd with. Fixes #1747. --- test/cmake_add_subdirectory/CMakeLists.txt | 1 + test/cmake_import/CMakeLists.txt | 1 + test/cmake_import_minver/CMakeLists.txt | 1 + 3 files changed, 3 insertions(+) diff --git a/test/cmake_add_subdirectory/CMakeLists.txt b/test/cmake_add_subdirectory/CMakeLists.txt index ad04547e..4fa9eb88 100644 --- a/test/cmake_add_subdirectory/CMakeLists.txt +++ b/test/cmake_add_subdirectory/CMakeLists.txt @@ -1,6 +1,7 @@ add_test(NAME cmake_add_subdirectory_configure COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" + -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -Dnlohmann_json_source=${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/project ) diff --git a/test/cmake_import/CMakeLists.txt b/test/cmake_import/CMakeLists.txt index 24d4a33a..af3c891c 100644 --- a/test/cmake_import/CMakeLists.txt +++ b/test/cmake_import/CMakeLists.txt @@ -2,6 +2,7 @@ add_test(NAME cmake_import_configure COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -A "${CMAKE_GENERATOR_PLATFORM}" + -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -Dnlohmann_json_DIR=${PROJECT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/project ) diff --git a/test/cmake_import_minver/CMakeLists.txt b/test/cmake_import_minver/CMakeLists.txt index 2efcd85f..d1a10721 100644 --- a/test/cmake_import_minver/CMakeLists.txt +++ b/test/cmake_import_minver/CMakeLists.txt @@ -2,6 +2,7 @@ add_test(NAME cmake_import_minver_configure COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -A "${CMAKE_GENERATOR_PLATFORM}" + -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -Dnlohmann_json_DIR=${PROJECT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/project )