[CMake] CPack and file checks...

Theodore Papadopoulo Theodore.Papadopoulo at inria.fr
Mon Sep 1 12:37:49 EDT 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm a little bit annoyed by the following lines in CPack.cmake (2.8.12):


macro(cpack_check_file_exists file description)
  if(NOT EXISTS "${file}")
    message(SEND_ERROR "CPack ${description} file: \"${file}\" could
not be found.")
  endif()
endmacro()

cpack_check_file_exists("${CPACK_PACKAGE_DESCRIPTION_FILE}" "package
description")
cpack_check_file_exists("${CPACK_RESOURCE_FILE_LICENSE}"    "license
resource")
cpack_check_file_exists("${CPACK_RESOURCE_FILE_README}"     "readme
resource")
cpack_check_file_exists("${CPACK_RESOURCE_FILE_WELCOME}"    "welcome
resource")


I'm in a configuration where these files are not available at
configure time (a super-project and the files are in sub-projects).
While I appreciate the fact that errors are raised as early as
possible, here it becomes a blocker as I have no simple way to disable
this test.

I's argue that these tests should really happen at cpack time not at
configure time... or at least one should have a way to disable them.

In the meantime, my only solution is to touch some dummy files and to
overwrite them later, unless someone has a cleaner solution...


	Thank's

	Theo.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlQEoN0ACgkQEr8WrU8nPV17DgCeKh1BoeGsrLYAfrLdcpWqj4pW
6ugAn3NSHqOmRmqO5SJz5N/U4OfusFSe
=jNTa
-----END PGP SIGNATURE-----


More information about the CMake mailing list