Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a post_project_set_up_hermetic_build cmake extension point #467

Open
GoogleCodeExporter opened this issue Jul 6, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

googletest does not provide an out-of-box install target which is 
understandable for its intended use. But cmake export mechanism allows build 
targets to be used by other projects without installing. As the export location 
will be project specific, a customizable step at the end of configuration would 
be really convenient. Without it I have to write a custom install step in an 
ExternalProject setup importing two libraries and setup their dependencies.

here is the patch:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bd78cfe..c692e70 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,7 +22,8 @@ option(gtest_build_samples "Build gtest's sample programs." 
OFF)

 option(gtest_disable_pthreads "Disable uses of pthreads in gtest." OFF)

-# Defines pre_project_set_up_hermetic_build() and set_up_hermetic_build().
+# Defines pre_project_set_up_hermetic_build(), set_up_hermetic_build() and
+# post_project_set_up_hermetic_build()
 include(cmake/hermetic_build.cmake OPTIONAL)

 if (COMMAND pre_project_set_up_hermetic_build)
@@ -258,3 +259,7 @@ if (gtest_build_tests)
   cxx_executable(gtest_xml_output_unittest_ test gtest)
   py_test(gtest_xml_output_unittest)
 endif()
+
+if (COMMAND post_project_set_up_hermetic_build)
+  post_project_set_up_hermetic_build()
+endif()




Original issue reported on code.google.com by [email protected] on 26 Jun 2014 at 11:24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant