Re: [cmake-developers] [PATCH] Add a test for checking that the CPack module produces correct config files
> My motivation is this. I want to submit a few improvements to the way CPack > writes config files, starting with that cpack_set_if_not_set change I > mentioned a while back. This functionality is generator-independent (and > basically unrelated to actual package generation), so I thought > RunCMake.CPack was not the appropriate place to test it. Yes you're right, RunCMake.CPack is meant for specific generators and adding target 'none' or something similar would just make a mess. > Since there doesn't seem to be a test suite specifically for config file > writing, I thought I'd create one in a separate patch so that my later > patches don't have as much boilerplate in them. The Simple test is just > there to ensure I don't break the simple case while changing the more > complex ones. Well, and it would be silly to submit a test suite with no > tests in it. I've added your test: http://www.cmake.org/gitweb?p=cmake.git;a=commit;h=674dc0b Thanks, Domen -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH] Add a test for checking that the CPack module produces correct config files
Hi, I apologise for the late reply. I wasn't at my computer for the past week. 2015-08-19 21:08 GMT+02:00 Роман Донченко d...@corrigendum.ru: Currently, the only case is for simple variable values (not containing any CMake-special characters and not determined by CPack itself). In CPackRPM and CPackDeb both cases that this is testing (CMake list variable and a variable containing spaces) are already tested implicitly. RunCMake.CPack contains such test. Admittedly both cases are not present in same variable. Your test passes on my computer. Is this test targeting a particular CPack generator or a CMake-CPack bug on a particular OS? Regards, Domen -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH] Add a test for checking that the CPack module produces correct config files
Domen Vrankar domen.vran...@gmail.com писал в своём письме Wed, 26 Aug 2015 22:27:43 +0300: 2015-08-19 21:08 GMT+02:00 Роман Донченко d...@corrigendum.ru: Currently, the only case is for simple variable values (not containing any CMake-special characters and not determined by CPack itself). In CPackRPM and CPackDeb both cases that this is testing (CMake list variable and a variable containing spaces) are already tested implicitly. RunCMake.CPack contains such test. Admittedly both cases are not present in same variable. Is this test targeting a particular CPack generator or a CMake-CPack bug on a particular OS? My motivation is this. I want to submit a few improvements to the way CPack writes config files, starting with that cpack_set_if_not_set change I mentioned a while back. This functionality is generator-independent (and basically unrelated to actual package generation), so I thought RunCMake.CPack was not the appropriate place to test it. Since there doesn't seem to be a test suite specifically for config file writing, I thought I'd create one in a separate patch so that my later patches don't have as much boilerplate in them. The Simple test is just there to ensure I don't break the simple case while changing the more complex ones. Well, and it would be silly to submit a test suite with no tests in it. Roman. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] [PATCH] Add a test for checking that the CPack module produces correct config files
Currently, the only case is for simple variable values (not containing any CMake-special characters and not determined by CPack itself). --- Tests/RunCMake/CMakeLists.txt | 1 + Tests/RunCMake/CPackConfig/CMakeLists.txt | 6 ++ Tests/RunCMake/CPackConfig/RunCMakeTest.cmake | 3 +++ Tests/RunCMake/CPackConfig/Simple-check.cmake | 3 +++ Tests/RunCMake/CPackConfig/Simple.cmake | 1 + Tests/RunCMake/CPackConfig/check.cmake| 7 +++ 6 files changed, 21 insertions(+) create mode 100644 Tests/RunCMake/CPackConfig/CMakeLists.txt create mode 100644 Tests/RunCMake/CPackConfig/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/CPackConfig/Simple-check.cmake create mode 100644 Tests/RunCMake/CPackConfig/Simple.cmake create mode 100644 Tests/RunCMake/CPackConfig/check.cmake diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index c274d8f..2955db2 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -239,6 +239,7 @@ add_RunCMake_test(CommandLine) add_RunCMake_test(CommandLineTar) add_RunCMake_test(install) +add_RunCMake_test(CPackConfig) add_RunCMake_test(CPackInstallProperties) add_RunCMake_test(ExternalProject) add_RunCMake_test(CTestCommandLine) diff --git a/Tests/RunCMake/CPackConfig/CMakeLists.txt b/Tests/RunCMake/CPackConfig/CMakeLists.txt new file mode 100644 index 000..9a9e7b4 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.3) + +project(${RunCMake_TEST}) +include(${RunCMake_TEST}.cmake) + +include(CPack) diff --git a/Tests/RunCMake/CPackConfig/RunCMakeTest.cmake b/Tests/RunCMake/CPackConfig/RunCMakeTest.cmake new file mode 100644 index 000..6787eb8 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(Simple) diff --git a/Tests/RunCMake/CPackConfig/Simple-check.cmake b/Tests/RunCMake/CPackConfig/Simple-check.cmake new file mode 100644 index 000..6e0cf6f --- /dev/null +++ b/Tests/RunCMake/CPackConfig/Simple-check.cmake @@ -0,0 +1,3 @@ +include(${RunCMake_SOURCE_DIR}/check.cmake) + +test_variable(CPACK_FOO bar baz;quux) diff --git a/Tests/RunCMake/CPackConfig/Simple.cmake b/Tests/RunCMake/CPackConfig/Simple.cmake new file mode 100644 index 000..c9f6541 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/Simple.cmake @@ -0,0 +1 @@ +set(CPACK_FOO bar baz;quux) diff --git a/Tests/RunCMake/CPackConfig/check.cmake b/Tests/RunCMake/CPackConfig/check.cmake new file mode 100644 index 000..2fc9f11 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/check.cmake @@ -0,0 +1,7 @@ +function(test_variable NAME EXPECTED_VALUE) + if(NOT ${${NAME}} STREQUAL ${EXPECTED_VALUE}) +message(FATAL_ERROR ${NAME}: variable mismatch; expected [${EXPECTED_VALUE}] actual [${${NAME}}]) + endif() +endfunction() + +include(${RunCMake_TEST_BINARY_DIR}/CPackConfig.cmake) -- 1.9.5.msysgit.0 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers