Mercurial > projects > qtd
changeset 274:f5606687c578
VERBOSE_DEBUG flag
author | SokoL_SD |
---|---|
date | Mon, 28 Sep 2009 05:32:25 +0000 |
parents | 2161595da42b |
children | bb0f228c27cd |
files | CMakeLists.txt cmake/FindD.cmake |
diffstat | 2 files changed, 20 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Mon Sep 28 05:20:16 2009 +0000 +++ b/CMakeLists.txt Mon Sep 28 05:32:25 2009 +0000 @@ -33,7 +33,7 @@ option(BUILD_TOOLS "Build tools" "ON") #option(GENERATE_DI_FILES "Generate *.di files with DC -H command" "OFF") set(GENERATE_DI_FILES OFF) ## Very experemental option. Temporary disabled. - +option(VERBOSE_DEBUG "Verbose debug" "OFF") set(all_packages Core Gui OpenGL Xml Svg Network WebKit CACHE INTERNAL "") @@ -193,6 +193,10 @@ add_d_versions(QtdUnittest) endif(UNITTEST) +if(VERBOSE_DEBUG) + add_d_debugs(QtdVerbose) +endif(VERBOSE_DEBUG) + ## Bootstrap settings for QtD. set(DRCC ${CMAKE_BINARY_DIR}/tools/drcc/drcc CACHE INTERNAL "") set(DUIC ${CMAKE_BINARY_DIR}/tools/duic/duic CACHE INTERNAL "")
--- a/cmake/FindD.cmake Mon Sep 28 05:20:16 2009 +0000 +++ b/cmake/FindD.cmake Mon Sep 28 05:32:25 2009 +0000 @@ -75,16 +75,17 @@ set(D_DEBUG_FLAGS -g ) if(D_IS_LLVM) set(D_RELEASE_FLAGS ${D_RELEASE_FLAGS} -enable-inlining) - set(D_DEBUG_FLAGS ${D_DEBUG_FLAGS} -d-debug) set(D_VERSION_FLAG -d-version) + set(D_DEBUG_FLAG -d-debug) else(D_IS_LLVM) set(D_RELEASE_FLAGS ${D_RELEASE_FLAGS} -inline) - set(D_DEBUG_FLAGS ${D_DEBUG_FLAGS} -debug) set(D_VERSION_FLAG -version) + set(D_DEBUG_FLAG -debug) endif(D_IS_LLVM) if(CMAKE_HOST_WIN32) set(D_RELEASE_FLAGS ${D_RELEASE_FLAGS} -L/subsystem:windows) endif(CMAKE_HOST_WIN32) +set(D_DEBUG_FLAGS ${D_DEBUG_FLAGS} ${D_DEBUG_FLAG}) # Unittest flags. option(UNITTEST "Includes unittests" "OFF") @@ -112,12 +113,20 @@ ## Macros and functions. ##-------------------------------------------- -macro(add_d_versions) +macro(add_d_flags option) foreach(arg_tmp ${ARGN}) - set(D_FLAGS ${D_FLAGS} ${D_VERSION_FLAG}=${arg_tmp}) + set(D_FLAGS ${D_FLAGS} ${option}=${arg_tmp}) endforeach(arg_tmp ${ARGN}) +endmacro(add_d_flags option) + +macro(add_d_versions) + add_d_flags(${D_VERSION_FLAG} ${ARGN}) endmacro(add_d_versions) +macro(add_d_debugs) + add_d_flags(${D_DEBUG_FLAG} ${ARGN}) +endmacro(add_d_debugs) + ## Make a native path. ## Usage: ## set(path c:/file_path/file_name.cpp) @@ -222,9 +231,9 @@ ) endforeach (d_source_p_tmp ${SOURCES_tmp}) else(NOT SINGLE_D_OBJECT) - if(is_ldc) + if(D_IS_LDC) set(FLAGS_tmp ${FLAGS_tmp} -oq ) - endif(is_ldc) + endif(D_IS_LDC) set(count_objects_tmp 0) set(files${count_objects_tmp}_tmp ) set(counter_tmp 0)