Skip to content

Commit

Permalink
Move public headers to mysqlx/ subfolder so that names do not clash w…
Browse files Browse the repository at this point in the history
…ith other libraries. Only mysqlx.h header stays in the toplevel location.
  • Loading branch information
rsomla1 committed Oct 15, 2015
1 parent 34fe685 commit e154cf6
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 5 deletions.
8 changes: 8 additions & 0 deletions PackageSpecs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,11 @@ add_custom_target(clean_source_tree
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Cleaning source tree"
)

set_property(TARGET clean_source_tree build_packages
PROPERTY EXCLUDE_FROM_ALL 1
)

set_property(TARGET clean_source_tree build_packages
PROPERTY EXCLUDE_FROM_DEFAULT_BUILD 1
)
6 changes: 5 additions & 1 deletion cmake/headers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ MACRO(ADD_HEADERS)

FOREACH(hdr ${ARGV})
GET_FILENAME_COMPONENT(hdrn ${hdr} NAME)
GET_FILENAME_COMPONENT(hdr ${hdr} ABSOLUTE)
MESSAGE(STATUS " - ${hdrn}")
LIST(APPEND hdr_list ${hdr})
ENDFOREACH(hdr)
Expand All @@ -177,7 +178,8 @@ MACRO(ADD_HEADERS)
SET(headers_${hdr_group} ${hdr_list}
CACHE INTERNAL "Public headers from ${hdr_group}"
FORCE)

#MESSAGE("Added the following headers: ${headers_${hdr_group}}")

#
# Update parent's hdr_groups list to make sure that it contains
# all header groups collected so far
Expand Down Expand Up @@ -308,6 +310,8 @@ MACRO(ADD_HEADERS_TARGET)
SOURCE_GROUP(${group_name} FILES ${headers_${group}})
ENDFOREACH(group)

#MESSAGE("all headers: ${all_headers}")

#
# Add the Header target which builds the sanity check project. All public headers are
# listed as sources of this target (which gives easy access to them in GUI systems).
Expand Down
3 changes: 2 additions & 1 deletion include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ INCLUDE(headers)

SETUP_HEADERS(${CMAKE_CURRENT_SOURCE_DIR})

SET(headers mysqlx.h common.h result.h task.h document.h)
SET(headers mysqlx.h)

ADD_HEADERS_DIR(mysqlx)
ADD_HEADERS(${headers})

#IF(cdk_stand_alone)
Expand Down
6 changes: 3 additions & 3 deletions include/mysqlx.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
*/


#include "common.h"
#include "result.h"
#include "task.h"
#include "mysqlx/common.h"
#include "mysqlx/result.h"
#include "mysqlx/task.h"


namespace cdk {
Expand Down
20 changes: 20 additions & 0 deletions include/mysqlx/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; version 2 of the
# License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA

SET(headers common.h result.h task.h document.h)
ADD_HEADERS(${headers})
INSTALL(FILES ${headers} DESTINATION include/mysqlx)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e154cf6

Please sign in to comment.