aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGraham Bloice <graham.bloice@trihedral.com>2015-01-03 20:52:54 +0000
committerGerald Combs <gerald@wireshark.org>2015-01-04 00:26:13 +0000
commitaad1a81b99d4f65d5debf2b34f237081baef03a6 (patch)
tree42d3d6cc720e2317ae6d7c53e24de151cc25846b /CMakeLists.txt
parent938485436e7b7c647323a147c8ea1abc33e07564 (diff)
Fix out-of-tree build includes of config.h
If a file in the same directory as config.h, e.g. wireshark-qt.cpp has a #include "config.h", or another header it includes also has a #include "config.h", then an out-of-tree build, e.g. CMake will pick up any in-tree config.h and odd things may happen. The correct form is #include <config.h> which will pick up the out-of-tree version. To find this, introduce a deliberate error and then make an out-of-tree build, noting where it fails and fix that file. If that file includes other files that still cause the build to fail, set the compiler to emit the pre-processed version so you can locate the include with the next errant "config.h". Repeat ad nauseum. Possibly all includes of "config.h" should be changed to <config.h> Revert "CMake: Clobber the top-level config.h before we build." This reverts commit 1f3849ce614aeae5fda742beffe5558e7c2a8b71. Ping-Bug: 10301 Change-Id: Ie567e7cc696fd48f3e730fc27032c5d2a7d8f341 Reviewed-on: https://code.wireshark.org/review/6285 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 0 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8d8f7c2532..125d3008fa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -915,16 +915,6 @@ endif()
set( VERSION ${PROJECT_VERSION} )
set( configure_input "Built with CMake ${CMAKE_VERSION}" )
configure_file(${CMAKE_SOURCE_DIR}/cmakeconfig.h.in ${CMAKE_BINARY_DIR}/config.h)
-
-if(NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
- # Try to run before anything else. Ideally we'd just use add_custom_command(... PRE_BUILD)
- # but that only works for Visual Studio. As it is this likely has a race condition.
- add_custom_target(clean_other_build_system_conflicts ALL
- COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_SOURCE_DIR}/config.h
- DEPENDS ${CMAKE_BINARY_DIR}/config.h ${CMAKE_BINARY_DIR}/version.h
- )
-endif()
-
set( IN_FILES
adns_dll.rc
capchild/doxygen.cfg.in