summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-08-21 13:00:07 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-08-21 13:00:09 (GMT)
commitfabb217502b027ccab3e44cae4ed7a718a6eea81 (patch)
treef377c20379c9a26f1858c63e1780bf9830fd0e0b
parentd46300be899334e95aa196159337d4f78f33a488 (diff)
parentef978c1dea9fa3f2decadd5145c643d90af40f61 (diff)
downloadCMake-fabb217502b027ccab3e44cae4ed7a718a6eea81.zip
CMake-fabb217502b027ccab3e44cae4ed7a718a6eea81.tar.gz
CMake-fabb217502b027ccab3e44cae4ed7a718a6eea81.tar.bz2
Merge topic 'bootstrap-target-commands'
ef978c1d CursesDialog: use target_include_directories for cmForm 7814d750 bootstrap: make target_* commands available Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1158
-rw-r--r--Source/CursesDialog/CMakeLists.txt4
-rw-r--r--Source/CursesDialog/form/CMakeLists.txt17
-rw-r--r--Source/cmCommands.cxx28
-rwxr-xr-xbootstrap6
4 files changed, 30 insertions, 25 deletions
diff --git a/Source/CursesDialog/CMakeLists.txt b/Source/CursesDialog/CMakeLists.txt
index c5ac1f1..6023c83 100644
--- a/Source/CursesDialog/CMakeLists.txt
+++ b/Source/CursesDialog/CMakeLists.txt
@@ -17,10 +17,6 @@ set( CURSES_SRCS
CursesDialog/ccmake
)
-if( NOT CMAKE_USE_SYSTEM_FORM )
- include_directories(${CMake_SOURCE_DIR}/Source/CursesDialog/form
- ${CMake_BINARY_DIR}/Source/CursesDialog/form)
-endif()
include_directories(${CURSES_INCLUDE_PATH})
diff --git a/Source/CursesDialog/form/CMakeLists.txt b/Source/CursesDialog/form/CMakeLists.txt
index 0677043..b468f5b 100644
--- a/Source/CursesDialog/form/CMakeLists.txt
+++ b/Source/CursesDialog/form/CMakeLists.txt
@@ -3,12 +3,9 @@
project(CMAKE_FORM)
-include_regular_expression("^.*$")
-include_directories(${CURSES_INCLUDE_PATH} "${CMAKE_CURRENT_BINARY_DIR}")
-
configure_file(cmFormConfigure.h.in "${CMAKE_CURRENT_BINARY_DIR}/cmFormConfigure.h")
-set( FORM_SRCS
+add_library(cmForm
fld_arg.c
fld_attr.c
fld_current.c
@@ -49,10 +46,16 @@ set( FORM_SRCS
fty_num.c
fty_regex.c
)
-
-include_directories(${CMAKE_FORM_SOURCE_DIR})
-add_library(cmForm ${FORM_SRCS} )
+
+target_include_directories(cmForm
+ PUBLIC
+ ${CURSES_INCLUDE_PATH}
+ ${CMAKE_FORM_BINARY_DIR}
+ ${CMAKE_FORM_SOURCE_DIR}
+ )
+
target_link_libraries(cmForm ${CURSES_LIBRARY})
+
if(CURSES_EXTRA_LIBRARY)
target_link_libraries(cmForm ${CURSES_EXTRA_LIBRARY})
endif()
diff --git a/Source/cmCommands.cxx b/Source/cmCommands.cxx
index 61239a9..8a7d9bd 100644
--- a/Source/cmCommands.cxx
+++ b/Source/cmCommands.cxx
@@ -68,7 +68,12 @@
#include "cmSiteNameCommand.h"
#include "cmStringCommand.h"
#include "cmSubdirCommand.h"
+#include "cmTargetCompileDefinitionsCommand.h"
+#include "cmTargetCompileFeaturesCommand.h"
+#include "cmTargetCompileOptionsCommand.h"
+#include "cmTargetIncludeDirectoriesCommand.h"
#include "cmTargetLinkLibrariesCommand.h"
+#include "cmTargetSourcesCommand.h"
#include "cmTryCompileCommand.h"
#include "cmTryRunCommand.h"
#include "cmUnsetCommand.h"
@@ -94,11 +99,6 @@
#include "cmRemoveDefinitionsCommand.h"
#include "cmSourceGroupCommand.h"
#include "cmSubdirDependsCommand.h"
-#include "cmTargetCompileDefinitionsCommand.h"
-#include "cmTargetCompileFeaturesCommand.h"
-#include "cmTargetCompileOptionsCommand.h"
-#include "cmTargetIncludeDirectoriesCommand.h"
-#include "cmTargetSourcesCommand.h"
#include "cmUseMangledMesaCommand.h"
#include "cmUtilitySourceCommand.h"
#include "cmVariableRequiresCommand.h"
@@ -238,8 +238,17 @@ void GetProjectCommands(cmState* state)
state->AddBuiltinCommand("set_tests_properties",
new cmSetTestsPropertiesCommand);
state->AddBuiltinCommand("subdirs", new cmSubdirCommand);
+ state->AddBuiltinCommand("target_compile_definitions",
+ new cmTargetCompileDefinitionsCommand);
+ state->AddBuiltinCommand("target_compile_features",
+ new cmTargetCompileFeaturesCommand);
+ state->AddBuiltinCommand("target_compile_options",
+ new cmTargetCompileOptionsCommand);
+ state->AddBuiltinCommand("target_include_directories",
+ new cmTargetIncludeDirectoriesCommand);
state->AddBuiltinCommand("target_link_libraries",
new cmTargetLinkLibrariesCommand);
+ state->AddBuiltinCommand("target_sources", new cmTargetSourcesCommand);
state->AddBuiltinCommand("try_compile", new cmTryCompileCommand);
state->AddBuiltinCommand("try_run", new cmTryRunCommand);
@@ -260,15 +269,6 @@ void GetProjectCommands(cmState* state)
state->AddBuiltinCommand("remove_definitions",
new cmRemoveDefinitionsCommand);
state->AddBuiltinCommand("source_group", new cmSourceGroupCommand);
- state->AddBuiltinCommand("target_compile_definitions",
- new cmTargetCompileDefinitionsCommand);
- state->AddBuiltinCommand("target_compile_features",
- new cmTargetCompileFeaturesCommand);
- state->AddBuiltinCommand("target_compile_options",
- new cmTargetCompileOptionsCommand);
- state->AddBuiltinCommand("target_include_directories",
- new cmTargetIncludeDirectoriesCommand);
- state->AddBuiltinCommand("target_sources", new cmTargetSourcesCommand);
state->AddDisallowedCommand(
"export_library_dependencies", new cmExportLibraryDependenciesCommand,
diff --git a/bootstrap b/bootstrap
index 26d112f..378d92e 100755
--- a/bootstrap
+++ b/bootstrap
@@ -403,8 +403,14 @@ CMAKE_CXX_SOURCES="\
cmSubdirCommand \
cmSystemTools \
cmTarget \
+ cmTargetCompileDefinitionsCommand \
+ cmTargetCompileFeaturesCommand \
+ cmTargetCompileOptionsCommand \
+ cmTargetIncludeDirectoriesCommand \
cmTargetLinkLibrariesCommand \
+ cmTargetPropCommandBase \
cmTargetPropertyComputer \
+ cmTargetSourcesCommand \
cmTest \
cmTestGenerator \
cmTimestamp \