Skip to content

Commit 01f25ec

Browse files
edsavagecursoragent
andcommitted
[ML] Rename CMake 'test' target to 'ml_test' to avoid CTest conflict
When CTest is enabled (via include(CTest)), CMake reserves the 'test' target name. Rename our custom target to 'ml_test' and update build.gradle accordingly. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent da13a17 commit 01f25ec

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ String artifactGroupPath = project.group.replaceAll("\\.", "/")
230230
task test(type: Exec) {
231231
environment makeEnvironment
232232
commandLine shell
233-
args shellFlag, "${setEnv} && cmake --build ${cmakeBuildDir} --config ${cmakeBuildType} -v -j ${numCpus} -t test_all_parallel"
233+
args shellFlag, "${setEnv} && cmake --build ${cmakeBuildDir} --config ${cmakeBuildType} -v -j ${numCpus} -t ml_test"
234234
workingDir "${projectDir}"
235235
dependsOn 'strip'
236236
description = 'Run C++ tests'

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ add_custom_target(run_tests_individually
3535
DEPENDS clean_test_results ${ML_TEST_INDIVIDUALLY_DEPENDS}
3636
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
3737
)
38-
add_custom_target(test
38+
add_custom_target(ml_test
3939
DEPENDS run_tests
4040
COMMAND ${CMAKE_COMMAND} -DTEST_DIR=${CMAKE_BINARY_DIR} -P ${CMAKE_SOURCE_DIR}/cmake/test-check-success.cmake
4141
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}

0 commit comments

Comments
 (0)