Skip to content

Commit d8e71cb

Browse files
committed
cmake: fix ENABLE_TRACE parameter being too strict
In order to check whether tracing support should be turned on, we check whether ENABLE_TRACE equals "ON". This is being much too strict, as CMake will also treat "on", "true", "yes" and others as true-ish, but passing them will disable tracing support now. Fix the issue by simply removing the STREQUAL, which will cause CMake to do the right thing automatically.
1 parent 41b6d30 commit d8e71cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ SET(LIB_INSTALL_DIR lib CACHE PATH "Where to install libraries to.")
2828
SET(INCLUDE_INSTALL_DIR include CACHE PATH "Where to install headers to.")
2929

3030
# Enable tracing
31-
IF (ENABLE_TRACE STREQUAL "ON")
31+
IF(ENABLE_TRACE)
3232
SET(GIT_TRACE 1)
3333
ENDIF()
3434
ADD_FEATURE_INFO(tracing GIT_TRACE "tracing support")

0 commit comments

Comments
 (0)