Rename variable for including current directory in interfaces
Rename the variable added by commit 9ce1b9ef
(Add
CMAKE_BUILD_INTERFACE_INCLUDES build-variable, 2012-11-25) to
CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE to be more consistent with the
existing CMAKE_INCLUDE_CURRENT_DIR variable.
Suggested-by: Alex Neundorf <neundorf@kde.org>
This commit is contained in:
parent
017478570e
commit
fc43477de0
|
@ -1164,14 +1164,14 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
|
||||||
"Variables that Control the Build");
|
"Variables that Control the Build");
|
||||||
|
|
||||||
cm->DefineProperty
|
cm->DefineProperty
|
||||||
("CMAKE_BUILD_INTERFACE_INCLUDES", cmProperty::VARIABLE,
|
("CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE", cmProperty::VARIABLE,
|
||||||
"Automatically add the current source- and build directories "
|
"Automatically add the current source- and build directories "
|
||||||
"to the INTERFACE_INCLUDE_DIRECTORIES.",
|
"to the INTERFACE_INCLUDE_DIRECTORIES.",
|
||||||
"If this variable is enabled, CMake automatically adds for each shared "
|
"If this variable is enabled, CMake automatically adds for each shared "
|
||||||
"library target, static library target, module target and executable "
|
"library target, static library target, module target and executable "
|
||||||
"target, ${CMAKE_CURRENT_SOURCE_DIR} and ${CMAKE_CURRENT_BINARY_DIR} to "
|
"target, ${CMAKE_CURRENT_SOURCE_DIR} and ${CMAKE_CURRENT_BINARY_DIR} to "
|
||||||
"the INTERFACE_INCLUDE_DIRECTORIES."
|
"the INTERFACE_INCLUDE_DIRECTORIES."
|
||||||
"By default CMAKE_BUILD_INTERFACE_INCLUDES is OFF.",
|
"By default CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE is OFF.",
|
||||||
false,
|
false,
|
||||||
"Variables that Control the Build");
|
"Variables that Control the Build");
|
||||||
|
|
||||||
|
|
|
@ -2745,7 +2745,7 @@ void cmTarget::AppendBuildInterfaceIncludes()
|
||||||
}
|
}
|
||||||
this->BuildInterfaceIncludesAppended = true;
|
this->BuildInterfaceIncludesAppended = true;
|
||||||
|
|
||||||
if (this->Makefile->IsOn("CMAKE_BUILD_INTERFACE_INCLUDES"))
|
if (this->Makefile->IsOn("CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE"))
|
||||||
{
|
{
|
||||||
const char *binDir = this->Makefile->GetStartOutputDirectory();
|
const char *binDir = this->Makefile->GetStartOutputDirectory();
|
||||||
const char *srcDir = this->Makefile->GetStartDirectory();
|
const char *srcDir = this->Makefile->GetStartDirectory();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
set(CMAKE_BUILD_INTERFACE_INCLUDES ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
|
||||||
|
|
||||||
add_library(subdirlib SHARED subdirlib.cpp)
|
add_library(subdirlib SHARED subdirlib.cpp)
|
||||||
generate_export_header(subdirlib)
|
generate_export_header(subdirlib)
|
||||||
|
|
|
@ -291,7 +291,7 @@ if(WIN32)
|
||||||
install(TARGETS testLib5 RUNTIME DESTINATION bin)
|
install(TARGETS testLib5 RUNTIME DESTINATION bin)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(sublib) # For CMAKE_BUILD_INTERFACE_INCLUDES test.
|
add_subdirectory(sublib) # For CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE test.
|
||||||
|
|
||||||
# Export from build tree.
|
# Export from build tree.
|
||||||
export(TARGETS testExe1 testLib1 testLib2 testLib3
|
export(TARGETS testExe1 testLib1 testLib2 testLib3
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
set(CMAKE_BUILD_INTERFACE_INCLUDES ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
add_library(subdirlib SHARED subdir.cpp)
|
add_library(subdirlib SHARED subdir.cpp)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_BUILD_INTERFACE_INCLUDES ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
|
||||||
|
|
||||||
add_library(libA SHARED libA.cpp)
|
add_library(libA SHARED libA.cpp)
|
||||||
target_link_libraries(libA LINK_PUBLIC Qt4::QtCore)
|
target_link_libraries(libA LINK_PUBLIC Qt4::QtCore)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_BUILD_INTERFACE_INCLUDES ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
|
||||||
|
|
||||||
add_library(libB SHARED libB.cpp)
|
add_library(libB SHARED libB.cpp)
|
||||||
generate_export_header(libB)
|
generate_export_header(libB)
|
||||||
|
|
|
@ -25,7 +25,7 @@ set_target_properties(foo codeeditorLib privateSlot PROPERTIES AUTOMOC TRUE)
|
||||||
|
|
||||||
include(GenerateExportHeader)
|
include(GenerateExportHeader)
|
||||||
# The order is relevant here. B depends on A, and B headers depend on A
|
# The order is relevant here. B depends on A, and B headers depend on A
|
||||||
# headers both subdirectories use CMAKE_BUILD_INTERFACE_INCLUDES and we
|
# headers both subdirectories use CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE and we
|
||||||
# test that CMAKE_AUTOMOC successfully reads the include directories
|
# test that CMAKE_AUTOMOC successfully reads the include directories
|
||||||
# for the build interface from those targets. There has previously been
|
# for the build interface from those targets. There has previously been
|
||||||
# a bug where caching of the include directories happened before
|
# a bug where caching of the include directories happened before
|
||||||
|
|
Loading…
Reference in New Issue