Set BUILD_TESTING to OFF by default using CTest
Asked Answered
L

1

10

When you do include(CTest) in CMake it includes this line:

option(BUILD_TESTING "Build the testing tree." ON)

I want tests to be not built by default (but overridable on the command line). How can I do that?

Lavenialaver answered 24/1, 2017 at 16:9 Comment(0)
L
13

Ah this seems to do the trick:

option(BUILD_TESTING "" OFF)
include(CTest)
Lavenialaver answered 24/1, 2017 at 16:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.