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

TribitsCTestDriverCore allow for CTEST_BUILD_TARGET override #94

Closed
lefebvre opened this issue Nov 12, 2015 · 2 comments
Closed

TribitsCTestDriverCore allow for CTEST_BUILD_TARGET override #94

lefebvre opened this issue Nov 12, 2015 · 2 comments

Comments

@lefebvre
Copy link

Ross,
Several packages I develop require "install" to satisfy verification testing.
I believe this should be as easy as exposing the second build directive to environment override.

warroom2:TriBITS jap$ git diff
diff --git a/tribits/ctest_driver/TribitsCTestDriverCore.cmake b/tribits/ctest_driver/TribitsCTestDriverCore.cmake
index 970315d..d3cfdbf 100644
--- a/tribits/ctest_driver/TribitsCTestDriverCore.cmake
+++ b/tribits/ctest_driver/TribitsCTestDriverCore.cmake
@@ -1731,7 +1731,7 @@ FUNCTION(TRIBITS_CTEST_DRIVER)
         SET(BUILD_OR_TEST_FAILED FALSE)

         # Build the ALL target, but append the results to the last build.xml
-        SET(CTEST_BUILD_TARGET)
+        SET_DEFAULT_AND_FROM_ENV(CTEST_BUILD_TARGET "")
         MESSAGE("\nBuild ALL target for '${TRIBITS_PACKAGE}' ...\n")
         CTEST_BUILD(
           BUILD "${CTEST_BINARY_DIRECTORY}"
lefebvre added a commit to lefebvre/TriBITS that referenced this issue Nov 12, 2015
@bartlettroscoe
Copy link
Member

Jordan,

The variable CMAKE_BUILD_TARGET is actually used in two places. Would you be okay if this was called something like TRIBITS_PACAKGE_BUILD_TARGET? We would then define this like:

...

   SET_DEFAULT_AND_FROM_ENV(TRIBITS_PACAKGE_BUILD_TARGET "")
   ...
  FOREACH(TRIBITS_PACKAGE ${${PROJECT_NAME}_PACKAGES})
   ...
        SET(CMAKE_BUILD_TARGET  "${TRIBITS_PACAKGE_BUILD_TARGET}")
        MESSAGE("\nBuild ALL target for '${TRIBITS_PACKAGE}' ...\n")
        ...
    ENDFOREACH()

So then you would set TRIBITS_PACAKGE_BUILD_TARGET=install, right?

Note that we could add a similar option to the checkin-test.py script that would allow SCALE developers to use that in pre-push testing. It would be an option like --built-target and it would default to empty but for SCALE, you could make the default --build-target=install.

@bartlettroscoe
Copy link
Member

@lefebvre, I actually just added support for this in commit adbf3c1 for a similar reason. Sorry it took so long.

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

2 participants