Skip to content
Snippets Groups Projects
Commit 202cb923 authored by Frank Bossen's avatar Frank Bossen
Browse files

Use single variable to control ENABLE_TRACING

parent cc9bf1ce
No related branches found
No related tags found
No related merge requests found
Showing
with 19 additions and 17 deletions
......@@ -29,8 +29,10 @@ endif()
set( EXTENSION_360_VIDEO OFF CACHE BOOL "If EXTENSION_360_VIDEO is on, 360Lib will be added" )
set( EXTENSION_HDRTOOLS OFF CACHE BOOL "If EXTENSION_HDRTOOLS is on, HDRLib will be added" )
set( SET_ENABLE_TRACING OFF CACHE BOOL "Set ENABLE_TRACING as a compiler flag" )
set( ENABLE_TRACING OFF CACHE BOOL "If SET_ENABLE_TRACING is on, it will be set to this value" )
if (DEFINED ENABLE_TRACING)
set( ENABLE_TRACING OFF CACHE BOOL "ENABLE_TRACING will be set to this value" )
endif()
if( CMAKE_COMPILER_IS_GNUCC )
set( BUILD_STATIC OFF CACHE BOOL "Build static executables" )
......
......@@ -83,7 +83,7 @@ CMAKE_OPTIONS += -DCMAKE_VERBOSE_MAKEFILE=ON
endif
ifneq ($(enable-tracing),)
CONFIG_OPTIONS += -DSET_ENABLE_TRACING=ON -DENABLE_TRACING=$(enable-tracing)
CONFIG_OPTIONS += -DENABLE_TRACING=$(enable-tracing)
endif
ifneq ($(parallel-split),)
......
......@@ -25,7 +25,7 @@ endif()
add_executable( ${EXE_NAME} ${SRC_FILES} ${INC_FILES} ${NATVIS_FILES} )
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if( SET_ENABLE_TRACING )
if( DEFINED ENABLE_TRACING )
if( ENABLE_TRACING )
target_compile_definitions( ${EXE_NAME} PUBLIC ENABLE_TRACING=1 )
else()
......
......@@ -27,7 +27,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
target_compile_definitions( ${EXE_NAME} PUBLIC RExt__DECODER_DEBUG_BIT_STATISTICS=1 )
target_compile_definitions( ${EXE_NAME} PUBLIC RExt__DECODER_DEBUG_TOOL_STATISTICS=1 )
if( SET_ENABLE_TRACING )
if( DEFINED ENABLE_TRACING )
if( ENABLE_TRACING )
target_compile_definitions( ${EXE_NAME} PUBLIC ENABLE_TRACING=1 )
else()
......
......@@ -25,7 +25,7 @@ endif()
add_executable( ${EXE_NAME} ${SRC_FILES} ${INC_FILES} ${NATVIS_FILES} )
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if( SET_ENABLE_TRACING )
if( DEFINED ENABLE_TRACING )
if( ENABLE_TRACING )
target_compile_definitions( ${EXE_NAME} PUBLIC ENABLE_TRACING=1 )
else()
......
......@@ -27,7 +27,7 @@ endif()
add_executable( ${EXE_NAME} ${SRC_FILES} ${INC_FILES} ${NATVIS_FILES} )
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if( SET_ENABLE_TRACING )
if( DEFINED ENABLE_TRACING )
if( ENABLE_TRACING )
target_compile_definitions( ${EXE_NAME} PUBLIC ENABLE_TRACING=1 )
else()
......
......@@ -25,7 +25,7 @@ endif()
add_executable( ${EXE_NAME} ${SRC_FILES} ${INC_FILES} ${NATVIS_FILES} )
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if( SET_ENABLE_TRACING )
if( DEFINED ENABLE_TRACING )
if( ENABLE_TRACING )
target_compile_definitions( ${EXE_NAME} PUBLIC ENABLE_TRACING=1 )
else()
......
......@@ -25,7 +25,7 @@ endif()
add_executable( ${EXE_NAME} ${SRC_FILES} ${INC_FILES} ${NATVIS_FILES} )
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if( SET_ENABLE_TRACING )
if( DEFINED ENABLE_TRACING )
if( ENABLE_TRACING )
target_compile_definitions( ${EXE_NAME} PUBLIC ENABLE_TRACING=1 )
else()
......
......@@ -25,7 +25,7 @@ endif()
add_executable( ${EXE_NAME} ${SRC_FILES} ${INC_FILES} ${NATVIS_FILES} )
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if( SET_ENABLE_TRACING )
if( DEFINED ENABLE_TRACING )
if( ENABLE_TRACING )
target_compile_definitions( ${EXE_NAME} PUBLIC ENABLE_TRACING=1 )
else()
......
......@@ -25,7 +25,7 @@ endif()
add_executable( ${EXE_NAME} ${SRC_FILES} ${INC_FILES} ${NATVIS_FILES} )
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if( SET_ENABLE_TRACING )
if( DEFINED ENABLE_TRACING )
if( ENABLE_TRACING )
target_compile_definitions( ${EXE_NAME} PUBLIC ENABLE_TRACING=1 )
else()
......
......@@ -57,7 +57,7 @@ if( EXTENSION_HDRTOOLS )
target_compile_definitions( ${LIB_NAME} PUBLIC EXTENSION_HDRTOOLS=1 )
endif()
if( SET_ENABLE_TRACING )
if( DEFINED ENABLE_TRACING )
if( ENABLE_TRACING )
target_compile_definitions( ${LIB_NAME} PUBLIC ENABLE_TRACING=1 )
else()
......
......@@ -55,7 +55,7 @@ if( EXTENSION_HDRTOOLS )
target_compile_definitions( ${LIB_NAME} PUBLIC EXTENSION_HDRTOOLS=1 )
endif()
if( SET_ENABLE_TRACING )
if( DEFINED ENABLE_TRACING )
if( ENABLE_TRACING )
target_compile_definitions( ${LIB_NAME} PUBLIC ENABLE_TRACING=1 )
else()
......
......@@ -21,7 +21,7 @@ if( EXTENSION_360_VIDEO )
target_compile_definitions( ${LIB_NAME} PUBLIC EXTENSION_360_VIDEO=1 )
endif()
if( SET_ENABLE_TRACING )
if( DEFINED ENABLE_TRACING )
if( ENABLE_TRACING )
target_compile_definitions( ${LIB_NAME} PUBLIC ENABLE_TRACING=1 )
else()
......
......@@ -20,7 +20,7 @@ if( EXTENSION_360_VIDEO )
target_compile_definitions( ${LIB_NAME} PUBLIC EXTENSION_360_VIDEO=1 )
endif()
if( SET_ENABLE_TRACING )
if( DEFINED ENABLE_TRACING )
if( ENABLE_TRACING )
target_compile_definitions( ${LIB_NAME} PUBLIC ENABLE_TRACING=1 )
else()
......
......@@ -24,7 +24,7 @@ if( EXTENSION_HDRTOOLS )
target_compile_definitions( ${LIB_NAME} PUBLIC EXTENSION_HDRTOOLS=1 )
endif()
if( SET_ENABLE_TRACING )
if( DEFINED ENABLE_TRACING )
if( ENABLE_TRACING )
target_compile_definitions( ${LIB_NAME} PUBLIC ENABLE_TRACING=1 )
else()
......
......@@ -20,7 +20,7 @@ if( EXTENSION_360_VIDEO )
target_compile_definitions( ${LIB_NAME} PUBLIC EXTENSION_360_VIDEO=1 )
endif()
if( SET_ENABLE_TRACING )
if( DEFINED ENABLE_TRACING )
if( ENABLE_TRACING )
target_compile_definitions( ${LIB_NAME} PUBLIC ENABLE_TRACING=1 )
else()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment