Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Ensure Catch2ConfigVersion.cmake is installed properly

The old version would lead to error when Catch was installed
as a subproject. The file would be written to the subproject's
build directory and then would not be installed properly.
Commit
d38f78299507c159b271149f98dd594532a98a0a
Author
Bastian Dörig ·
Committer
Martin Hořeňovský
Parents
dc8a8e6371e7

Files · Download .tar.gz

Changes

 CMakeLists.txt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index cf7e5965..4bb365ef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -445,9 +445,10 @@ install(EXPORT Catch2Config
 # install Catch2ConfigVersion.cmake file to handle versions in find_package
 include(CMakePackageConfigHelpers)
 
-write_basic_package_version_file(Catch2ConfigVersion.cmake
+write_basic_package_version_file(
+	"${CMAKE_CURRENT_BINARY_DIR}/Catch2ConfigVersion.cmake"
 	COMPATIBILITY SameMajorVersion)
 
 install(FILES
-	"${CMAKE_BINARY_DIR}/Catch2ConfigVersion.cmake"
+	"${CMAKE_CURRENT_BINARY_DIR}/Catch2ConfigVersion.cmake"
 	DESTINATION ${CATCH_CMAKE_CONFIG_DESTINATION})