summaryrefslogtreecommitdiffstats
path: root/.gitlab/ci/gitlab_ci.cmake
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab/ci/gitlab_ci.cmake')
-rw-r--r--.gitlab/ci/gitlab_ci.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/.gitlab/ci/gitlab_ci.cmake b/.gitlab/ci/gitlab_ci.cmake
index 697162c..080c93b 100644
--- a/.gitlab/ci/gitlab_ci.cmake
+++ b/.gitlab/ci/gitlab_ci.cmake
@@ -5,7 +5,11 @@ endif ()
# Set up the source and build paths.
set(CTEST_SOURCE_DIRECTORY "$ENV{CI_PROJECT_DIR}")
-set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/build")
+if("$ENV{CMAKE_CI_INPLACE}")
+ set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}")
+else()
+ set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/build")
+endif()
if (NOT "$ENV{CTEST_SOURCE_SUBDIRECTORY}" STREQUAL "")
string(APPEND CTEST_SOURCE_DIRECTORY "/$ENV{CTEST_SOURCE_SUBDIRECTORY}")
endif ()