summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/command/get_filename_component.rst2
-rw-r--r--Help/release/dev/mingw-compile-features-C.rst5
-rw-r--r--Modules/BasicConfigVersion-AnyNewerVersion.cmake.in8
-rw-r--r--Modules/BasicConfigVersion-ExactVersion.cmake.in10
-rw-r--r--Modules/BasicConfigVersion-SameMajorVersion.cmake.in10
-rw-r--r--Modules/CMakeCInformation.cmake2
-rw-r--r--Modules/CMakeCXXInformation.cmake2
-rw-r--r--Modules/CMakeFortranInformation.cmake2
-rw-r--r--Modules/CMakeTestSwiftCompiler.cmake52
-rw-r--r--Modules/Compiler/GNU-C.cmake4
-rw-r--r--Modules/CompilerId/main.swift.in2
-rw-r--r--Modules/Platform/GHS-MULTI-Initialize.cmake36
-rw-r--r--Modules/Platform/Windows-GNU.cmake2
-rw-r--r--Modules/UseSWIG.cmake10
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmGhsMultiTargetGenerator.cxx23
-rw-r--r--Source/cmGlobalVisualStudio11Generator.h5
-rw-r--r--Source/cmGlobalVisualStudio12Generator.h5
-rw-r--r--Source/cmGlobalVisualStudio14Generator.cxx13
-rw-r--r--Source/cmGlobalVisualStudio14Generator.h5
-rw-r--r--Tests/CMakeLists.txt35
-rw-r--r--Tests/FindGTK2/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/Swift/Enable-stdout.txt1
-rw-r--r--Tests/RunCMake/Swift/Enable.cmake1
-rw-r--r--Tests/RunCMake/Swift/RunCMakeTest.cmake2
-rw-r--r--Tests/SwiftMix/SwiftMain.swift6
-rw-r--r--Utilities/cmcurl/CMakeLists.txt8
27 files changed, 198 insertions, 58 deletions
diff --git a/Help/command/get_filename_component.rst b/Help/command/get_filename_component.rst
index 82f9120..14c8cf2 100644
--- a/Help/command/get_filename_component.rst
+++ b/Help/command/get_filename_component.rst
@@ -19,7 +19,7 @@ Set ``<VAR>`` to a component of ``<FileName>``, where ``<COMP>`` is one of:
NAME_WE = File name without directory or longest extension
PATH = Legacy alias for DIRECTORY (use for CMake <= 2.8.11)
-Paths are returned with forward slashes and have no trailing slahes.
+Paths are returned with forward slashes and have no trailing slashes.
The longest file extension is always considered. If the optional
``CACHE`` argument is specified, the result variable is added to the
cache.
diff --git a/Help/release/dev/mingw-compile-features-C.rst b/Help/release/dev/mingw-compile-features-C.rst
new file mode 100644
index 0000000..b3f99f1
--- /dev/null
+++ b/Help/release/dev/mingw-compile-features-C.rst
@@ -0,0 +1,5 @@
+mingw-compile-features-C
+------------------------
+
+* The :manual:`Compile Features <cmake-compile-features(7)>` functionality
+ is now aware of features supported by GNU C compilers on Windows.
diff --git a/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in b/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in
index b1c4fdf..bc78016 100644
--- a/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in
+++ b/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in
@@ -9,22 +9,22 @@
set(PACKAGE_VERSION "@CVF_VERSION@")
-if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
+if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
- if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
+ if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
-if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
+if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
return()
endif()
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
-if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
+if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "@CMAKE_SIZEOF_VOID_P@")
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
diff --git a/Modules/BasicConfigVersion-ExactVersion.cmake.in b/Modules/BasicConfigVersion-ExactVersion.cmake.in
index 9fd0136..de4a23a 100644
--- a/Modules/BasicConfigVersion-ExactVersion.cmake.in
+++ b/Modules/BasicConfigVersion-ExactVersion.cmake.in
@@ -17,30 +17,30 @@ else()
set(CVF_VERSION_NO_TWEAK "@CVF_VERSION@")
endif()
-if("${PACKAGE_FIND_VERSION}" MATCHES "^([0-9]+\\.[0-9]+\\.[0-9]+)\\.") # strip the tweak version
+if(PACKAGE_FIND_VERSION MATCHES "^([0-9]+\\.[0-9]+\\.[0-9]+)\\.") # strip the tweak version
set(REQUESTED_VERSION_NO_TWEAK "${CMAKE_MATCH_1}")
else()
set(REQUESTED_VERSION_NO_TWEAK "${PACKAGE_FIND_VERSION}")
endif()
-if("${REQUESTED_VERSION_NO_TWEAK}" STREQUAL "${CVF_VERSION_NO_TWEAK}")
+if(REQUESTED_VERSION_NO_TWEAK STREQUAL CVF_VERSION_NO_TWEAK)
set(PACKAGE_VERSION_COMPATIBLE TRUE)
else()
set(PACKAGE_VERSION_COMPATIBLE FALSE)
endif()
-if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
+if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
-if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
+if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
return()
endif()
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
-if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
+if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "@CMAKE_SIZEOF_VOID_P@")
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
diff --git a/Modules/BasicConfigVersion-SameMajorVersion.cmake.in b/Modules/BasicConfigVersion-SameMajorVersion.cmake.in
index 4acd9bb..a32245d 100644
--- a/Modules/BasicConfigVersion-SameMajorVersion.cmake.in
+++ b/Modules/BasicConfigVersion-SameMajorVersion.cmake.in
@@ -11,7 +11,7 @@
set(PACKAGE_VERSION "@CVF_VERSION@")
-if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
+if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
@@ -21,25 +21,25 @@ else()
set(CVF_VERSION_MAJOR "@CVF_VERSION@")
endif()
- if("${PACKAGE_FIND_VERSION_MAJOR}" STREQUAL "${CVF_VERSION_MAJOR}")
+ if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR)
set(PACKAGE_VERSION_COMPATIBLE TRUE)
else()
set(PACKAGE_VERSION_COMPATIBLE FALSE)
endif()
- if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
+ if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
-if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
+if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
return()
endif()
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
-if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
+if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "@CMAKE_SIZEOF_VOID_P@")
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake
index 7bcbb19..d2417aa 100644
--- a/Modules/CMakeCInformation.cmake
+++ b/Modules/CMakeCInformation.cmake
@@ -175,7 +175,7 @@ endif()
# Create a static archive incrementally for large object file counts.
# If CMAKE_C_CREATE_STATIC_LIBRARY is set it will override these.
if(NOT DEFINED CMAKE_C_ARCHIVE_CREATE)
- set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cq <TARGET> <LINK_FLAGS> <OBJECTS>")
+ set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> qc <TARGET> <LINK_FLAGS> <OBJECTS>")
endif()
if(NOT DEFINED CMAKE_C_ARCHIVE_APPEND)
set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> q <TARGET> <LINK_FLAGS> <OBJECTS>")
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake
index 1aac9d3..091627b 100644
--- a/Modules/CMakeCXXInformation.cmake
+++ b/Modules/CMakeCXXInformation.cmake
@@ -266,7 +266,7 @@ endif()
# Create a static archive incrementally for large object file counts.
# If CMAKE_CXX_CREATE_STATIC_LIBRARY is set it will override these.
if(NOT DEFINED CMAKE_CXX_ARCHIVE_CREATE)
- set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cq <TARGET> <LINK_FLAGS> <OBJECTS>")
+ set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> qc <TARGET> <LINK_FLAGS> <OBJECTS>")
endif()
if(NOT DEFINED CMAKE_CXX_ARCHIVE_APPEND)
set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> q <TARGET> <LINK_FLAGS> <OBJECTS>")
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
index 835ffcf..79393d3 100644
--- a/Modules/CMakeFortranInformation.cmake
+++ b/Modules/CMakeFortranInformation.cmake
@@ -194,7 +194,7 @@ endif()
# Create a static archive incrementally for large object file counts.
# If CMAKE_Fortran_CREATE_STATIC_LIBRARY is set it will override these.
if(NOT DEFINED CMAKE_Fortran_ARCHIVE_CREATE)
- set(CMAKE_Fortran_ARCHIVE_CREATE "<CMAKE_AR> cq <TARGET> <LINK_FLAGS> <OBJECTS>")
+ set(CMAKE_Fortran_ARCHIVE_CREATE "<CMAKE_AR> qc <TARGET> <LINK_FLAGS> <OBJECTS>")
endif()
if(NOT DEFINED CMAKE_Fortran_ARCHIVE_APPEND)
set(CMAKE_Fortran_ARCHIVE_APPEND "<CMAKE_AR> q <TARGET> <LINK_FLAGS> <OBJECTS>")
diff --git a/Modules/CMakeTestSwiftCompiler.cmake b/Modules/CMakeTestSwiftCompiler.cmake
index 9186426..89849fb 100644
--- a/Modules/CMakeTestSwiftCompiler.cmake
+++ b/Modules/CMakeTestSwiftCompiler.cmake
@@ -12,4 +12,54 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-set(CMAKE_Swift_COMPILER_WORKS 1)
+if(CMAKE_Swift_COMPILER_FORCED)
+ # The compiler configuration was forced by the user.
+ # Assume the user has configured all compiler information.
+ set(CMAKE_Swift_COMPILER_WORKS TRUE)
+ return()
+endif()
+
+include(CMakeTestCompilerCommon)
+
+# Remove any cached result from an older CMake version.
+# We now store this in CMakeSwiftCompiler.cmake.
+unset(CMAKE_Swift_COMPILER_WORKS CACHE)
+
+# This file is used by EnableLanguage in cmGlobalGenerator to
+# determine that that selected C++ compiler can actually compile
+# and link the most basic of programs. If not, a fatal error
+# is set and cmake stops processing commands and will not generate
+# any makefiles or projects.
+if(NOT CMAKE_Swift_COMPILER_WORKS)
+ PrintTestCompilerStatus("Swift" "")
+ file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/main.swift
+ "import Foundation\n"
+ "print(\"CMake\")\n")
+ try_compile(CMAKE_Swift_COMPILER_WORKS ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/main.swift
+ OUTPUT_VARIABLE __CMAKE_Swift_COMPILER_OUTPUT)
+ # Move result from cache to normal variable.
+ set(CMAKE_Swift_COMPILER_WORKS ${CMAKE_Swift_COMPILER_WORKS})
+ unset(CMAKE_Swift_COMPILER_WORKS CACHE)
+ set(Swift_TEST_WAS_RUN 1)
+endif()
+
+if(NOT CMAKE_Swift_COMPILER_WORKS)
+ PrintTestCompilerStatus("Swift" " -- broken")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Determining if the Swift compiler works failed with "
+ "the following output:\n${__CMAKE_Swift_COMPILER_OUTPUT}\n\n")
+ message(FATAL_ERROR "The Swift compiler \"${CMAKE_Swift_COMPILER}\" "
+ "is not able to compile a simple test program.\nIt fails "
+ "with the following output:\n ${__CMAKE_Swift_COMPILER_OUTPUT}\n\n"
+ "CMake will not be able to correctly generate this project.")
+else()
+ if(Swift_TEST_WAS_RUN)
+ PrintTestCompilerStatus("Swift" " -- works")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Determining if the Swift compiler works passed with "
+ "the following output:\n${__CMAKE_Swift_COMPILER_OUTPUT}\n\n")
+ endif()
+endif()
+
+unset(__CMAKE_Swift_COMPILER_OUTPUT)
diff --git a/Modules/Compiler/GNU-C.cmake b/Modules/Compiler/GNU-C.cmake
index 89704e6..031ab73 100644
--- a/Modules/Compiler/GNU-C.cmake
+++ b/Modules/Compiler/GNU-C.cmake
@@ -34,10 +34,10 @@ macro(cmake_record_c_compile_features)
endmacro()
set(_result 0)
- if (UNIX AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6)
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6)
_get_gcc_features(${CMAKE_C11_STANDARD_COMPILE_OPTION} CMAKE_C11_COMPILE_FEATURES)
endif()
- if (UNIX AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
if (_result EQUAL 0)
_get_gcc_features(${CMAKE_C99_STANDARD_COMPILE_OPTION} CMAKE_C99_COMPILE_FEATURES)
endif()
diff --git a/Modules/CompilerId/main.swift.in b/Modules/CompilerId/main.swift.in
index 962e857..13f0ba0 100644
--- a/Modules/CompilerId/main.swift.in
+++ b/Modules/CompilerId/main.swift.in
@@ -1 +1 @@
-println("CMakeSwiftCompilerId")
+print("CMakeSwiftCompilerId")
diff --git a/Modules/Platform/GHS-MULTI-Initialize.cmake b/Modules/Platform/GHS-MULTI-Initialize.cmake
index 342ad21..9eb7a8a 100644
--- a/Modules/Platform/GHS-MULTI-Initialize.cmake
+++ b/Modules/Platform/GHS-MULTI-Initialize.cmake
@@ -13,13 +13,35 @@
# License text for the above reference.)
#Setup Greenhills MULTI specific compilation information
-find_path(GHS_INT_DIRECTORY INTEGRITY.ld PATHS
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GreenHillsSoftware6433c345;InstallLocation]" #int1122
- "C:/ghs/int1122"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GreenHillsSoftware289b6625;InstallLocation]" #int1104
- "C:/ghs/int1104"
- DOC "Path to integrity directory"
- )
+
+if (NOT GHS_INT_DIRECTORY)
+ #Assume the C:/ghs/int#### directory that is latest is prefered
+ set(GHS_EXPECTED_ROOT "C:/ghs")
+ if (EXISTS ${GHS_EXPECTED_ROOT})
+ FILE(GLOB GHS_CANDIDATE_INT_DIRS RELATIVE
+ ${GHS_EXPECTED_ROOT} ${GHS_EXPECTED_ROOT}/*)
+ string(REGEX MATCHALL "int[0-9][0-9][0-9][0-9]" GHS_CANDIDATE_INT_DIRS
+ ${GHS_CANDIDATE_INT_DIRS})
+ if (GHS_CANDIDATE_INT_DIRS)
+ list(SORT GHS_CANDIDATE_INT_DIRS)
+ list(GET GHS_CANDIDATE_INT_DIRS -1 GHS_INT_DIRECTORY)
+ string(CONCAT GHS_INT_DIRECTORY ${GHS_EXPECTED_ROOT} "/"
+ ${GHS_INT_DIRECTORY})
+ endif ()
+ endif ()
+
+ #Try to look for known registry values
+ if (NOT GHS_INT_DIRECTORY)
+ find_path(GHS_INT_DIRECTORY INTEGRITY.ld PATHS
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GreenHillsSoftware6433c345;InstallLocation]" #int1122
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GreenHillsSoftware289b6625;InstallLocation]" #int1104
+ )
+ endif ()
+
+ set(GHS_INT_DIRECTORY ${GHS_INT_DIRECTORY} CACHE PATH
+ "Path to integrity directory")
+endif ()
+
set(GHS_OS_DIR ${GHS_INT_DIRECTORY} CACHE PATH "OS directory")
set(GHS_PRIMARY_TARGET "arm_integrity.tgt" CACHE STRING "target for compilation")
set(GHS_BSP_NAME "simarm" CACHE STRING "BSP name")
diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake
index b97409c..d8a423e 100644
--- a/Modules/Platform/Windows-GNU.cmake
+++ b/Modules/Platform/Windows-GNU.cmake
@@ -65,7 +65,7 @@ macro(__windows_compiler_gnu lang)
if(MSYS OR MINGW)
# Create archiving rules to support large object file lists for static libraries.
- set(CMAKE_${lang}_ARCHIVE_CREATE "<CMAKE_AR> cq <TARGET> <LINK_FLAGS> <OBJECTS>")
+ set(CMAKE_${lang}_ARCHIVE_CREATE "<CMAKE_AR> qc <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_${lang}_ARCHIVE_APPEND "<CMAKE_AR> q <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_${lang}_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 96b0b35..d757f65 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -153,10 +153,12 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
else()
set(swig_outdir ${CMAKE_CURRENT_BINARY_DIR})
endif()
- SWIG_GET_EXTRA_OUTPUT_FILES(${SWIG_MODULE_${name}_LANGUAGE}
- swig_extra_generated_files
- "${swig_outdir}"
- "${swig_source_file_fullname}")
+ if (NOT SWIG_MODULE_${name}_NOPROXY)
+ SWIG_GET_EXTRA_OUTPUT_FILES(${SWIG_MODULE_${name}_LANGUAGE}
+ swig_extra_generated_files
+ "${swig_outdir}"
+ "${swig_source_file_fullname}")
+ endif()
set(swig_generated_file_fullname
"${swig_outdir}/${swig_source_file_name_we}")
# add the language into the name of the file (i.e. TCL_wrap)
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 5cf6ae9..42d6955 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 3)
-set(CMake_VERSION_PATCH 20150909)
+set(CMake_VERSION_PATCH 20150910)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx
index 846b6e2..cae5c2f 100644
--- a/Source/cmGhsMultiTargetGenerator.cxx
+++ b/Source/cmGhsMultiTargetGenerator.cxx
@@ -151,10 +151,6 @@ void cmGhsMultiTargetGenerator::Generate()
this->WriteTargetLinkLibraries();
}
this->WriteCustomCommands();
- if (this->DynamicDownload)
- {
- *this->GetFolderBuildStreams() << " " << this->DDOption << std::endl;
- }
this->WriteSources(objectSources);
}
@@ -230,9 +226,11 @@ void cmGhsMultiTargetGenerator::WriteTypeSpecifics(const std::string &config,
}
if (this->IsTargetGroup())
{
- *this->GetFolderBuildStreams() << " -non_shared" << std::endl;
- *this->GetFolderBuildStreams() << " -o \"" << outputDir
- << outputFilename << ".elf\""
+ *this->GetFolderBuildStreams()
+ << " {optgroup=GhsCommonOptions} -o \"" << outputDir
+ << outputFilename << ".elf\"" << std::endl;
+ *this->GetFolderBuildStreams() << " :extraOutputFile=\"" << outputDir
+ << outputFilename << ".elf.ael\""
<< std::endl;
}
else
@@ -454,14 +452,17 @@ void cmGhsMultiTargetGenerator::WriteSources(
this->Makefile->GetHomeOutputDirectory(), sgPath,
GhsMultiGpj::SUBPROJECT, this->RelBuildFilePath);
- if ((*si)->GetExtension() == ".int")
+ std::string fullSourcePath((*si)->GetFullPath());
+ if ((*si)->GetExtension() == "int" || (*si)->GetExtension() == "bsp")
{
- *this->FolderBuildStreams[sgPath] << "\"" << (*si)->GetFullPath() << "\""
- << std::endl;
+ *this->FolderBuildStreams[sgPath] << fullSourcePath << std::endl;
}
else
{
- *this->FolderBuildStreams[sgPath] << (*si)->GetFullPath() << std::endl;
+ //WORKAROUND: GHS MULTI needs the path to use backslashes without quotes
+ // to open files in search as of version 6.1.6
+ cmsys::SystemTools::ReplaceString(fullSourcePath, "/", "\\");
+ *this->FolderBuildStreams[sgPath] << fullSourcePath << std::endl;
}
if ("ld" != (*si)->GetExtension() && "int" != (*si)->GetExtension() &&
diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h
index b50f4c9..9499d80 100644
--- a/Source/cmGlobalVisualStudio11Generator.h
+++ b/Source/cmGlobalVisualStudio11Generator.h
@@ -34,9 +34,12 @@ protected:
virtual bool SelectWindowsPhoneToolset(std::string& toolset) const;
virtual bool SelectWindowsStoreToolset(std::string& toolset) const;
+ // Used to verify that the Desktop toolset for the current generator is
+ // installed on the machine.
+ virtual bool IsWindowsDesktopToolsetInstalled() const;
+
// These aren't virtual because we need to check if the selected version
// of the toolset is installed
- bool IsWindowsDesktopToolsetInstalled() const;
bool IsWindowsPhoneToolsetInstalled() const;
bool IsWindowsStoreToolsetInstalled() const;
diff --git a/Source/cmGlobalVisualStudio12Generator.h b/Source/cmGlobalVisualStudio12Generator.h
index bce9e0c..a7939aa 100644
--- a/Source/cmGlobalVisualStudio12Generator.h
+++ b/Source/cmGlobalVisualStudio12Generator.h
@@ -38,9 +38,12 @@ protected:
virtual bool SelectWindowsPhoneToolset(std::string& toolset) const;
virtual bool SelectWindowsStoreToolset(std::string& toolset) const;
+ // Used to verify that the Desktop toolset for the current generator is
+ // installed on the machine.
+ virtual bool IsWindowsDesktopToolsetInstalled() const;
+
// These aren't virtual because we need to check if the selected version
// of the toolset is installed
- bool IsWindowsDesktopToolsetInstalled() const;
bool IsWindowsPhoneToolsetInstalled() const;
bool IsWindowsStoreToolsetInstalled() const;
virtual const char* GetIDEVersion() { return "12.0"; }
diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx
index 2cf55d4..d73eedf 100644
--- a/Source/cmGlobalVisualStudio14Generator.cxx
+++ b/Source/cmGlobalVisualStudio14Generator.cxx
@@ -124,3 +124,16 @@ void cmGlobalVisualStudio14Generator::WriteSLNHeader(std::ostream& fout)
fout << "# Visual Studio 14\n";
}
}
+
+//----------------------------------------------------------------------------
+bool
+cmGlobalVisualStudio14Generator::IsWindowsDesktopToolsetInstalled() const
+{
+ const char desktop10Key[] =
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\"
+ "VisualStudio\\14.0\\VC\\Runtimes";
+
+ std::vector<std::string> vc14;
+ return cmSystemTools::GetRegistrySubKeys(desktop10Key,
+ vc14, cmSystemTools::KeyWOW64_32);
+}
diff --git a/Source/cmGlobalVisualStudio14Generator.h b/Source/cmGlobalVisualStudio14Generator.h
index aa817be..02c6274 100644
--- a/Source/cmGlobalVisualStudio14Generator.h
+++ b/Source/cmGlobalVisualStudio14Generator.h
@@ -31,6 +31,11 @@ public:
virtual const char* GetToolsVersion() { return "14.0"; }
protected:
virtual const char* GetIDEVersion() { return "14.0"; }
+
+ // Used to verify that the Desktop toolset for the current generator is
+ // installed on the machine.
+ virtual bool IsWindowsDesktopToolsetInstalled() const;
+
private:
class Factory;
};
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 801d7e8..2c6a42c 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -213,6 +213,29 @@ if(BUILD_TESTING)
set(CMake_TEST_XCODE_VERSION "${CMAKE_MATCH_1}")
endif()
endif()
+ if(CMAKE_OSX_SYSROOT)
+ execute_process(
+ COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version ProductName
+ OUTPUT_VARIABLE _stdout
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ ERROR_VARIABLE _stderr
+ RESULT_VARIABLE _failed
+ )
+ if(NOT _failed)
+ set(CMAKE_OSX_SDKPRODUCT "${_stdout}")
+ endif()
+
+ execute_process(
+ COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version SDKVersion
+ OUTPUT_VARIABLE _stdout
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ ERROR_VARIABLE _stderr
+ RESULT_VARIABLE _failed
+ )
+ if(NOT _failed)
+ set(CMAKE_OSX_SDKVERSION "${_stdout}")
+ endif()
+ endif()
endif()
# Use 1500 or CTEST_TEST_TIMEOUT for long test timeout value,
@@ -258,10 +281,14 @@ if(BUILD_TESTING)
ADD_TEST_MACRO(MissingSourceFile MissingSourceFile)
set_tests_properties(MissingSourceFile PROPERTIES
PASS_REGULAR_EXPRESSION "CMake Error at CMakeLists.txt:3 \\(add_executable\\):[ \r\n]*Cannot find source file:[ \r\n]*DoesNotExist/MissingSourceFile.c")
- if(CMake_TEST_XCODE_VERSION AND NOT CMake_TEST_XCODE_VERSION VERSION_LESS 6.1)
- if(CMAKE_GENERATOR STREQUAL "Xcode")
- ADD_TEST_MACRO(SwiftMix SwiftMix)
- ADD_TEST_MACRO(SwiftOnly SwiftOnly)
+ if(CMake_TEST_XCODE_VERSION AND CMAKE_OSX_SDKVERSION AND CMAKE_OSX_SDKPRODUCT)
+ if((NOT CMake_TEST_XCODE_VERSION VERSION_LESS 6.1) AND
+ ((NOT CMAKE_OSX_SDKPRODUCT STREQUAL "Mac OS X") OR
+ (NOT CMAKE_OSX_SDKVERSION VERSION_LESS 10.10)))
+ if(CMAKE_GENERATOR STREQUAL "Xcode")
+ ADD_TEST_MACRO(SwiftMix SwiftMix)
+ ADD_TEST_MACRO(SwiftOnly SwiftOnly)
+ endif()
endif()
endif()
if(CMAKE_Fortran_COMPILER)
diff --git a/Tests/FindGTK2/CMakeLists.txt b/Tests/FindGTK2/CMakeLists.txt
index 1c5987c..0105fae 100644
--- a/Tests/FindGTK2/CMakeLists.txt
+++ b/Tests/FindGTK2/CMakeLists.txt
@@ -9,6 +9,7 @@ if(GTK2_GTK_FOUND)
"${CMake_BINARY_DIR}/Tests/FindGTK2/GTK2Components/gtk"
${build_generator_args}
--build-target gtk-all-libs
+ --build-project gtk
--build-exe-dir "${CMake_BINARY_DIR}/Tests/FindGTK2/GTK2Components/gtk"
--force-new-ctest-process
--test-command ${CMAKE_CTEST_COMMAND} -V
@@ -22,6 +23,7 @@ if(GTK2_GTKMM_FOUND)
"${CMake_BINARY_DIR}/Tests/FindGTK2/GTK2Components/gtkmm"
${build_generator_args}
--build-target gtkmm-all-libs
+ --build-project gtkmm
--build-exe-dir "${CMake_BINARY_DIR}/Tests/FindGTK2/GTK2Components/gtkmm"
--force-new-ctest-process
--test-command ${CMAKE_CTEST_COMMAND} -V
@@ -310,6 +312,7 @@ if(TARGET GTK2::gtkmm)
"${CMake_BINARY_DIR}/Tests/FindGTK2/GTK2Targets/gtkmm"
${build_generator_args}
--build-target gtkmm-target
+ --build-project gtkmm
--build-exe-dir "${CMake_BINARY_DIR}/Tests/FindGTK2/GTK2Targets/gtkmm"
--force-new-ctest-process
--test-command ${CMAKE_CTEST_COMMAND} -V
diff --git a/Tests/RunCMake/Swift/Enable-stdout.txt b/Tests/RunCMake/Swift/Enable-stdout.txt
deleted file mode 100644
index 39e133f..0000000
--- a/Tests/RunCMake/Swift/Enable-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
--- The Swift compiler identification is Apple
diff --git a/Tests/RunCMake/Swift/Enable.cmake b/Tests/RunCMake/Swift/Enable.cmake
deleted file mode 100644
index 19f297a..0000000
--- a/Tests/RunCMake/Swift/Enable.cmake
+++ /dev/null
@@ -1 +0,0 @@
-enable_language(Swift)
diff --git a/Tests/RunCMake/Swift/RunCMakeTest.cmake b/Tests/RunCMake/Swift/RunCMakeTest.cmake
index 0a57121..4864295 100644
--- a/Tests/RunCMake/Swift/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Swift/RunCMakeTest.cmake
@@ -3,8 +3,6 @@ include(RunCMake)
if(RunCMake_GENERATOR STREQUAL Xcode)
if(XCODE_BELOW_6_1)
run_cmake(XcodeTooOld)
- else()
- run_cmake(Enable)
endif()
else()
run_cmake(NotSupported)
diff --git a/Tests/SwiftMix/SwiftMain.swift b/Tests/SwiftMix/SwiftMain.swift
index 7e7c4ab..3629ac8 100644
--- a/Tests/SwiftMix/SwiftMain.swift
+++ b/Tests/SwiftMix/SwiftMain.swift
@@ -1,8 +1,10 @@
-@objc class SwiftMainClass {
+import Foundation
+
+@objc class SwiftMainClass : NSObject {
class func SwiftMain(argc:Int, argv:UnsafePointer<UnsafePointer<CChar>>) -> Int32 {
dump("argc: \(argc)")
for (var i = 0; i < argc; ++i) {
- var argi = String.fromCString(argv[i])
+ let argi = String.fromCString(argv[i])
dump("arg[\(i)]: \(argi)");
}
return 0;
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
index d12c73f..39b70c0 100644
--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -43,6 +43,14 @@ if(WIN32)
set(HAVE_INET_PTON 0 CACHE INTERNAL "Do not use inet_pton")
endif()
+# Starting with OSX 10.11 there is an unrelated libnetwork library which will
+# be picked up during curl configuration. Linking against this library is
+# unnecessary and breaks backward compatibility of the resulting binaries
+# because libnetwork is unavailable on older OSX versions.
+if(APPLE)
+ set(HAVE_LIBNETWORK 0 CACHE INTERNAL "Do not use libnetwork")
+endif(APPLE)
+
# Disable warnings to avoid changing 3rd party code.
if(CMAKE_C_COMPILER_ID MATCHES
"^(GNU|Clang|AppleClang|XL|VisualAge|SunPro|MIPSpro|HP|Intel)$")