diff options
-rw-r--r-- | Help/generator/MSYS Makefiles.rst | 10 | ||||
-rw-r--r-- | Help/generator/MinGW Makefiles.rst | 11 | ||||
-rw-r--r-- | Help/prop_tgt/TYPE.rst | 3 | ||||
-rw-r--r-- | Help/release/3.1.0.rst | 22 | ||||
-rw-r--r-- | Modules/CPackComponent.cmake | 4 | ||||
-rw-r--r-- | Source/cmComputeLinkDepends.cxx | 5 | ||||
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 17 | ||||
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 5 | ||||
-rw-r--r-- | Source/kwsys/Terminal.c | 1 | ||||
-rw-r--r-- | Tests/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/CxxSubdirC/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/CxxSubdirC/Cdir/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/CxxSubdirC/Cdir/Cobj.c | 1 | ||||
-rw-r--r-- | Tests/CxxSubdirC/main.cxx | 2 | ||||
-rwxr-xr-x | bootstrap | 2 |
15 files changed, 75 insertions, 15 deletions
diff --git a/Help/generator/MSYS Makefiles.rst b/Help/generator/MSYS Makefiles.rst index 0b89126..f7cfa44 100644 --- a/Help/generator/MSYS Makefiles.rst +++ b/Help/generator/MSYS Makefiles.rst @@ -1,7 +1,11 @@ MSYS Makefiles -------------- -Generates MSYS makefiles. +Generates makefiles for use with MSYS ``make`` under the MSYS shell. -The makefiles use /bin/sh as the shell. They require msys to be -installed on the machine. +Use this generator in a MSYS shell prompt and using ``make`` as the build +tool. The generated makefiles use ``/bin/sh`` as the shell to launch build +rules. They are not compatible with a Windows command prompt. + +To build under a Windows command prompt, use the +:generator:`MinGW Makefiles` generator. diff --git a/Help/generator/MinGW Makefiles.rst b/Help/generator/MinGW Makefiles.rst index ed4ccdd..9fe5fe3 100644 --- a/Help/generator/MinGW Makefiles.rst +++ b/Help/generator/MinGW Makefiles.rst @@ -1,7 +1,12 @@ MinGW Makefiles --------------- -Generates a make file for use with mingw32-make. +Generates makefiles for use with ``mingw32-make`` under a Windows command +prompt. -The makefiles generated use cmd.exe as the shell. They do not require -msys or a unix shell. +Use this generator under a Windows command prompt with MinGW in the ``PATH`` +and using ``mingw32-make`` as the build tool. The generated makefiles use +``cmd.exe`` as the shell to launch build rules. They are not compatible with +MSYS or a unix shell. + +To build under the MSYS shell, use the :generator:`MSYS Makefiles` generator. diff --git a/Help/prop_tgt/TYPE.rst b/Help/prop_tgt/TYPE.rst index 1951d46..5ac63cc 100644 --- a/Help/prop_tgt/TYPE.rst +++ b/Help/prop_tgt/TYPE.rst @@ -5,4 +5,5 @@ The type of the target. This read-only property can be used to test the type of the given target. It will be one of STATIC_LIBRARY, MODULE_LIBRARY, -SHARED_LIBRARY, EXECUTABLE or one of the internal target types. +SHARED_LIBRARY, INTERFACE_LIBRARY, EXECUTABLE or one of the internal +target types. diff --git a/Help/release/3.1.0.rst b/Help/release/3.1.0.rst index a5b3e8e..97a63f9 100644 --- a/Help/release/3.1.0.rst +++ b/Help/release/3.1.0.rst @@ -353,6 +353,28 @@ Deprecated and Removed Features CMake 3.1 again requires the quotes for this to work correctly. +* Prior to CMake 3.1 the Makefile generators did not escape ``#`` + correctly inside make variable assignments used in generated + makefiles, causing them to be treated as comments. This made + code like:: + + add_compile_options(-Wno-#pragma-messages) + + not work in Makefile generators, but work in other generators. + Now it is escaped correctly, making the behavior consistent + across generators. However, some projects may have tried to + workaround the original bug with code like:: + + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-\\#pragma-messages") + + This added the needed escape for Makefile generators but also + caused other generators to pass ``-Wno-\#pragma-messages`` to + the shell, which would work only in POSIX shells. + Unfortunately the escaping fix could not be made in a compatible + way so this platform- and generator-specific workaround no + longer works. Project code may test the :variable:`CMAKE_VERSION` + variable value to make the workaround version-specific too. + * Callbacks established by the :command:`variable_watch` command will no longer receive the ``ALLOWED_UNKNOWN_READ_ACCESS`` access type when the undocumented ``CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS`` variable is diff --git a/Modules/CPackComponent.cmake b/Modules/CPackComponent.cmake index 5524a3f..573e5aa 100644 --- a/Modules/CPackComponent.cmake +++ b/Modules/CPackComponent.cmake @@ -110,7 +110,7 @@ # # DESCRIPTION is an extended description of the component, used in # graphical installers to give the user additional information about the -# component. Descriptions can span multiple lines using "\n" as the +# component. Descriptions can span multiple lines using ``\n`` as the # line separator. Typically, these descriptions should be no more than # a few lines long. # @@ -185,7 +185,7 @@ # DESCRIPTION is an extended description of the component group, used in # graphical installers to give the user additional information about the # components within that group. Descriptions can span multiple lines -# using "\n" as the line separator. Typically, these descriptions +# using ``\n`` as the line separator. Typically, these descriptions # should be no more than a few lines long. # # PARENT_GROUP, if supplied, names the parent group of this group. diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 1fb8f30..a636d23 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -266,9 +266,10 @@ cmComputeLinkDepends::Compute() // Iterate in reverse order so we can keep only the last occurrence // of a shared library. std::set<int> emmitted; + const std::vector<int>& cFLO = this->FinalLinkOrder; for(std::vector<int>::const_reverse_iterator - li = this->FinalLinkOrder.rbegin(), - le = this->FinalLinkOrder.rend(); + li = cFLO.rbegin(), + le = cFLO.rend(); li != le; ++li) { int i = *li; diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index e344df4..a05719d 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -110,13 +110,26 @@ void cmNinjaNormalTargetGenerator::WriteLanguagesRules() << "\n\n"; #endif + // Write rules for languages compiled in this target. std::set<std::string> languages; - this->GetTarget()->GetLanguages(languages, - this->GetMakefile()->GetSafeDefinition("CMAKE_BUILD_TYPE")); + std::vector<cmSourceFile*> sourceFiles; + this->GetTarget()->GetSourceFiles(sourceFiles, + this->GetMakefile()->GetSafeDefinition("CMAKE_BUILD_TYPE")); + for(std::vector<cmSourceFile*>::const_iterator + i = sourceFiles.begin(); i != sourceFiles.end(); ++i) + { + const std::string& lang = (*i)->GetLanguage(); + if(!lang.empty()) + { + languages.insert(lang); + } + } for(std::set<std::string>::const_iterator l = languages.begin(); l != languages.end(); ++l) + { this->WriteLanguageRules(*l); + } } const char *cmNinjaNormalTargetGenerator::GetVisibleTypeName() const diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 816e6d8..b8cc5fb 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -454,7 +454,10 @@ cmNinjaTargetGenerator std::vector<std::string> compileCmds; cmSystemTools::ExpandListArgument(compileCmd, compileCmds); - compileCmds.front().insert(0, cldeps); + if (!compileCmds.empty()) + { + compileCmds.front().insert(0, cldeps); + } for (std::vector<std::string>::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) diff --git a/Source/kwsys/Terminal.c b/Source/kwsys/Terminal.c index e13003f..d13f79a 100644 --- a/Source/kwsys/Terminal.c +++ b/Source/kwsys/Terminal.c @@ -175,6 +175,7 @@ static const char* kwsysTerminalVT100Names[] = "xterm-88color", "xterm-color", "xterm-debian", + "xterm-termite", 0 }; diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index a9cad14..f654330 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -255,6 +255,7 @@ if(BUILD_TESTING) endif() ADD_TEST_MACRO(COnly COnly) ADD_TEST_MACRO(CxxOnly CxxOnly) + ADD_TEST_MACRO(CxxSubdirC CxxSubdirC) ADD_TEST_MACRO(IPO COnly/COnly) ADD_TEST_MACRO(OutDir runtime/OutDir) ADD_TEST_MACRO(ObjectLibrary UseCshared) diff --git a/Tests/CxxSubdirC/CMakeLists.txt b/Tests/CxxSubdirC/CMakeLists.txt new file mode 100644 index 0000000..52474f8 --- /dev/null +++ b/Tests/CxxSubdirC/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 3.0) +project(CxxSubdirC CXX) +add_subdirectory(Cdir) +add_executable(CxxSubdirC main.cxx $<TARGET_OBJECTS:Cobj>) diff --git a/Tests/CxxSubdirC/Cdir/CMakeLists.txt b/Tests/CxxSubdirC/Cdir/CMakeLists.txt new file mode 100644 index 0000000..08a8757 --- /dev/null +++ b/Tests/CxxSubdirC/Cdir/CMakeLists.txt @@ -0,0 +1,2 @@ +enable_language(C) +add_library(Cobj OBJECT Cobj.c) diff --git a/Tests/CxxSubdirC/Cdir/Cobj.c b/Tests/CxxSubdirC/Cdir/Cobj.c new file mode 100644 index 0000000..75a0045 --- /dev/null +++ b/Tests/CxxSubdirC/Cdir/Cobj.c @@ -0,0 +1 @@ +int Cobj(void) { return 0; } diff --git a/Tests/CxxSubdirC/main.cxx b/Tests/CxxSubdirC/main.cxx new file mode 100644 index 0000000..049220f --- /dev/null +++ b/Tests/CxxSubdirC/main.cxx @@ -0,0 +1,2 @@ +extern "C" int Cobj(void); +int main() { return Cobj(); } @@ -145,7 +145,7 @@ if ${cmake_system_linux}; then cmake_machine_parisc=true fi elif ${cmake_system_hpux}; then - if !(uname -m | grep ia64 >/dev/null 2>&1); then + if uname -m | grep ia64 >/dev/null 2>&1; then : ; else cmake_machine_parisc=true fi fi |