Commit f3d6d3a8 authored by Dean Moldovan's avatar Dean Moldovan

Fix find-package-test failure with non-default compiler

The failure would happen when the main project was configured with
a compiler which is not the system default. The new configuration
was not forwarded to "ctest --build-and-test". This fixes it.
parent 8eaad79d
...@@ -137,8 +137,10 @@ if (FMT_PEDANTIC) ...@@ -137,8 +137,10 @@ if (FMT_PEDANTIC)
"${CMAKE_CURRENT_BINARY_DIR}/find-package-test" "${CMAKE_CURRENT_BINARY_DIR}/find-package-test"
--build-generator ${CMAKE_GENERATOR} --build-generator ${CMAKE_GENERATOR}
--build-makeprogram ${CMAKE_MAKE_PROGRAM} --build-makeprogram ${CMAKE_MAKE_PROGRAM}
--build-options "-DFMT_DIR=${PROJECT_BINARY_DIR}" --build-options
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}") "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
"-DFMT_DIR=${PROJECT_BINARY_DIR}"
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
# test if the targets are findable when add_subdirectory is used # test if the targets are findable when add_subdirectory is used
add_test(add-subdirectory-test ${CMAKE_CTEST_COMMAND} add_test(add-subdirectory-test ${CMAKE_CTEST_COMMAND}
...@@ -148,5 +150,7 @@ if (FMT_PEDANTIC) ...@@ -148,5 +150,7 @@ if (FMT_PEDANTIC)
"${CMAKE_CURRENT_BINARY_DIR}/add-subdirectory-test" "${CMAKE_CURRENT_BINARY_DIR}/add-subdirectory-test"
--build-generator ${CMAKE_GENERATOR} --build-generator ${CMAKE_GENERATOR}
--build-makeprogram ${CMAKE_MAKE_PROGRAM} --build-makeprogram ${CMAKE_MAKE_PROGRAM}
--build-options "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}") --build-options
"-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
endif () endif ()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment