summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/generator/CodeBlocks - NMake Makefiles.rst11
-rw-r--r--Help/generator/CodeBlocks - Ninja.rst11
-rw-r--r--Help/generator/CodeBlocks - Unix Makefiles.rst11
-rw-r--r--Help/generator/CodeBlocks.rst (renamed from Help/generator/CodeBlocks - MinGW Makefiles.rst)18
-rw-r--r--Help/generator/Eclipse CDT4 - NMake Makefiles.rst11
-rw-r--r--Help/generator/Eclipse CDT4 - Ninja.rst11
-rw-r--r--Help/generator/Eclipse CDT4 - Unix Makefiles.rst11
-rw-r--r--Help/generator/Eclipse CDT4.rst (renamed from Help/generator/Eclipse CDT4 - MinGW Makefiles.rst)18
-rw-r--r--Help/generator/KDevelop3 - Unix Makefiles.rst13
-rw-r--r--Help/generator/KDevelop3.rst12
-rw-r--r--Help/generator/Sublime Text 2 - NMake Makefiles.rst11
-rw-r--r--Help/generator/Sublime Text 2 - Ninja.rst11
-rw-r--r--Help/generator/Sublime Text 2 - Unix Makefiles.rst11
-rw-r--r--Help/generator/Sublime Text 2.rst (renamed from Help/generator/Sublime Text 2 - MinGW Makefiles.rst)18
-rw-r--r--Help/manual/cmake-generators.7.rst86
-rw-r--r--Help/manual/cmake-language.7.rst3
-rw-r--r--Modules/CMakeFindEclipseCDT4.cmake2
-rw-r--r--Modules/FindGTK2.cmake14
-rw-r--r--Modules/FindSWIG.cmake6
-rw-r--r--Modules/UseSWIG.cmake32
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/cmCPackGenerator.cxx14
-rw-r--r--Source/cmGeneratorTarget.cxx11
-rw-r--r--Source/cmGeneratorTarget.h8
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx135
-rw-r--r--Source/cmLocalNinjaGenerator.cxx15
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx54
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx6
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.h2
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx6
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.h2
-rw-r--r--Source/cmMakefileTargetGenerator.cxx2
-rw-r--r--Source/cmMakefileTargetGenerator.h2
-rw-r--r--Source/cmMakefileUtilityTargetGenerator.cxx6
-rw-r--r--Source/cmMakefileUtilityTargetGenerator.h2
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx14
-rw-r--r--Source/cmNinjaNormalTargetGenerator.h3
-rw-r--r--Source/cmNinjaTargetGenerator.cxx4
-rw-r--r--Source/cmNinjaTargetGenerator.h2
-rw-r--r--Source/cmNinjaUtilityTargetGenerator.cxx5
-rw-r--r--Source/cmNinjaUtilityTargetGenerator.h2
-rw-r--r--Source/cmOSXBundleGenerator.cxx6
-rw-r--r--Source/cmOSXBundleGenerator.h3
43 files changed, 324 insertions, 303 deletions
diff --git a/Help/generator/CodeBlocks - NMake Makefiles.rst b/Help/generator/CodeBlocks - NMake Makefiles.rst
deleted file mode 100644
index c7f944a..0000000
--- a/Help/generator/CodeBlocks - NMake Makefiles.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-CodeBlocks - NMake Makefiles
-----------------------------
-
-Generates CodeBlocks project files.
-
-Project files for CodeBlocks will be created in the top directory and
-in every subdirectory which features a CMakeLists.txt file containing
-a PROJECT() call. Additionally a hierarchy of makefiles is generated
-into the build tree. The appropriate make program can build the
-project through the default make target. A "make install" target is
-also provided.
diff --git a/Help/generator/CodeBlocks - Ninja.rst b/Help/generator/CodeBlocks - Ninja.rst
deleted file mode 100644
index 0253af6..0000000
--- a/Help/generator/CodeBlocks - Ninja.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-CodeBlocks - Ninja
-------------------
-
-Generates CodeBlocks project files.
-
-Project files for CodeBlocks will be created in the top directory and
-in every subdirectory which features a CMakeLists.txt file containing
-a PROJECT() call. Additionally a hierarchy of makefiles is generated
-into the build tree. The appropriate make program can build the
-project through the default make target. A "make install" target is
-also provided.
diff --git a/Help/generator/CodeBlocks - Unix Makefiles.rst b/Help/generator/CodeBlocks - Unix Makefiles.rst
deleted file mode 100644
index 0a29835..0000000
--- a/Help/generator/CodeBlocks - Unix Makefiles.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-CodeBlocks - Unix Makefiles
----------------------------
-
-Generates CodeBlocks project files.
-
-Project files for CodeBlocks will be created in the top directory and
-in every subdirectory which features a CMakeLists.txt file containing
-a PROJECT() call. Additionally a hierarchy of makefiles is generated
-into the build tree. The appropriate make program can build the
-project through the default make target. A "make install" target is
-also provided.
diff --git a/Help/generator/CodeBlocks - MinGW Makefiles.rst b/Help/generator/CodeBlocks.rst
index f54eb11..01798c7 100644
--- a/Help/generator/CodeBlocks - MinGW Makefiles.rst
+++ b/Help/generator/CodeBlocks.rst
@@ -1,5 +1,5 @@
-CodeBlocks - MinGW Makefiles
-----------------------------
+CodeBlocks
+----------
Generates CodeBlocks project files.
@@ -9,3 +9,17 @@ a PROJECT() call. Additionally a hierarchy of makefiles is generated
into the build tree. The appropriate make program can build the
project through the default make target. A "make install" target is
also provided.
+
+This "extra" generator may be specified as:
+
+``CodeBlocks - MinGW Makefiles``
+ Generate with :generator:`MinGW Makefiles`.
+
+``CodeBlocks - NMake Makefiles``
+ Generate with :generator:`NMake Makefiles`.
+
+``CodeBlocks - Ninja``
+ Generate with :generator:`Ninja`.
+
+``CodeBlocks - Unix Makefiles``
+ Generate with :generator:`Unix Makefiles`.
diff --git a/Help/generator/Eclipse CDT4 - NMake Makefiles.rst b/Help/generator/Eclipse CDT4 - NMake Makefiles.rst
deleted file mode 100644
index b5133ad..0000000
--- a/Help/generator/Eclipse CDT4 - NMake Makefiles.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-Eclipse CDT4 - NMake Makefiles
-------------------------------
-
-Generates Eclipse CDT 4.0 project files.
-
-Project files for Eclipse will be created in the top directory. In
-out of source builds, a linked resource to the top level source
-directory will be created. Additionally a hierarchy of makefiles is
-generated into the build tree. The appropriate make program can build
-the project through the default make target. A "make install" target
-is also provided.
diff --git a/Help/generator/Eclipse CDT4 - Ninja.rst b/Help/generator/Eclipse CDT4 - Ninja.rst
deleted file mode 100644
index 270011f..0000000
--- a/Help/generator/Eclipse CDT4 - Ninja.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-Eclipse CDT4 - Ninja
---------------------
-
-Generates Eclipse CDT 4.0 project files.
-
-Project files for Eclipse will be created in the top directory. In
-out of source builds, a linked resource to the top level source
-directory will be created. Additionally a hierarchy of makefiles is
-generated into the build tree. The appropriate make program can build
-the project through the default make target. A "make install" target
-is also provided.
diff --git a/Help/generator/Eclipse CDT4 - Unix Makefiles.rst b/Help/generator/Eclipse CDT4 - Unix Makefiles.rst
deleted file mode 100644
index c3449a7..0000000
--- a/Help/generator/Eclipse CDT4 - Unix Makefiles.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-Eclipse CDT4 - Unix Makefiles
------------------------------
-
-Generates Eclipse CDT 4.0 project files.
-
-Project files for Eclipse will be created in the top directory. In
-out of source builds, a linked resource to the top level source
-directory will be created. Additionally a hierarchy of makefiles is
-generated into the build tree. The appropriate make program can build
-the project through the default make target. A "make install" target
-is also provided.
diff --git a/Help/generator/Eclipse CDT4 - MinGW Makefiles.rst b/Help/generator/Eclipse CDT4.rst
index 9e7a26e..eb68bf0 100644
--- a/Help/generator/Eclipse CDT4 - MinGW Makefiles.rst
+++ b/Help/generator/Eclipse CDT4.rst
@@ -1,5 +1,5 @@
-Eclipse CDT4 - MinGW Makefiles
-------------------------------
+Eclipse CDT4
+------------
Generates Eclipse CDT 4.0 project files.
@@ -9,3 +9,17 @@ directory will be created. Additionally a hierarchy of makefiles is
generated into the build tree. The appropriate make program can build
the project through the default make target. A "make install" target
is also provided.
+
+This "extra" generator may be specified as:
+
+``Eclipse CDT4 - MinGW Makefiles``
+ Generate with :generator:`MinGW Makefiles`.
+
+``Eclipse CDT4 - NMake Makefiles``
+ Generate with :generator:`NMake Makefiles`.
+
+``Eclipse CDT4 - Ninja``
+ Generate with :generator:`Ninja`.
+
+``Eclipse CDT4 - Unix Makefiles``
+ Generate with :generator:`Unix Makefiles`.
diff --git a/Help/generator/KDevelop3 - Unix Makefiles.rst b/Help/generator/KDevelop3 - Unix Makefiles.rst
deleted file mode 100644
index 2a29a2e..0000000
--- a/Help/generator/KDevelop3 - Unix Makefiles.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-KDevelop3 - Unix Makefiles
---------------------------
-
-Generates KDevelop 3 project files.
-
-Project files for KDevelop 3 will be created in the top directory and
-in every subdirectory which features a CMakeLists.txt file containing
-a PROJECT() call. If you change the settings using KDevelop cmake
-will try its best to keep your changes when regenerating the project
-files. Additionally a hierarchy of UNIX makefiles is generated into
-the build tree. Any standard UNIX-style make program can build the
-project through the default make target. A "make install" target is
-also provided.
diff --git a/Help/generator/KDevelop3.rst b/Help/generator/KDevelop3.rst
index 788d557..eaa218b 100644
--- a/Help/generator/KDevelop3.rst
+++ b/Help/generator/KDevelop3.rst
@@ -11,3 +11,15 @@ files. Additionally a hierarchy of UNIX makefiles is generated into
the build tree. Any standard UNIX-style make program can build the
project through the default make target. A "make install" target is
also provided.
+
+This "extra" generator may be specified as:
+
+``KDevelop3 - Unix Makefiles``
+ Generate with :generator:`Unix Makefiles`.
+
+``KDevelop3``
+ Generate with :generator:`Unix Makefiles`.
+
+ For historical reasons this extra generator may be specified
+ directly as the main generator and it will be used as the
+ extra generator with :generator:`Unix Makefiles` automatically.
diff --git a/Help/generator/Sublime Text 2 - NMake Makefiles.rst b/Help/generator/Sublime Text 2 - NMake Makefiles.rst
deleted file mode 100644
index 5e02fd4..0000000
--- a/Help/generator/Sublime Text 2 - NMake Makefiles.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-Sublime Text 2 - NMake Makefiles
---------------------------------
-
-Generates Sublime Text 2 project files.
-
-Project files for Sublime Text 2 will be created in the top directory
-and in every subdirectory which features a CMakeLists.txt file
-containing a PROJECT() call. Additionally Makefiles (or build.ninja
-files) are generated into the build tree. The appropriate make
-program can build the project through the default make target. A
-"make install" target is also provided.
diff --git a/Help/generator/Sublime Text 2 - Ninja.rst b/Help/generator/Sublime Text 2 - Ninja.rst
deleted file mode 100644
index b7a2b88..0000000
--- a/Help/generator/Sublime Text 2 - Ninja.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-Sublime Text 2 - Ninja
-----------------------
-
-Generates Sublime Text 2 project files.
-
-Project files for Sublime Text 2 will be created in the top directory
-and in every subdirectory which features a CMakeLists.txt file
-containing a PROJECT() call. Additionally Makefiles (or build.ninja
-files) are generated into the build tree. The appropriate make
-program can build the project through the default make target. A
-"make install" target is also provided.
diff --git a/Help/generator/Sublime Text 2 - Unix Makefiles.rst b/Help/generator/Sublime Text 2 - Unix Makefiles.rst
deleted file mode 100644
index 67d329e..0000000
--- a/Help/generator/Sublime Text 2 - Unix Makefiles.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-Sublime Text 2 - Unix Makefiles
--------------------------------
-
-Generates Sublime Text 2 project files.
-
-Project files for Sublime Text 2 will be created in the top directory
-and in every subdirectory which features a CMakeLists.txt file
-containing a PROJECT() call. Additionally Makefiles (or build.ninja
-files) are generated into the build tree. The appropriate make
-program can build the project through the default make target. A
-"make install" target is also provided.
diff --git a/Help/generator/Sublime Text 2 - MinGW Makefiles.rst b/Help/generator/Sublime Text 2.rst
index 6e2ed02..0597a95 100644
--- a/Help/generator/Sublime Text 2 - MinGW Makefiles.rst
+++ b/Help/generator/Sublime Text 2.rst
@@ -1,5 +1,5 @@
-Sublime Text 2 - MinGW Makefiles
---------------------------------
+Sublime Text 2
+--------------
Generates Sublime Text 2 project files.
@@ -9,3 +9,17 @@ containing a PROJECT() call. Additionally Makefiles (or build.ninja
files) are generated into the build tree. The appropriate make
program can build the project through the default make target. A
"make install" target is also provided.
+
+This "extra" generator may be specified as:
+
+``Sublime Text 2 - MinGW Makefiles``
+ Generate with :generator:`MinGW Makefiles`.
+
+``Sublime Text 2 - NMake Makefiles``
+ Generate with :generator:`NMake Makefiles`.
+
+``Sublime Text 2 - Ninja``
+ Generate with :generator:`Ninja`.
+
+``Sublime Text 2 - Unix Makefiles``
+ Generate with :generator:`Unix Makefiles`.
diff --git a/Help/manual/cmake-generators.7.rst b/Help/manual/cmake-generators.7.rst
index ec1f58a..93fbf77 100644
--- a/Help/manual/cmake-generators.7.rst
+++ b/Help/manual/cmake-generators.7.rst
@@ -7,40 +7,78 @@ cmake-generators(7)
.. contents::
-All Generators
-==============
+Introduction
+============
+
+A *CMake Generator* is responsible for writing the input files for
+a native build system. Exactly one of the `CMake Generators`_ must be
+selected for a build tree to determine what native build system is to
+be used. Optionally one of the `Extra Generators`_ may be selected
+as a variant of some of the `Command-Line Build Tool Generators`_ to
+produce project files for an auxiliary IDE.
+
+CMake Generators are platform-specific so each may be available only
+on certain platforms. The :manual:`cmake(1)` command-line tool ``--help``
+output lists available generators on the current platform. Use its ``-G``
+option to specify the generator for a new build tree.
+The :manual:`cmake-gui(1)` offers interactive selection of a generator
+when creating a new build tree.
+
+CMake Generators
+================
+
+Command-Line Build Tool Generators
+----------------------------------
+
+These generators support command-line build tools. In order to use them,
+one must launch CMake from a command-line prompt whose environment is
+already configured for the chosen compiler and build tool.
.. toctree::
:maxdepth: 1
/generator/Borland Makefiles
- /generator/CodeBlocks - MinGW Makefiles
- /generator/CodeBlocks - Ninja
- /generator/CodeBlocks - NMake Makefiles
- /generator/CodeBlocks - Unix Makefiles
- /generator/Eclipse CDT4 - MinGW Makefiles
- /generator/Eclipse CDT4 - Ninja
- /generator/Eclipse CDT4 - NMake Makefiles
- /generator/Eclipse CDT4 - Unix Makefiles
- /generator/KDevelop3
- /generator/KDevelop3 - Unix Makefiles
- /generator/MinGW Makefiles
/generator/MSYS Makefiles
- /generator/Ninja
- /generator/NMake Makefiles JOM
+ /generator/MinGW Makefiles
/generator/NMake Makefiles
- /generator/Sublime Text 2 - MinGW Makefiles
- /generator/Sublime Text 2 - Ninja
- /generator/Sublime Text 2 - NMake Makefiles
- /generator/Sublime Text 2 - Unix Makefiles
+ /generator/NMake Makefiles JOM
+ /generator/Ninja
/generator/Unix Makefiles
- /generator/Visual Studio 10 2010
- /generator/Visual Studio 11 2012
- /generator/Visual Studio 12 2013
+ /generator/Watcom WMake
+
+IDE Build Tool Generators
+-------------------------
+
+These generators support Integrated Development Environment (IDE)
+project files. Since the IDEs configure their own environment
+one may launch CMake from any environment.
+
+.. toctree::
+ :maxdepth: 1
+
/generator/Visual Studio 6
- /generator/Visual Studio 7 .NET 2003
/generator/Visual Studio 7
+ /generator/Visual Studio 7 .NET 2003
/generator/Visual Studio 8 2005
/generator/Visual Studio 9 2008
- /generator/Watcom WMake
+ /generator/Visual Studio 10 2010
+ /generator/Visual Studio 11 2012
+ /generator/Visual Studio 12 2013
/generator/Xcode
+
+Extra Generators
+================
+
+Some of the `CMake Generators`_ listed in the :manual:`cmake(1)`
+command-line tool ``--help`` output may have variants that specify
+an extra generator for an auxiliary IDE tool. Such generator
+names have the form ``<extra-generator> - <main-generator>``.
+The following extra generators are known to CMake.
+
+.. toctree::
+ :maxdepth: 1
+
+ /generator/CodeBlocks
+ /generator/Eclipse CDT4
+ /generator/KDevelop3
+ /generator/Sublime Text 2
diff --git a/Help/manual/cmake-language.7.rst b/Help/manual/cmake-language.7.rst
index 7285897..61d0a42 100644
--- a/Help/manual/cmake-language.7.rst
+++ b/Help/manual/cmake-language.7.rst
@@ -312,6 +312,9 @@ inside out, e.g. ``${outer_${inner_variable}_variable}``.
The `Variables`_ section documents the scope of variable names
and how their values are set.
+An *environment variable reference* has the form ``$ENV{VAR}`` and
+is evaluated in the same contexts as a normal variable reference.
+
Comments
--------
diff --git a/Modules/CMakeFindEclipseCDT4.cmake b/Modules/CMakeFindEclipseCDT4.cmake
index b67e0f0..85c1fdf 100644
--- a/Modules/CMakeFindEclipseCDT4.cmake
+++ b/Modules/CMakeFindEclipseCDT4.cmake
@@ -78,7 +78,7 @@ processorcount(_CMAKE_ECLIPSE_PROCESSOR_COUNT)
# Only set -j if we are under UNIX and if the make-tool used actually has "make" in the name
# (we may also get here in the future e.g. for ninja)
-if("${_CMAKE_ECLIPSE_PROCESSOR_COUNT}" GREATER 1 AND UNIX AND "${CMAKE_MAKE_PROGRAM}" MATCHES make)
+if("${_CMAKE_ECLIPSE_PROCESSOR_COUNT}" GREATER 1 AND CMAKE_HOST_UNIX AND "${CMAKE_MAKE_PROGRAM}" MATCHES make)
set(_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS "-j${_CMAKE_ECLIPSE_PROCESSOR_COUNT}")
endif()
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index 25c482e..bc66337 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -689,7 +689,12 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
_GTK2_FIND_INCLUDE_DIR(GDK gdk/gdk.h)
_GTK2_FIND_INCLUDE_DIR(GDKCONFIG gdkconfig.h)
if(UNIX)
- _GTK2_FIND_LIBRARY (GDK gdk-x11 false true)
+ if(APPLE)
+ _GTK2_FIND_LIBRARY (GDK gdk-quartz false true)
+ endif()
+ if(NOT GTK2_GDK_FOUND)
+ _GTK2_FIND_LIBRARY (GDK gdk-x11 false true)
+ endif()
else()
_GTK2_FIND_LIBRARY (GDK gdk-win32 false true)
endif()
@@ -698,7 +703,12 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
_GTK2_FIND_INCLUDE_DIR(GTK gtk/gtk.h)
if(UNIX)
- _GTK2_FIND_LIBRARY (GTK gtk-x11 false true)
+ if(APPLE)
+ _GTK2_FIND_LIBRARY (GTK gtk-quartz false true)
+ endif()
+ if(NOT GTK2_GTK_FOUND)
+ _GTK2_FIND_LIBRARY (GTK gtk-x11 false true)
+ endif()
else()
_GTK2_FIND_LIBRARY (GTK gtk-win32 false true)
endif()
diff --git a/Modules/FindSWIG.cmake b/Modules/FindSWIG.cmake
index bb78bc2..55f4c0d 100644
--- a/Modules/FindSWIG.cmake
+++ b/Modules/FindSWIG.cmake
@@ -54,9 +54,9 @@ if(SWIG_EXECUTABLE)
string(REGEX REPLACE "[\n\r]+" ";" SWIG_swiglib_output ${SWIG_swiglib_output})
# force the path to be computed each time in case SWIG_EXECUTABLE has changed.
set(SWIG_DIR SWIG_DIR-NOTFOUND)
- find_path(SWIG_DIR swig.swg PATHS ${SWIG_swiglib_output})
+ find_path(SWIG_DIR swig.swg PATHS ${SWIG_swiglib_output} NO_CMAKE_FIND_ROOT_PATH)
if(SWIG_DIR)
- set(SWIG_USE_FILE ${CMAKE_ROOT}/Modules/UseSWIG.cmake)
+ set(SWIG_USE_FILE ${CMAKE_CURRENT_LIST_DIR}/UseSWIG.cmake)
execute_process(COMMAND ${SWIG_EXECUTABLE} -version
OUTPUT_VARIABLE SWIG_version_output
ERROR_VARIABLE SWIG_version_output
@@ -75,3 +75,5 @@ endif()
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SWIG REQUIRED_VARS SWIG_EXECUTABLE SWIG_DIR
VERSION_VAR SWIG_VERSION )
+
+mark_as_advanced(SWIG_DIR SWIG_VERSION)
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 00f3e21..4329053 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -94,7 +94,6 @@ endmacro()
#
macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
set(swig_full_infile ${infile})
- get_filename_component(swig_source_file_path "${infile}" PATH)
get_filename_component(swig_source_file_name_we "${infile}" NAME_WE)
get_source_file_property(swig_source_file_generated ${infile} GENERATED)
get_source_file_property(swig_source_file_cplusplus ${infile} CPLUSPLUS)
@@ -102,35 +101,8 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
if("${swig_source_file_flags}" STREQUAL "NOTFOUND")
set(swig_source_file_flags "")
endif()
- set(swig_source_file_fullname "${infile}")
- if(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}")
- string(REGEX REPLACE
- "^${CMAKE_CURRENT_SOURCE_DIR}" ""
- swig_source_file_relative_path
- "${swig_source_file_path}")
- else()
- if(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_BINARY_DIR}")
- string(REGEX REPLACE
- "^${CMAKE_CURRENT_BINARY_DIR}" ""
- swig_source_file_relative_path
- "${swig_source_file_path}")
- set(swig_source_file_generated 1)
- else()
- set(swig_source_file_relative_path "${swig_source_file_path}")
- if(swig_source_file_generated)
- set(swig_source_file_fullname "${CMAKE_CURRENT_BINARY_DIR}/${infile}")
- else()
- set(swig_source_file_fullname "${CMAKE_CURRENT_SOURCE_DIR}/${infile}")
- endif()
- endif()
- endif()
+ get_filename_component(swig_source_file_fullname "${infile}" ABSOLUTE)
- set(swig_generated_file_fullname
- "${CMAKE_CURRENT_BINARY_DIR}")
- if(swig_source_file_relative_path)
- set(swig_generated_file_fullname
- "${swig_generated_file_fullname}/${swig_source_file_relative_path}")
- endif()
# If CMAKE_SWIG_OUTDIR was specified then pass it to -outdir
if(CMAKE_SWIG_OUTDIR)
set(swig_outdir ${CMAKE_SWIG_OUTDIR})
@@ -142,7 +114,7 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
"${swig_outdir}"
"${infile}")
set(swig_generated_file_fullname
- "${swig_generated_file_fullname}/${swig_source_file_name_we}")
+ "${swig_outdir}/${swig_source_file_name_we}")
# add the language into the name of the file (i.e. TCL_wrap)
# this allows for the same .i file to be wrapped into different languages
set(swig_generated_file_fullname
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index ea5c9be..96265d7 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -2,5 +2,5 @@
set(CMake_VERSION_MAJOR 2)
set(CMake_VERSION_MINOR 8)
set(CMake_VERSION_PATCH 12)
-set(CMake_VERSION_TWEAK 20131125)
+set(CMake_VERSION_TWEAK 20131126)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 5475c2f..cd2fcc7 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -580,7 +580,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
* (this works at CPack time too)
*/
if (this->SupportsComponentInstallation() &
- !(this->IsSet("CPACK_MONOLITHIC_INSTALL")))
+ !(this->IsOn("CPACK_MONOLITHIC_INSTALL")))
{
// Determine the installation types for this project (if provided).
std::string installTypesVar = "CPACK_"
@@ -1532,13 +1532,13 @@ cmCPackGenerator::GetComponent(const char *projectName, const char *name)
component->DisplayName = component->Name;
}
component->IsHidden
- = this->IsSet((macroPrefix + "_HIDDEN").c_str());
+ = this->IsOn((macroPrefix + "_HIDDEN").c_str());
component->IsRequired
- = this->IsSet((macroPrefix + "_REQUIRED").c_str());
+ = this->IsOn((macroPrefix + "_REQUIRED").c_str());
component->IsDisabledByDefault
- = this->IsSet((macroPrefix + "_DISABLED").c_str());
+ = this->IsOn((macroPrefix + "_DISABLED").c_str());
component->IsDownloaded
- = this->IsSet((macroPrefix + "_DOWNLOADED").c_str())
+ = this->IsOn((macroPrefix + "_DOWNLOADED").c_str())
|| cmSystemTools::IsOn(this->GetOption("CPACK_DOWNLOAD_ALL"));
const char* archiveFile = this->GetOption((macroPrefix +
@@ -1635,9 +1635,9 @@ cmCPackGenerator::GetComponentGroup(const char *projectName, const char *name)
group->Description = description;
}
group->IsBold
- = this->IsSet((macroPrefix + "_BOLD_TITLE").c_str());
+ = this->IsOn((macroPrefix + "_BOLD_TITLE").c_str());
group->IsExpandedByDefault
- = this->IsSet((macroPrefix + "_EXPANDED").c_str());
+ = this->IsOn((macroPrefix + "_EXPANDED").c_str());
const char* parentGroupName
= this->GetOption((macroPrefix + "_PARENT_GROUP").c_str());
if (parentGroupName && *parentGroupName)
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 011fc6c..90cca1b 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -692,3 +692,14 @@ void cmGeneratorTarget::GenerateTargetManifest(const char* config) const
gg->AddToManifest(config? config:"", f);
}
}
+
+bool cmStrictTargetComparison::operator()(cmTarget *t1, cmTarget *t2) const
+{
+ int nameResult = strcmp(t1->GetName(), t2->GetName());
+ if (nameResult == 0)
+ {
+ return strcmp(t1->GetMakefile()->GetStartDirectory(),
+ t2->GetMakefile()->GetStartDirectory()) < 0;
+ }
+ return nameResult < 0;
+}
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 69d1bb2..d2b65b2 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -100,6 +100,12 @@ private:
void operator=(cmGeneratorTarget const&);
};
-typedef std::map<cmTarget*, cmGeneratorTarget*> cmGeneratorTargetsType;
+struct cmStrictTargetComparison {
+ bool operator()(cmTarget *t1, cmTarget *t2) const;
+};
+
+typedef std::map<cmTarget*,
+ cmGeneratorTarget*,
+ cmStrictTargetComparison> cmGeneratorTargetsType;
#endif
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index e1af2f9..6333873 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -471,23 +471,29 @@ cmGlobalUnixMakefileGenerator3
// The directory-level rule should depend on the target-level rules
// for all targets in the directory.
std::vector<std::string> depends;
- for(cmTargets::iterator l = lg->GetMakefile()->GetTargets().begin();
- l != lg->GetMakefile()->GetTargets().end(); ++l)
+ cmGeneratorTargetsType targets = lg->GetMakefile()->GetGeneratorTargets();
+ for(cmGeneratorTargetsType::iterator l = targets.begin();
+ l != targets.end(); ++l)
{
- if((l->second.GetType() == cmTarget::EXECUTABLE) ||
- (l->second.GetType() == cmTarget::STATIC_LIBRARY) ||
- (l->second.GetType() == cmTarget::SHARED_LIBRARY) ||
- (l->second.GetType() == cmTarget::MODULE_LIBRARY) ||
- (l->second.GetType() == cmTarget::OBJECT_LIBRARY) ||
- (l->second.GetType() == cmTarget::INTERFACE_LIBRARY) ||
- (l->second.GetType() == cmTarget::UTILITY))
+ if((l->second->GetType() == cmTarget::EXECUTABLE) ||
+ (l->second->GetType() == cmTarget::STATIC_LIBRARY) ||
+ (l->second->GetType() == cmTarget::SHARED_LIBRARY) ||
+ (l->second->GetType() == cmTarget::MODULE_LIBRARY) ||
+ (l->second->GetType() == cmTarget::OBJECT_LIBRARY) ||
+ (l->second->GetType() == cmTarget::INTERFACE_LIBRARY) ||
+ (l->second->GetType() == cmTarget::UTILITY))
{
+ if(l->second->Target->IsImported())
+ {
+ continue;
+ }
// Add this to the list of depends rules in this directory.
- if((!check_all || !l->second.GetPropertyAsBool("EXCLUDE_FROM_ALL")) &&
+ if((!check_all || !l->second->GetPropertyAsBool("EXCLUDE_FROM_ALL")) &&
(!check_relink ||
- l->second.NeedRelinkBeforeInstall(lg->ConfigurationName.c_str())))
+ l->second->Target
+ ->NeedRelinkBeforeInstall(lg->ConfigurationName.c_str())))
{
- std::string tname = lg->GetRelativeTargetDirectory(l->second);
+ std::string tname = lg->GetRelativeTargetDirectory(*l->second->Target);
tname += "/";
tname += pass;
depends.push_back(tname);
@@ -632,49 +638,55 @@ cmGlobalUnixMakefileGenerator3
lg = static_cast<cmLocalUnixMakefileGenerator3 *>
(this->LocalGenerators[i]);
// for each target Generate the rule files for each target.
- cmTargets& targets = lg->GetMakefile()->GetTargets();
- for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t)
+ cmGeneratorTargetsType targets = lg->GetMakefile()->GetGeneratorTargets();
+ for(cmGeneratorTargetsType::iterator t = targets.begin();
+ t != targets.end(); ++t)
{
+ if(t->second->Target->IsImported())
+ {
+ continue;
+ }
// Don't emit the same rule twice (e.g. two targets with the same
// simple name)
- if(t->second.GetName() &&
- strlen(t->second.GetName()) &&
- emitted.insert(t->second.GetName()).second &&
+ if(t->second->GetName() &&
+ strlen(t->second->GetName()) &&
+ emitted.insert(t->second->GetName()).second &&
// Handle user targets here. Global targets are handled in
// the local generator on a per-directory basis.
- ((t->second.GetType() == cmTarget::EXECUTABLE) ||
- (t->second.GetType() == cmTarget::STATIC_LIBRARY) ||
- (t->second.GetType() == cmTarget::SHARED_LIBRARY) ||
- (t->second.GetType() == cmTarget::MODULE_LIBRARY) ||
- (t->second.GetType() == cmTarget::OBJECT_LIBRARY) ||
- (t->second.GetType() == cmTarget::INTERFACE_LIBRARY) ||
- (t->second.GetType() == cmTarget::UTILITY)))
+ ((t->second->GetType() == cmTarget::EXECUTABLE) ||
+ (t->second->GetType() == cmTarget::STATIC_LIBRARY) ||
+ (t->second->GetType() == cmTarget::SHARED_LIBRARY) ||
+ (t->second->GetType() == cmTarget::MODULE_LIBRARY) ||
+ (t->second->GetType() == cmTarget::OBJECT_LIBRARY) ||
+ (t->second->GetType() == cmTarget::INTERFACE_LIBRARY) ||
+ (t->second->GetType() == cmTarget::UTILITY)))
{
// Add a rule to build the target by name.
lg->WriteDivider(ruleFileStream);
ruleFileStream
<< "# Target rules for targets named "
- << t->second.GetName() << "\n\n";
+ << t->second->GetName() << "\n\n";
// Write the rule.
commands.clear();
std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash();
tmp += "Makefile2";
commands.push_back(lg->GetRecursiveMakeCall
- (tmp.c_str(),t->second.GetName()));
+ (tmp.c_str(),t->second->GetName()));
depends.clear();
depends.push_back("cmake_check_build_system");
lg->WriteMakeRule(ruleFileStream,
"Build rule for target.",
- t->second.GetName(), depends, commands,
+ t->second->GetName(), depends, commands,
true);
- if (t->second.GetType() == cmTarget::INTERFACE_LIBRARY)
+ if (t->second->GetType() == cmTarget::INTERFACE_LIBRARY)
{
continue;
}
// Add a fast rule to build the target
- std::string localName = lg->GetRelativeTargetDirectory(t->second);
+ std::string localName =
+ lg->GetRelativeTargetDirectory(*t->second->Target);
std::string makefileName;
makefileName = localName;
makefileName += "/build.make";
@@ -682,7 +694,7 @@ cmGlobalUnixMakefileGenerator3
commands.clear();
std::string makeTargetName = localName;
makeTargetName += "/build";
- localName = t->second.GetName();
+ localName = t->second->GetName();
localName += "/fast";
commands.push_back(lg->GetRecursiveMakeCall
(makefileName.c_str(), makeTargetName.c_str()));
@@ -691,11 +703,12 @@ cmGlobalUnixMakefileGenerator3
// Add a local name for the rule to relink the target before
// installation.
- if(t->second.NeedRelinkBeforeInstall(lg->ConfigurationName.c_str()))
+ if(t->second->Target
+ ->NeedRelinkBeforeInstall(lg->ConfigurationName.c_str()))
{
- makeTargetName = lg->GetRelativeTargetDirectory(t->second);
+ makeTargetName = lg->GetRelativeTargetDirectory(*t->second->Target);
makeTargetName += "/preinstall";
- localName = t->second.GetName();
+ localName = t->second->GetName();
localName += "/preinstall";
depends.clear();
commands.clear();
@@ -729,26 +742,31 @@ cmGlobalUnixMakefileGenerator3
depends.push_back("cmake_check_build_system");
// for each target Generate the rule files for each target.
- cmTargets& targets = lg->GetMakefile()->GetTargets();
- for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t)
+ cmGeneratorTargetsType targets = lg->GetMakefile()->GetGeneratorTargets();
+ for(cmGeneratorTargetsType::iterator t = targets.begin();
+ t != targets.end(); ++t)
{
- if (t->second.GetName()
- && strlen(t->second.GetName())
- && ((t->second.GetType() == cmTarget::EXECUTABLE)
- || (t->second.GetType() == cmTarget::STATIC_LIBRARY)
- || (t->second.GetType() == cmTarget::SHARED_LIBRARY)
- || (t->second.GetType() == cmTarget::MODULE_LIBRARY)
- || (t->second.GetType() == cmTarget::OBJECT_LIBRARY)
- || (t->second.GetType() == cmTarget::INTERFACE_LIBRARY)
- || (t->second.GetType() == cmTarget::UTILITY)))
+ if(t->second->Target->IsImported())
+ {
+ continue;
+ }
+ if (t->second->GetName()
+ && strlen(t->second->GetName())
+ && ((t->second->GetType() == cmTarget::EXECUTABLE)
+ || (t->second->GetType() == cmTarget::STATIC_LIBRARY)
+ || (t->second->GetType() == cmTarget::SHARED_LIBRARY)
+ || (t->second->GetType() == cmTarget::MODULE_LIBRARY)
+ || (t->second->GetType() == cmTarget::OBJECT_LIBRARY)
+ || (t->second->GetType() == cmTarget::INTERFACE_LIBRARY)
+ || (t->second->GetType() == cmTarget::UTILITY)))
{
std::string makefileName;
// Add a rule to build the target by name.
- localName = lg->GetRelativeTargetDirectory(t->second);
+ localName = lg->GetRelativeTargetDirectory(*t->second->Target);
makefileName = localName;
makefileName += "/build.make";
- bool needRequiresStep = this->NeedRequiresStep(t->second);
+ bool needRequiresStep = this->NeedRequiresStep(*t->second->Target);
lg->WriteDivider(ruleFileStream);
ruleFileStream
@@ -757,7 +775,7 @@ cmGlobalUnixMakefileGenerator3
commands.clear();
- if(t->second.GetType() != cmTarget::INTERFACE_LIBRARY)
+ if(t->second->GetType() != cmTarget::INTERFACE_LIBRARY)
{
makeTargetName = localName;
makeTargetName += "/depend";
@@ -793,7 +811,7 @@ cmGlobalUnixMakefileGenerator3
cmLocalGenerator::SHELL);
progCmd << " ";
std::vector<unsigned long>& progFiles =
- this->ProgressMap[&t->second].Marks;
+ this->ProgressMap[t->second->Target].Marks;
for (std::vector<unsigned long>::iterator i = progFiles.begin();
i != progFiles.end(); ++i)
{
@@ -802,14 +820,14 @@ cmGlobalUnixMakefileGenerator3
commands.push_back(progCmd.str());
}
progressDir = "Built target ";
- progressDir += t->first;
+ progressDir += t->second->GetName();
lg->AppendEcho(commands,progressDir.c_str());
}
else
{
depends.clear();
}
- this->AppendGlobalTargetDepends(depends,t->second);
+ this->AppendGlobalTargetDepends(depends,*t->second->Target);
if(depends.empty() && this->EmptyRuleHackDepends != "")
{
depends.push_back(this->EmptyRuleHackDepends);
@@ -818,7 +836,7 @@ cmGlobalUnixMakefileGenerator3
localName.c_str(), depends, commands, true);
// add the all/all dependency
- if(!this->IsExcluded(this->LocalGenerators[0], t->second))
+ if(!this->IsExcluded(this->LocalGenerators[0], *t->second->Target))
{
depends.clear();
depends.push_back(localName);
@@ -843,7 +861,7 @@ cmGlobalUnixMakefileGenerator3
//
std::set<cmTarget *> emitted;
progCmd << " "
- << this->CountProgressMarksInTarget(&t->second, emitted);
+ << this->CountProgressMarksInTarget(t->second->Target, emitted);
commands.push_back(progCmd.str());
}
std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash();
@@ -861,7 +879,7 @@ cmGlobalUnixMakefileGenerator3
}
depends.clear();
depends.push_back("cmake_check_build_system");
- localName = lg->GetRelativeTargetDirectory(t->second);
+ localName = lg->GetRelativeTargetDirectory(*t->second->Target);
localName += "/rule";
lg->WriteMakeRule(ruleFileStream,
"Build rule for subdir invocation for target.",
@@ -872,12 +890,13 @@ cmGlobalUnixMakefileGenerator3
depends.clear();
depends.push_back(localName);
lg->WriteMakeRule(ruleFileStream, "Convenience name for target.",
- t->second.GetName(), depends, commands, true);
+ t->second->GetName(), depends, commands, true);
// Add rules to prepare the target for installation.
- if(t->second.NeedRelinkBeforeInstall(lg->ConfigurationName.c_str()))
+ if(t->second->Target
+ ->NeedRelinkBeforeInstall(lg->ConfigurationName.c_str()))
{
- localName = lg->GetRelativeTargetDirectory(t->second);
+ localName = lg->GetRelativeTargetDirectory(*t->second->Target);
localName += "/preinstall";
depends.clear();
commands.clear();
@@ -887,7 +906,7 @@ cmGlobalUnixMakefileGenerator3
"Pre-install relink rule for target.",
localName.c_str(), depends, commands, true);
- if(!this->IsExcluded(this->LocalGenerators[0], t->second))
+ if(!this->IsExcluded(this->LocalGenerators[0], *t->second->Target))
{
depends.clear();
depends.push_back(localName);
@@ -898,7 +917,7 @@ cmGlobalUnixMakefileGenerator3
}
// add the clean rule
- localName = lg->GetRelativeTargetDirectory(t->second);
+ localName = lg->GetRelativeTargetDirectory(*t->second->Target);
makeTargetName = localName;
makeTargetName += "/clean";
depends.clear();
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index f1d5e2c..158d714 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -64,18 +64,23 @@ void cmLocalNinjaGenerator::Generate()
}
}
- cmTargets& targets = this->GetMakefile()->GetTargets();
- for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t)
+ cmGeneratorTargetsType targets = this->GetMakefile()->GetGeneratorTargets();
+ for(cmGeneratorTargetsType::iterator t = targets.begin();
+ t != targets.end(); ++t)
{
- cmNinjaTargetGenerator* tg = cmNinjaTargetGenerator::New(&t->second);
+ if (t->second->Target->IsImported())
+ {
+ continue;
+ }
+ cmNinjaTargetGenerator* tg = cmNinjaTargetGenerator::New(t->second);
if(tg)
{
tg->Generate();
// Add the target to "all" if required.
if (!this->GetGlobalNinjaGenerator()->IsExcluded(
this->GetGlobalNinjaGenerator()->GetLocalGenerators()[0],
- t->second))
- this->GetGlobalNinjaGenerator()->AddDependencyToAll(&t->second);
+ *t->second->Target))
+ this->GetGlobalNinjaGenerator()->AddDependencyToAll(t->second->Target);
delete tg;
}
}
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 8ed8d0a..9af5c29 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -145,13 +145,18 @@ void cmLocalUnixMakefileGenerator3::Generate()
this->Makefile->IsOn("CMAKE_SKIP_ASSEMBLY_SOURCE_RULES");
// Generate the rule files for each target.
- cmTargets& targets = this->Makefile->GetTargets();
+ cmGeneratorTargetsType targets = this->Makefile->GetGeneratorTargets();
cmGlobalUnixMakefileGenerator3* gg =
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
- for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t)
+ for(cmGeneratorTargetsType::iterator t = targets.begin();
+ t != targets.end(); ++t)
{
+ if (t->second->Target->IsImported())
+ {
+ continue;
+ }
cmsys::auto_ptr<cmMakefileTargetGenerator> tg(
- cmMakefileTargetGenerator::New(&(t->second)));
+ cmMakefileTargetGenerator::New(t->second));
if (tg.get())
{
tg->WriteRuleFiles();
@@ -372,22 +377,23 @@ void cmLocalUnixMakefileGenerator3
// for each target we just provide a rule to cd up to the top and do a make
// on the target
- cmTargets& targets = this->Makefile->GetTargets();
+ cmGeneratorTargetsType targets = this->Makefile->GetGeneratorTargets();
std::string localName;
- for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t)
- {
- if((t->second.GetType() == cmTarget::EXECUTABLE) ||
- (t->second.GetType() == cmTarget::STATIC_LIBRARY) ||
- (t->second.GetType() == cmTarget::SHARED_LIBRARY) ||
- (t->second.GetType() == cmTarget::MODULE_LIBRARY) ||
- (t->second.GetType() == cmTarget::OBJECT_LIBRARY) ||
- (t->second.GetType() == cmTarget::INTERFACE_LIBRARY) ||
- (t->second.GetType() == cmTarget::UTILITY))
+ for(cmGeneratorTargetsType::iterator t = targets.begin();
+ t != targets.end(); ++t)
+ {
+ if((t->second->GetType() == cmTarget::EXECUTABLE) ||
+ (t->second->GetType() == cmTarget::STATIC_LIBRARY) ||
+ (t->second->GetType() == cmTarget::SHARED_LIBRARY) ||
+ (t->second->GetType() == cmTarget::MODULE_LIBRARY) ||
+ (t->second->GetType() == cmTarget::OBJECT_LIBRARY) ||
+ (t->second->GetType() == cmTarget::INTERFACE_LIBRARY) ||
+ (t->second->GetType() == cmTarget::UTILITY))
{
- emitted.insert(t->second.GetName());
+ emitted.insert(t->second->GetName());
// for subdirs add a rule to build this specific target by name.
- localName = this->GetRelativeTargetDirectory(t->second);
+ localName = this->GetRelativeTargetDirectory(*t->second->Target);
localName += "/rule";
commands.clear();
depends.clear();
@@ -404,22 +410,23 @@ void cmLocalUnixMakefileGenerator3
localName.c_str(), depends, commands, true);
// Add a target with the canonical name (no prefix, suffix or path).
- if(localName != t->second.GetName())
+ if(localName != t->second->GetName())
{
commands.clear();
depends.push_back(localName);
this->WriteMakeRule(ruleFileStream, "Convenience name for target.",
- t->second.GetName(), depends, commands, true);
+ t->second->GetName(), depends, commands, true);
}
// Add a fast rule to build the target
- std::string makefileName = this->GetRelativeTargetDirectory(t->second);
+ std::string makefileName =
+ this->GetRelativeTargetDirectory(*t->second->Target);
makefileName += "/build.make";
// make sure the makefile name is suitable for a makefile
std::string makeTargetName =
- this->GetRelativeTargetDirectory(t->second);
+ this->GetRelativeTargetDirectory(*t->second->Target);
makeTargetName += "/build";
- localName = t->second.GetName();
+ localName = t->second->GetName();
localName += "/fast";
depends.clear();
commands.clear();
@@ -433,11 +440,12 @@ void cmLocalUnixMakefileGenerator3
// Add a local name for the rule to relink the target before
// installation.
- if(t->second.NeedRelinkBeforeInstall(this->ConfigurationName.c_str()))
+ if(t->second->Target
+ ->NeedRelinkBeforeInstall(this->ConfigurationName.c_str()))
{
- makeTargetName = this->GetRelativeTargetDirectory(t->second);
+ makeTargetName = this->GetRelativeTargetDirectory(*t->second->Target);
makeTargetName += "/preinstall";
- localName = t->second.GetName();
+ localName = t->second->GetName();
localName += "/preinstall";
depends.clear();
commands.clear();
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index e4219a9..69fe444 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -21,15 +21,15 @@
//----------------------------------------------------------------------------
cmMakefileExecutableTargetGenerator
-::cmMakefileExecutableTargetGenerator(cmTarget* target):
- cmMakefileTargetGenerator(target)
+::cmMakefileExecutableTargetGenerator(cmGeneratorTarget* target):
+ cmMakefileTargetGenerator(target->Target)
{
this->CustomCommandDriver = OnDepends;
this->Target->GetExecutableNames(
this->TargetNameOut, this->TargetNameReal, this->TargetNameImport,
this->TargetNamePDB, this->ConfigName);
- this->OSXBundleGenerator = new cmOSXBundleGenerator(this->Target,
+ this->OSXBundleGenerator = new cmOSXBundleGenerator(target,
this->ConfigName);
this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders);
}
diff --git a/Source/cmMakefileExecutableTargetGenerator.h b/Source/cmMakefileExecutableTargetGenerator.h
index 3b18166..940226b 100644
--- a/Source/cmMakefileExecutableTargetGenerator.h
+++ b/Source/cmMakefileExecutableTargetGenerator.h
@@ -17,7 +17,7 @@
class cmMakefileExecutableTargetGenerator: public cmMakefileTargetGenerator
{
public:
- cmMakefileExecutableTargetGenerator(cmTarget* target);
+ cmMakefileExecutableTargetGenerator(cmGeneratorTarget* target);
virtual ~cmMakefileExecutableTargetGenerator();
/* the main entry point for this class. Writes the Makefiles associated
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 29365a3..7b8a531 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -21,15 +21,15 @@
//----------------------------------------------------------------------------
cmMakefileLibraryTargetGenerator
-::cmMakefileLibraryTargetGenerator(cmTarget* target):
- cmMakefileTargetGenerator(target)
+::cmMakefileLibraryTargetGenerator(cmGeneratorTarget* target):
+ cmMakefileTargetGenerator(target->Target)
{
this->CustomCommandDriver = OnDepends;
this->Target->GetLibraryNames(
this->TargetNameOut, this->TargetNameSO, this->TargetNameReal,
this->TargetNameImport, this->TargetNamePDB, this->ConfigName);
- this->OSXBundleGenerator = new cmOSXBundleGenerator(this->Target,
+ this->OSXBundleGenerator = new cmOSXBundleGenerator(target,
this->ConfigName);
this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders);
}
diff --git a/Source/cmMakefileLibraryTargetGenerator.h b/Source/cmMakefileLibraryTargetGenerator.h
index 07f828b..1487b56 100644
--- a/Source/cmMakefileLibraryTargetGenerator.h
+++ b/Source/cmMakefileLibraryTargetGenerator.h
@@ -18,7 +18,7 @@ class cmMakefileLibraryTargetGenerator:
public cmMakefileTargetGenerator
{
public:
- cmMakefileLibraryTargetGenerator(cmTarget* target);
+ cmMakefileLibraryTargetGenerator(cmGeneratorTarget* target);
virtual ~cmMakefileLibraryTargetGenerator();
/* the main entry point for this class. Writes the Makefiles associated
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 2fcad79..2063a24 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -63,7 +63,7 @@ cmMakefileTargetGenerator::~cmMakefileTargetGenerator()
}
cmMakefileTargetGenerator *
-cmMakefileTargetGenerator::New(cmTarget *tgt)
+cmMakefileTargetGenerator::New(cmGeneratorTarget *tgt)
{
cmMakefileTargetGenerator *result = 0;
diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h
index ec2af1c..4f8fafa 100644
--- a/Source/cmMakefileTargetGenerator.h
+++ b/Source/cmMakefileTargetGenerator.h
@@ -38,7 +38,7 @@ public:
virtual ~cmMakefileTargetGenerator();
// construct using this factory call
- static cmMakefileTargetGenerator *New(cmTarget *tgt);
+ static cmMakefileTargetGenerator *New(cmGeneratorTarget *tgt);
/* the main entry point for this class. Writes the Makefiles associated
with this target */
diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx
index 1fa4e95..7751ad9 100644
--- a/Source/cmMakefileUtilityTargetGenerator.cxx
+++ b/Source/cmMakefileUtilityTargetGenerator.cxx
@@ -20,11 +20,11 @@
//----------------------------------------------------------------------------
cmMakefileUtilityTargetGenerator
-::cmMakefileUtilityTargetGenerator(cmTarget* target):
- cmMakefileTargetGenerator(target)
+::cmMakefileUtilityTargetGenerator(cmGeneratorTarget* target):
+ cmMakefileTargetGenerator(target->Target)
{
this->CustomCommandDriver = OnUtility;
- this->OSXBundleGenerator = new cmOSXBundleGenerator(this->Target,
+ this->OSXBundleGenerator = new cmOSXBundleGenerator(target,
this->ConfigName);
this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders);
}
diff --git a/Source/cmMakefileUtilityTargetGenerator.h b/Source/cmMakefileUtilityTargetGenerator.h
index fc47b38..8f99300 100644
--- a/Source/cmMakefileUtilityTargetGenerator.h
+++ b/Source/cmMakefileUtilityTargetGenerator.h
@@ -18,7 +18,7 @@ class cmMakefileUtilityTargetGenerator:
public cmMakefileTargetGenerator
{
public:
- cmMakefileUtilityTargetGenerator(cmTarget* target);
+ cmMakefileUtilityTargetGenerator(cmGeneratorTarget* target);
virtual ~cmMakefileUtilityTargetGenerator();
/* the main entry point for this class. Writes the Makefiles associated
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index d8e9b34..2c96ede 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -17,6 +17,7 @@
#include "cmGeneratedFileStream.h"
#include "cmMakefile.h"
#include "cmOSXBundleGenerator.h"
+#include "cmGeneratorTarget.h"
#include <assert.h>
#include <algorithm>
@@ -27,8 +28,8 @@
cmNinjaNormalTargetGenerator::
-cmNinjaNormalTargetGenerator(cmTarget* target)
- : cmNinjaTargetGenerator(target)
+cmNinjaNormalTargetGenerator(cmGeneratorTarget* target)
+ : cmNinjaTargetGenerator(target->Target)
, TargetNameOut()
, TargetNameSO()
, TargetNameReal()
@@ -36,15 +37,16 @@ cmNinjaNormalTargetGenerator(cmTarget* target)
, TargetNamePDB()
, TargetLinkLanguage(0)
{
- this->TargetLinkLanguage = target->GetLinkerLanguage(this->GetConfigName());
+ this->TargetLinkLanguage = target->Target
+ ->GetLinkerLanguage(this->GetConfigName());
if (target->GetType() == cmTarget::EXECUTABLE)
- target->GetExecutableNames(this->TargetNameOut,
+ target->Target->GetExecutableNames(this->TargetNameOut,
this->TargetNameReal,
this->TargetNameImport,
this->TargetNamePDB,
GetLocalGenerator()->GetConfigName());
else
- target->GetLibraryNames(this->TargetNameOut,
+ target->Target->GetLibraryNames(this->TargetNameOut,
this->TargetNameSO,
this->TargetNameReal,
this->TargetNameImport,
@@ -55,7 +57,7 @@ cmNinjaNormalTargetGenerator(cmTarget* target)
{
// on Windows the output dir is already needed at compile time
// ensure the directory exists (OutDir test)
- EnsureDirectoryExists(target->GetDirectory(this->GetConfigName()));
+ EnsureDirectoryExists(target->Target->GetDirectory(this->GetConfigName()));
}
this->OSXBundleGenerator = new cmOSXBundleGenerator(target,
diff --git a/Source/cmNinjaNormalTargetGenerator.h b/Source/cmNinjaNormalTargetGenerator.h
index 284804b..c7a089c 100644
--- a/Source/cmNinjaNormalTargetGenerator.h
+++ b/Source/cmNinjaNormalTargetGenerator.h
@@ -21,11 +21,12 @@
class cmSourceFile;
class cmOSXBundleGenerator;
+class cmGeneratorTarget;
class cmNinjaNormalTargetGenerator : public cmNinjaTargetGenerator
{
public:
- cmNinjaNormalTargetGenerator(cmTarget* target);
+ cmNinjaNormalTargetGenerator(cmGeneratorTarget* target);
~cmNinjaNormalTargetGenerator();
void Generate();
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index e7e0a1d..3f95e6b 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -26,7 +26,7 @@
#include <algorithm>
cmNinjaTargetGenerator *
-cmNinjaTargetGenerator::New(cmTarget* target)
+cmNinjaTargetGenerator::New(cmGeneratorTarget* target)
{
switch (target->GetType())
{
@@ -44,7 +44,7 @@ cmNinjaTargetGenerator::New(cmTarget* target)
// We only want to process global targets that live in the home
// (i.e. top-level) directory. CMake creates copies of these targets
// in every directory, which we don't need.
- cmMakefile *mf = target->GetMakefile();
+ cmMakefile *mf = target->Target->GetMakefile();
if (strcmp(mf->GetStartDirectory(), mf->GetHomeDirectory()) == 0)
return new cmNinjaUtilityTargetGenerator(target);
// else fallthrough
diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h
index 1cf811a..e377a78 100644
--- a/Source/cmNinjaTargetGenerator.h
+++ b/Source/cmNinjaTargetGenerator.h
@@ -30,7 +30,7 @@ class cmNinjaTargetGenerator
{
public:
/// Create a cmNinjaTargetGenerator according to the @a target's type.
- static cmNinjaTargetGenerator* New(cmTarget* target);
+ static cmNinjaTargetGenerator* New(cmGeneratorTarget* target);
/// Build a NinjaTargetGenerator.
cmNinjaTargetGenerator(cmTarget* target);
diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx
index 755ce6e..8556565 100644
--- a/Source/cmNinjaUtilityTargetGenerator.cxx
+++ b/Source/cmNinjaUtilityTargetGenerator.cxx
@@ -18,8 +18,9 @@
#include "cmSourceFile.h"
#include "cmTarget.h"
-cmNinjaUtilityTargetGenerator::cmNinjaUtilityTargetGenerator(cmTarget *target)
- : cmNinjaTargetGenerator(target) {}
+cmNinjaUtilityTargetGenerator::cmNinjaUtilityTargetGenerator(
+ cmGeneratorTarget *target)
+ : cmNinjaTargetGenerator(target->Target) {}
cmNinjaUtilityTargetGenerator::~cmNinjaUtilityTargetGenerator() {}
diff --git a/Source/cmNinjaUtilityTargetGenerator.h b/Source/cmNinjaUtilityTargetGenerator.h
index 8b82ce4..add0291 100644
--- a/Source/cmNinjaUtilityTargetGenerator.h
+++ b/Source/cmNinjaUtilityTargetGenerator.h
@@ -21,7 +21,7 @@ class cmSourceFile;
class cmNinjaUtilityTargetGenerator : public cmNinjaTargetGenerator
{
public:
- cmNinjaUtilityTargetGenerator(cmTarget* target);
+ cmNinjaUtilityTargetGenerator(cmGeneratorTarget* target);
~cmNinjaUtilityTargetGenerator();
void Generate();
diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx
index a475c7c..9a340dc 100644
--- a/Source/cmOSXBundleGenerator.cxx
+++ b/Source/cmOSXBundleGenerator.cxx
@@ -18,10 +18,10 @@
//----------------------------------------------------------------------------
cmOSXBundleGenerator::
-cmOSXBundleGenerator(cmTarget* target,
+cmOSXBundleGenerator(cmGeneratorTarget* target,
const char* configName)
- : Target(target)
- , Makefile(target->GetMakefile())
+ : Target(target->Target)
+ , Makefile(target->Target->GetMakefile())
, LocalGenerator(Makefile->GetLocalGenerator())
, ConfigName(configName)
, MacContentFolders(0)
diff --git a/Source/cmOSXBundleGenerator.h b/Source/cmOSXBundleGenerator.h
index ec82b9a..29b7611 100644
--- a/Source/cmOSXBundleGenerator.h
+++ b/Source/cmOSXBundleGenerator.h
@@ -21,11 +21,12 @@
class cmTarget;
class cmMakefile;
class cmLocalGenerator;
+class cmGeneratorTarget;
class cmOSXBundleGenerator
{
public:
- cmOSXBundleGenerator(cmTarget* target,
+ cmOSXBundleGenerator(cmGeneratorTarget* target,
const char* configName);
// create an app bundle at a given root, and return