summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/prop_tgt/LANG_COMPILER_LAUNCHER.rst2
-rw-r--r--Help/variable/CMAKE_LANG_COMPILER_LAUNCHER.rst2
-rw-r--r--Modules/CPack.cmake4
-rw-r--r--Modules/Compiler/AppleClang-OBJCXX.cmake2
-rw-r--r--Modules/Compiler/GNU-OBJC.cmake4
-rw-r--r--Modules/Compiler/GNU-OBJCXX.cmake6
-rw-r--r--Modules/FindPython/Support.cmake5
-rw-r--r--Modules/Internal/CPack/CPackDeb.cmake11
-rw-r--r--Modules/Platform/Darwin.cmake4
-rw-r--r--Modules/Platform/Windows-GNU.cmake2
-rw-r--r--Source/CPack/cmCPackGenerator.cxx9
-rw-r--r--Source/CTest/cmCTestResourceSpec.cxx79
-rw-r--r--Source/CTest/cmCTestResourceSpec.h17
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx8
-rw-r--r--Source/cmLinkLineDeviceComputer.cxx34
-rw-r--r--Source/cmLocalGenerator.cxx9
-rw-r--r--Source/cmMakefileTargetGenerator.cxx4
-rw-r--r--Source/cmNinjaTargetGenerator.cxx3
-rw-r--r--Source/cmTarget.cxx2
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec.cxx122
-rw-r--r--Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description1.cmake5
-rw-r--r--Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake5
-rw-r--r--Tests/Cuda/CMakeLists.txt1
-rw-r--r--Tests/Cuda/SeparableCompCXXOnly/CMakeLists.txt3
-rw-r--r--Tests/Cuda/SeparableCompCXXOnly/main.cpp5
-rw-r--r--Tests/RunCMake/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CPack/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/VerifyResult.cmake2
-rw-r--r--Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx3
-rw-r--r--Tests/RunCMake/CompilerLauncher/OBJC-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/CompilerLauncher/OBJC-launch-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/CompilerLauncher/OBJC-launch.cmake3
-rw-r--r--Tests/RunCMake/CompilerLauncher/OBJC.cmake4
-rw-r--r--Tests/RunCMake/CompilerLauncher/OBJCXX-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/CompilerLauncher/OBJCXX-launch-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/CompilerLauncher/OBJCXX-launch.cmake3
-rw-r--r--Tests/RunCMake/CompilerLauncher/OBJCXX.cmake4
-rw-r--r--Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/CompilerLauncher/main.m4
-rw-r--r--Tests/RunCMake/CompilerLauncher/main.mm4
40 files changed, 266 insertions, 121 deletions
diff --git a/Help/prop_tgt/LANG_COMPILER_LAUNCHER.rst b/Help/prop_tgt/LANG_COMPILER_LAUNCHER.rst
index 23af503..a6f2b24 100644
--- a/Help/prop_tgt/LANG_COMPILER_LAUNCHER.rst
+++ b/Help/prop_tgt/LANG_COMPILER_LAUNCHER.rst
@@ -2,7 +2,7 @@
------------------------
This property is implemented only when ``<LANG>`` is ``C``, ``CXX``,
-``Fortran``, or ``CUDA``.
+``Fortran``, ``OBJC``, ``OBJCXX``, or ``CUDA``.
Specify a :ref:`semicolon-separated list <CMake Language Lists>` containing a command line
for a compiler launching tool. The :ref:`Makefile Generators` and the
diff --git a/Help/variable/CMAKE_LANG_COMPILER_LAUNCHER.rst b/Help/variable/CMAKE_LANG_COMPILER_LAUNCHER.rst
index e6c8bb5..6b7e35a 100644
--- a/Help/variable/CMAKE_LANG_COMPILER_LAUNCHER.rst
+++ b/Help/variable/CMAKE_LANG_COMPILER_LAUNCHER.rst
@@ -4,4 +4,4 @@ CMAKE_<LANG>_COMPILER_LAUNCHER
Default value for :prop_tgt:`<LANG>_COMPILER_LAUNCHER` target property.
This variable is used to initialize the property on each target as it is
created. This is done only when ``<LANG>`` is ``C``, ``CXX``, ``Fortran``,
-or ``CUDA``.
+``OBJC``, ``OBJCXX``, or ``CUDA``.
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 8a6a712..a1cc71d 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -470,8 +470,10 @@ if(CMAKE_PROJECT_HOMEPAGE_URL)
"${CMAKE_PROJECT_HOMEPAGE_URL}")
endif()
-_cpack_set_default(CPACK_PACKAGE_DESCRIPTION_FILE
+set(CPACK_DEFAULT_PACKAGE_DESCRIPTION_FILE
"${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt")
+_cpack_set_default(CPACK_PACKAGE_DESCRIPTION_FILE
+ "${CPACK_DEFAULT_PACKAGE_DESCRIPTION_FILE}")
_cpack_set_default(CPACK_RESOURCE_FILE_LICENSE
"${CMAKE_ROOT}/Templates/CPack.GenericLicense.txt")
_cpack_set_default(CPACK_RESOURCE_FILE_README
diff --git a/Modules/Compiler/AppleClang-OBJCXX.cmake b/Modules/Compiler/AppleClang-OBJCXX.cmake
index 7c6f763..2c084af 100644
--- a/Modules/Compiler/AppleClang-OBJCXX.cmake
+++ b/Modules/Compiler/AppleClang-OBJCXX.cmake
@@ -1,5 +1,7 @@
include(Compiler/Clang-OBJCXX)
+set(CMAKE_OBJCXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
+
if(NOT CMAKE_OBJCXX_COMPILER_VERSION VERSION_LESS 4.0)
set(CMAKE_OBJCXX98_STANDARD_COMPILE_OPTION "-std=c++98")
set(CMAKE_OBJCXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98")
diff --git a/Modules/Compiler/GNU-OBJC.cmake b/Modules/Compiler/GNU-OBJC.cmake
index 5fba801..fb9b0b2 100644
--- a/Modules/Compiler/GNU-OBJC.cmake
+++ b/Modules/Compiler/GNU-OBJC.cmake
@@ -1,6 +1,2 @@
include(Compiler/GNU)
__compiler_gnu(OBJC)
-
-if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.2)
- set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
-endif()
diff --git a/Modules/Compiler/GNU-OBJCXX.cmake b/Modules/Compiler/GNU-OBJCXX.cmake
index 66a547e..06f0244 100644
--- a/Modules/Compiler/GNU-OBJCXX.cmake
+++ b/Modules/Compiler/GNU-OBJCXX.cmake
@@ -1,8 +1,8 @@
include(Compiler/GNU)
-__compiler_gnu(OBJC)
+__compiler_gnu(OBJCXX)
-if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.2)
- set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
+if(NOT CMAKE_OBJCXX_COMPILER_VERSION VERSION_LESS 4.2)
+ set(CMAKE_OBJCXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
endif()
if(NOT CMAKE_OBJCXX_LINK_FLAGS)
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake
index b67d563..3b15354 100644
--- a/Modules/FindPython/Support.cmake
+++ b/Modules/FindPython/Support.cmake
@@ -62,6 +62,9 @@ macro (_PYTHON_FIND_FRAMEWORKS)
${CMAKE_SYSTEM_FRAMEWORK_PATH})
list (REMOVE_DUPLICATES _pff_frameworks)
foreach (_pff_framework IN LISTS _pff_frameworks)
+ if (EXISTS ${_pff_framework}/Python${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR}.framework)
+ list (APPEND ${_PYTHON_PREFIX}_FRAMEWORKS ${_pff_framework}/Python${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR}.framework)
+ endif()
if (EXISTS ${_pff_framework}/Python.framework)
list (APPEND ${_PYTHON_PREFIX}_FRAMEWORKS ${_pff_framework}/Python.framework)
endif()
@@ -2269,7 +2272,7 @@ if(_${_PYTHON_PREFIX}_CMAKE_ROLE STREQUAL "PROJECT")
endif()
else()
if (${_PYTHON_PREFIX}_LIBRARY_RELEASE AND ${_PYTHON_PREFIX}_LIBRARY_DEBUG)
- set_property (TARGET ${_PYTHON_PREFIX}::Python PROPERTY IMPORTED_CONFIGURATIONS RELEASE DEBUG)
+ set_property (TARGET ${__name} PROPERTY IMPORTED_CONFIGURATIONS RELEASE DEBUG)
set_target_properties (${__name}
PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
IMPORTED_LOCATION_RELEASE "${${_PYTHON_PREFIX}_LIBRARY_RELEASE}")
diff --git a/Modules/Internal/CPack/CPackDeb.cmake b/Modules/Internal/CPack/CPackDeb.cmake
index ad8e078..3927b1a 100644
--- a/Modules/Internal/CPack/CPackDeb.cmake
+++ b/Modules/Internal/CPack/CPackDeb.cmake
@@ -498,6 +498,11 @@ function(cpack_deb_prepare_package_vars)
# Description: (mandatory)
# Try package description first
+ if(CPACK_USED_DEFAULT_PACKAGE_DESCRIPTION_FILE)
+ set(_desc_fallback)
+ else()
+ set(_desc_fallback "CPACK_PACKAGE_DESCRIPTION")
+ endif()
if(CPACK_DEB_PACKAGE_COMPONENT)
cpack_deb_variable_fallback("CPACK_DEBIAN_PACKAGE_DESCRIPTION"
"CPACK_DEBIAN_${_local_component_name}_DESCRIPTION"
@@ -505,11 +510,13 @@ function(cpack_deb_prepare_package_vars)
else()
cpack_deb_variable_fallback("CPACK_DEBIAN_PACKAGE_DESCRIPTION"
"CPACK_DEBIAN_PACKAGE_DESCRIPTION"
- "CPACK_PACKAGE_DESCRIPTION")
+ ${_desc_fallback})
endif()
# Still no description? ... and description file has set ...
- if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION AND CPACK_PACKAGE_DESCRIPTION_FILE)
+ if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION
+ AND CPACK_PACKAGE_DESCRIPTION_FILE
+ AND NOT CPACK_PACKAGE_DESCRIPTION_FILE STREQUAL CPACK_DEFAULT_PACKAGE_DESCRIPTION_FILE)
# Read `CPACK_PACKAGE_DESCRIPTION_FILE` then...
file(READ ${CPACK_PACKAGE_DESCRIPTION_FILE} CPACK_DEBIAN_PACKAGE_DESCRIPTION)
endif()
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index 1482d76..e5a57b5 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -157,6 +157,10 @@ if(_CMAKE_OSX_SYSROOT_PATH)
endif()
endforeach()
endif()
+if (OSX_DEVELOPER_ROOT AND EXISTS "${OSX_DEVELOPER_ROOT}/Library/Frameworks")
+ list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH
+ ${OSX_DEVELOPER_ROOT}/Library/Frameworks)
+endif()
list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH
/Library/Frameworks
/Network/Library/Frameworks
diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake
index 71189b1..6bf245c 100644
--- a/Modules/Platform/Windows-GNU.cmake
+++ b/Modules/Platform/Windows-GNU.cmake
@@ -152,7 +152,7 @@ macro(__windows_compiler_gnu_abi lang)
# Query the VS Installer tool for locations of VS 2017 and above.
set(_vs_installer_paths "")
- foreach(vs RANGE 15 15 -1) # change the first number to the largest supported version
+ foreach(vs RANGE 16 15 -1) # change the first number to the largest supported version
cmake_host_system_information(RESULT _vs_dir QUERY VS_${vs}_DIR)
if(_vs_dir)
list(APPEND _vs_installer_paths "${_vs_dir}/VC/Auxiliary/Build")
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 9530227..6698f3c 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -125,7 +125,7 @@ int cmCPackGenerator::PrepareNames()
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"Look for: CPACK_PACKAGE_DESCRIPTION_FILE" << std::endl);
const char* descFileName = this->GetOption("CPACK_PACKAGE_DESCRIPTION_FILE");
- if (descFileName) {
+ if (descFileName && !this->GetOption("CPACK_PACKAGE_DESCRIPTION")) {
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"Look for: " << descFileName << std::endl);
if (!cmSystemTools::FileExists(descFileName)) {
@@ -149,7 +149,12 @@ int cmCPackGenerator::PrepareNames()
while (ifs && cmSystemTools::GetLineFromStream(ifs, line)) {
ostr << cmXMLSafe(line) << std::endl;
}
- this->SetOptionIfNotSet("CPACK_PACKAGE_DESCRIPTION", ostr.str().c_str());
+ this->SetOption("CPACK_PACKAGE_DESCRIPTION", ostr.str().c_str());
+ const char* defFileName =
+ this->GetOption("CPACK_DEFAULT_PACKAGE_DESCRIPTION_FILE");
+ if (defFileName && !strcmp(defFileName, descFileName)) {
+ this->SetOption("CPACK_USED_DEFAULT_PACKAGE_DESCRIPTION_FILE", "ON");
+ }
}
if (!this->GetOption("CPACK_PACKAGE_DESCRIPTION")) {
cmCPackLogger(
diff --git a/Source/CTest/cmCTestResourceSpec.cxx b/Source/CTest/cmCTestResourceSpec.cxx
index 237a745..8f91efb 100644
--- a/Source/CTest/cmCTestResourceSpec.cxx
+++ b/Source/CTest/cmCTestResourceSpec.cxx
@@ -16,21 +16,22 @@
static const cmsys::RegularExpression IdentifierRegex{ "^[a-z_][a-z0-9_]*$" };
static const cmsys::RegularExpression IdRegex{ "^[a-z0-9_]+$" };
-bool cmCTestResourceSpec::ReadFromJSONFile(const std::string& filename)
+cmCTestResourceSpec::ReadFileResult cmCTestResourceSpec::ReadFromJSONFile(
+ const std::string& filename)
{
cmsys::ifstream fin(filename.c_str());
if (!fin) {
- return false;
+ return ReadFileResult::FILE_NOT_FOUND;
}
Json::Value root;
Json::CharReaderBuilder builder;
if (!Json::parseFromStream(builder, fin, &root, nullptr)) {
- return false;
+ return ReadFileResult::JSON_PARSE_ERROR;
}
if (!root.isObject()) {
- return false;
+ return ReadFileResult::INVALID_ROOT;
}
int majorVersion = 1;
@@ -39,42 +40,42 @@ bool cmCTestResourceSpec::ReadFromJSONFile(const std::string& filename)
auto const& version = root["version"];
if (version.isObject()) {
if (!version.isMember("major") || !version.isMember("minor")) {
- return false;
+ return ReadFileResult::INVALID_VERSION;
}
auto const& major = version["major"];
auto const& minor = version["minor"];
if (!major.isInt() || !minor.isInt()) {
- return false;
+ return ReadFileResult::INVALID_VERSION;
}
majorVersion = major.asInt();
minorVersion = minor.asInt();
} else {
- return false;
+ return ReadFileResult::INVALID_VERSION;
}
} else {
- return false;
+ return ReadFileResult::NO_VERSION;
}
if (majorVersion != 1 || minorVersion != 0) {
- return false;
+ return ReadFileResult::UNSUPPORTED_VERSION;
}
auto const& local = root["local"];
if (!local.isArray()) {
- return false;
+ return ReadFileResult::INVALID_SOCKET_SPEC;
}
if (local.size() > 1) {
- return false;
+ return ReadFileResult::INVALID_SOCKET_SPEC;
}
if (local.empty()) {
this->LocalSocket.Resources.clear();
- return true;
+ return ReadFileResult::READ_OK;
}
auto const& localSocket = local[0];
if (!localSocket.isObject()) {
- return false;
+ return ReadFileResult::INVALID_SOCKET_SPEC;
}
std::map<std::string, std::vector<cmCTestResourceSpec::Resource>> resources;
cmsys::RegularExpressionMatch match;
@@ -88,21 +89,21 @@ bool cmCTestResourceSpec::ReadFromJSONFile(const std::string& filename)
cmCTestResourceSpec::Resource resource;
if (!item.isMember("id")) {
- return false;
+ return ReadFileResult::INVALID_RESOURCE;
}
auto const& id = item["id"];
if (!id.isString()) {
- return false;
+ return ReadFileResult::INVALID_RESOURCE;
}
resource.Id = id.asString();
if (!IdRegex.find(resource.Id.c_str(), match)) {
- return false;
+ return ReadFileResult::INVALID_RESOURCE;
}
if (item.isMember("slots")) {
auto const& capacity = item["slots"];
if (!capacity.isConvertibleTo(Json::uintValue)) {
- return false;
+ return ReadFileResult::INVALID_RESOURCE;
}
resource.Capacity = capacity.asUInt();
} else {
@@ -111,17 +112,55 @@ bool cmCTestResourceSpec::ReadFromJSONFile(const std::string& filename)
r.push_back(resource);
} else {
- return false;
+ return ReadFileResult::INVALID_RESOURCE;
}
}
} else {
- return false;
+ return ReadFileResult::INVALID_RESOURCE_TYPE;
}
}
}
this->LocalSocket.Resources = std::move(resources);
- return true;
+ return ReadFileResult::READ_OK;
+}
+
+const char* cmCTestResourceSpec::ResultToString(ReadFileResult result)
+{
+ switch (result) {
+ case ReadFileResult::READ_OK:
+ return "OK";
+
+ case ReadFileResult::FILE_NOT_FOUND:
+ return "File not found";
+
+ case ReadFileResult::JSON_PARSE_ERROR:
+ return "JSON parse error";
+
+ case ReadFileResult::INVALID_ROOT:
+ return "Invalid root object";
+
+ case ReadFileResult::NO_VERSION:
+ return "No version specified";
+
+ case ReadFileResult::INVALID_VERSION:
+ return "Invalid version object";
+
+ case ReadFileResult::UNSUPPORTED_VERSION:
+ return "Unsupported version";
+
+ case ReadFileResult::INVALID_SOCKET_SPEC:
+ return "Invalid socket object";
+
+ case ReadFileResult::INVALID_RESOURCE_TYPE:
+ return "Invalid resource type object";
+
+ case ReadFileResult::INVALID_RESOURCE:
+ return "Invalid resource object";
+
+ default:
+ return "Unknown";
+ }
}
bool cmCTestResourceSpec::operator==(const cmCTestResourceSpec& other) const
diff --git a/Source/CTest/cmCTestResourceSpec.h b/Source/CTest/cmCTestResourceSpec.h
index 4646db8..cb242c0 100644
--- a/Source/CTest/cmCTestResourceSpec.h
+++ b/Source/CTest/cmCTestResourceSpec.h
@@ -31,7 +31,22 @@ public:
Socket LocalSocket;
- bool ReadFromJSONFile(const std::string& filename);
+ enum class ReadFileResult
+ {
+ READ_OK,
+ FILE_NOT_FOUND,
+ JSON_PARSE_ERROR,
+ INVALID_ROOT,
+ NO_VERSION,
+ INVALID_VERSION,
+ UNSUPPORTED_VERSION,
+ INVALID_SOCKET_SPEC, // Can't be INVALID_SOCKET due to a Windows macro
+ INVALID_RESOURCE_TYPE,
+ INVALID_RESOURCE,
+ };
+
+ ReadFileResult ReadFromJSONFile(const std::string& filename);
+ static const char* ResultToString(ReadFileResult result);
bool operator==(const cmCTestResourceSpec& other) const;
bool operator!=(const cmCTestResourceSpec& other) const;
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 8e3ac22..c8bbb0b 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -513,9 +513,13 @@ bool cmCTestTestHandler::ProcessOptions()
val = this->GetOption("ResourceSpecFile");
if (val) {
this->UseResourceSpec = true;
- if (!this->ResourceSpec.ReadFromJSONFile(val)) {
+ auto result = this->ResourceSpec.ReadFromJSONFile(val);
+ if (result != cmCTestResourceSpec::ReadFileResult::READ_OK) {
cmCTestLog(this->CTest, ERROR_MESSAGE,
- "Could not read resource spec file: " << val << std::endl);
+ "Could not read/parse resource spec file "
+ << val << ": "
+ << cmCTestResourceSpec::ResultToString(result)
+ << std::endl);
return false;
}
}
diff --git a/Source/cmLinkLineDeviceComputer.cxx b/Source/cmLinkLineDeviceComputer.cxx
index d845652..847334b 100644
--- a/Source/cmLinkLineDeviceComputer.cxx
+++ b/Source/cmLinkLineDeviceComputer.cxx
@@ -183,29 +183,29 @@ bool requireDeviceLinking(cmGeneratorTarget& target, cmLocalGenerator& lg,
return cmIsOn(resolveDeviceSymbols);
}
- if (const char* separableCompilation =
- target.GetProperty("CUDA_SEPARABLE_COMPILATION")) {
- if (cmIsOn(separableCompilation)) {
- bool doDeviceLinking = false;
- switch (target.GetType()) {
- case cmStateEnums::SHARED_LIBRARY:
- case cmStateEnums::MODULE_LIBRARY:
- case cmStateEnums::EXECUTABLE:
- doDeviceLinking = true;
- break;
- default:
- break;
- }
- return doDeviceLinking;
- }
- }
-
// Determine if we have any dependencies that require
// us to do a device link step
cmGeneratorTarget::LinkClosure const* closure =
target.GetLinkClosure(config);
if (cmContains(closure->Languages, "CUDA")) {
+ if (const char* separableCompilation =
+ target.GetProperty("CUDA_SEPARABLE_COMPILATION")) {
+ if (cmIsOn(separableCompilation)) {
+ bool doDeviceLinking = false;
+ switch (target.GetType()) {
+ case cmStateEnums::SHARED_LIBRARY:
+ case cmStateEnums::MODULE_LIBRARY:
+ case cmStateEnums::EXECUTABLE:
+ doDeviceLinking = true;
+ break;
+ default:
+ break;
+ }
+ return doDeviceLinking;
+ }
+ }
+
cmComputeLinkInformation* pcli = target.GetLinkInformation(config);
if (pcli) {
cmLinkLineDeviceComputer deviceLinkComputer(
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 1754421..be13a37 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2104,10 +2104,11 @@ static void AddVisibilityCompileOption(std::string& flags,
static void AddInlineVisibilityCompileOption(std::string& flags,
cmGeneratorTarget const* target,
cmLocalGenerator* lg,
- std::string* warnCMP0063)
+ std::string* warnCMP0063,
+ const std::string& lang)
{
std::string compileOption =
- "CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN";
+ cmStrCat("CMAKE_", lang, "_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN");
const char* opt = lg->GetMakefile()->GetDefinition(compileOption);
if (!opt) {
return;
@@ -2149,8 +2150,8 @@ void cmLocalGenerator::AddVisibilityPresetFlags(
AddVisibilityCompileOption(flags, target, this, lang, pWarnCMP0063);
- if (lang == "CXX") {
- AddInlineVisibilityCompileOption(flags, target, this, pWarnCMP0063);
+ if (lang == "CXX" || lang == "OBJCXX") {
+ AddInlineVisibilityCompileOption(flags, target, this, pWarnCMP0063, lang);
}
if (!warnCMP0063.empty() && this->WarnCMP0063.insert(target).second) {
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 767f4e0..dd8a389 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -733,8 +733,8 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
// See if we need to use a compiler launcher like ccache or distcc
std::string compilerLauncher;
if (!compileCommands.empty() &&
- (lang == "C" || lang == "CXX" || lang == "Fortran" ||
- lang == "CUDA")) {
+ (lang == "C" || lang == "CXX" || lang == "Fortran" || lang == "CUDA" ||
+ lang == "OBJC" || lang == "OBJCXX")) {
std::string const clauncher_prop = lang + "_COMPILER_LAUNCHER";
const char* clauncher =
this->GeneratorTarget->GetProperty(clauncher_prop);
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 919a5db..0aab912 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -702,7 +702,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang)
// See if we need to use a compiler launcher like ccache or distcc
std::string compilerLauncher;
if (!compileCmds.empty() &&
- (lang == "C" || lang == "CXX" || lang == "Fortran" || lang == "CUDA")) {
+ (lang == "C" || lang == "CXX" || lang == "Fortran" || lang == "CUDA" ||
+ lang == "OBJC" || lang == "OBJCXX")) {
std::string const clauncher_prop = lang + "_COMPILER_LAUNCHER";
const char* clauncher = this->GeneratorTarget->GetProperty(clauncher_prop);
if (clauncher && *clauncher) {
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 2db89de..80986fc 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -333,6 +333,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
initProp("C_STANDARD");
initProp("C_STANDARD_REQUIRED");
initProp("C_EXTENSIONS");
+ initProp("OBJC_COMPILER_LAUNCHER");
initProp("OBJC_STANDARD");
initProp("OBJC_STANDARD_REQUIRED");
initProp("OBJC_EXTENSIONS");
@@ -344,6 +345,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
initProp("CXX_STANDARD");
initProp("CXX_STANDARD_REQUIRED");
initProp("CXX_EXTENSIONS");
+ initProp("OBJCXX_COMPILER_LAUNCHER");
initProp("OBJCXX_STANDARD");
initProp("OBJCXX_STANDARD_REQUIRED");
initProp("OBJCXX_EXTENSIONS");
diff --git a/Tests/CMakeLib/testCTestResourceSpec.cxx b/Tests/CMakeLib/testCTestResourceSpec.cxx
index 99bee56..b49f8ff 100644
--- a/Tests/CMakeLib/testCTestResourceSpec.cxx
+++ b/Tests/CMakeLib/testCTestResourceSpec.cxx
@@ -7,71 +7,89 @@
struct ExpectedSpec
{
std::string Path;
- bool ParseResult;
+ cmCTestResourceSpec::ReadFileResult ParseResult;
cmCTestResourceSpec Expected;
};
static const std::vector<ExpectedSpec> expectedResourceSpecs = {
- /* clang-format off */
- {"spec1.json", true, {{{
- {"gpus", {
- {"2", 4},
- {"e", 1},
- }},
- {"threads", {
- }},
- }}}},
- {"spec2.json", true, {}},
- {"spec3.json", false, {}},
- {"spec4.json", false, {}},
- {"spec5.json", false, {}},
- {"spec6.json", false, {}},
- {"spec7.json", false, {}},
- {"spec8.json", false, {}},
- {"spec9.json", false, {}},
- {"spec10.json", false, {}},
- {"spec11.json", false, {}},
- {"spec12.json", false, {}},
- {"spec13.json", false, {}},
- {"spec14.json", true, {}},
- {"spec15.json", true, {}},
- {"spec16.json", true, {}},
- {"spec17.json", false, {}},
- {"spec18.json", false, {}},
- {"spec19.json", false, {}},
- {"spec20.json", true, {}},
- {"spec21.json", false, {}},
- {"spec22.json", false, {}},
- {"spec23.json", false, {}},
- {"spec24.json", false, {}},
- {"spec25.json", false, {}},
- {"spec26.json", false, {}},
- {"spec27.json", false, {}},
- {"spec28.json", false, {}},
- {"spec29.json", false, {}},
- {"spec30.json", false, {}},
- {"spec31.json", false, {}},
- {"spec32.json", false, {}},
- {"spec33.json", false, {}},
- {"spec34.json", false, {}},
- {"spec35.json", false, {}},
- {"spec36.json", false, {}},
- {"noexist.json", false, {}},
- /* clang-format on */
+ { "spec1.json",
+ cmCTestResourceSpec::ReadFileResult::READ_OK,
+ { { {
+ { "gpus",
+ {
+ { "2", 4 },
+ { "e", 1 },
+ } },
+ { "threads", {} },
+ } } } },
+ { "spec2.json", cmCTestResourceSpec::ReadFileResult::READ_OK, {} },
+ { "spec3.json",
+ cmCTestResourceSpec::ReadFileResult::INVALID_SOCKET_SPEC,
+ {} },
+ { "spec4.json",
+ cmCTestResourceSpec::ReadFileResult::INVALID_SOCKET_SPEC,
+ {} },
+ { "spec5.json",
+ cmCTestResourceSpec::ReadFileResult::INVALID_SOCKET_SPEC,
+ {} },
+ { "spec6.json",
+ cmCTestResourceSpec::ReadFileResult::INVALID_SOCKET_SPEC,
+ {} },
+ { "spec7.json",
+ cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE_TYPE,
+ {} },
+ { "spec8.json", cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE, {} },
+ { "spec9.json", cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE, {} },
+ { "spec10.json", cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE, {} },
+ { "spec11.json", cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE, {} },
+ { "spec12.json", cmCTestResourceSpec::ReadFileResult::INVALID_ROOT, {} },
+ { "spec13.json", cmCTestResourceSpec::ReadFileResult::JSON_PARSE_ERROR, {} },
+ { "spec14.json", cmCTestResourceSpec::ReadFileResult::READ_OK, {} },
+ { "spec15.json", cmCTestResourceSpec::ReadFileResult::READ_OK, {} },
+ { "spec16.json", cmCTestResourceSpec::ReadFileResult::READ_OK, {} },
+ { "spec17.json", cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE, {} },
+ { "spec18.json", cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE, {} },
+ { "spec19.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
+ { "spec20.json", cmCTestResourceSpec::ReadFileResult::READ_OK, {} },
+ { "spec21.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
+ { "spec22.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
+ { "spec23.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
+ { "spec24.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
+ { "spec25.json",
+ cmCTestResourceSpec::ReadFileResult::UNSUPPORTED_VERSION,
+ {} },
+ { "spec26.json",
+ cmCTestResourceSpec::ReadFileResult::UNSUPPORTED_VERSION,
+ {} },
+ { "spec27.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
+ { "spec28.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
+ { "spec29.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
+ { "spec30.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
+ { "spec31.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
+ { "spec32.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
+ { "spec33.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
+ { "spec34.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
+ { "spec35.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
+ { "spec36.json", cmCTestResourceSpec::ReadFileResult::NO_VERSION, {} },
+ { "noexist.json", cmCTestResourceSpec::ReadFileResult::FILE_NOT_FOUND, {} },
};
-static bool testSpec(const std::string& path, bool expectedResult,
+static bool testSpec(const std::string& path,
+ cmCTestResourceSpec::ReadFileResult expectedResult,
const cmCTestResourceSpec& expected)
{
cmCTestResourceSpec actual;
- bool result = actual.ReadFromJSONFile(path);
+ auto result = actual.ReadFromJSONFile(path);
if (result != expectedResult) {
- std::cout << "ReadFromJSONFile(\"" << path << "\") returned " << result
- << ", should be " << expectedResult << std::endl;
+ std::cout << "ReadFromJSONFile(\"" << path << "\") returned \""
+ << cmCTestResourceSpec::ResultToString(result)
+ << "\", should be \""
+ << cmCTestResourceSpec::ResultToString(expectedResult) << "\""
+ << std::endl;
return false;
}
- if (result && actual != expected) {
+ if (actual != expected) {
std::cout << "ReadFromJSONFile(\"" << path
<< "\") did not give expected spec" << std::endl;
return false;
diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description1.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description1.cmake
index 86a74b2..f46a575 100644
--- a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description1.cmake
+++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description1.cmake
@@ -65,9 +65,10 @@ if(DPKGDEB_EXECUTABLE)
"dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: `${dpkg_description}` != `${expected_description}`")
endif()
elseif(dpkg_package_name STREQUAL "mylib-libraries")
- if(NOT dpkg_description MATCHES "main description\n.*")
+ set(expected_description "main description")
+ if(NOT dpkg_description STREQUAL expected_description)
set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all}
- "dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: `${dpkg_description}` =~ `main description.*`")
+ "dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: `${dpkg_description}` != `${expected_description}`")
endif()
else()
set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all}
diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake
index d53c73d..c00921a 100644
--- a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake
+++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake
@@ -53,9 +53,10 @@ if(DPKGDEB_EXECUTABLE)
message(STATUS "package='${dpkg_package_name}', description='${dpkg_description}'")
if(dpkg_package_name STREQUAL "mylib-applications" OR dpkg_package_name STREQUAL "mylib-headers")
- if(NOT dpkg_description MATCHES "main description 2\n.*")
+ set(expected_description "main description 2")
+ if(NOT dpkg_description STREQUAL expected_description)
set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all}
- "dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: `${dpkg_description}` =~ `main description 2`")
+ "dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: `${dpkg_description}` != `${expected_description}`")
endif()
elseif(dpkg_package_name STREQUAL "mylib-libraries")
set(expected_description "main description 2\n library description")
diff --git a/Tests/Cuda/CMakeLists.txt b/Tests/Cuda/CMakeLists.txt
index a30071f..44c6005 100644
--- a/Tests/Cuda/CMakeLists.txt
+++ b/Tests/Cuda/CMakeLists.txt
@@ -4,6 +4,7 @@ ADD_TEST_MACRO(Cuda.ConsumeCompileFeatures CudaConsumeCompileFeatures)
ADD_TEST_MACRO(Cuda.ObjectLibrary CudaObjectLibrary)
ADD_TEST_MACRO(Cuda.MixedStandardLevels MixedStandardLevels)
ADD_TEST_MACRO(Cuda.NotEnabled CudaNotEnabled)
+ADD_TEST_MACRO(Cuda.SeparableCompCXXOnly SeparableCompCXXOnly)
ADD_TEST_MACRO(Cuda.ToolkitInclude CudaToolkitInclude)
ADD_TEST_MACRO(Cuda.ProperDeviceLibraries ProperDeviceLibraries)
ADD_TEST_MACRO(Cuda.ProperLinkFlags ProperLinkFlags)
diff --git a/Tests/Cuda/SeparableCompCXXOnly/CMakeLists.txt b/Tests/Cuda/SeparableCompCXXOnly/CMakeLists.txt
new file mode 100644
index 0000000..97670e3
--- /dev/null
+++ b/Tests/Cuda/SeparableCompCXXOnly/CMakeLists.txt
@@ -0,0 +1,3 @@
+project(SeparableCompCXXOnly LANGUAGES CXX CUDA)
+set(CMAKE_CUDA_SEPARABLE_COMPILATION ON)
+add_executable(SeparableCompCXXOnly main.cpp)
diff --git a/Tests/Cuda/SeparableCompCXXOnly/main.cpp b/Tests/Cuda/SeparableCompCXXOnly/main.cpp
new file mode 100644
index 0000000..8135246
--- /dev/null
+++ b/Tests/Cuda/SeparableCompCXXOnly/main.cpp
@@ -0,0 +1,5 @@
+
+int main(int, char const* [])
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 6b2f117..581a39e 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -530,6 +530,9 @@ if("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
if(CMAKE_Fortran_COMPILER)
list(APPEND CompilerLauncher_ARGS -DCMake_TEST_Fortran=1)
endif()
+ if (APPLE AND CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
+ list(APPEND CompilerLauncher_ARGS -DCMake_TEST_OBJC=1)
+ endif()
add_RunCMake_test(CompilerLauncher)
add_RunCMake_test(ctest_labels_for_subprojects)
endif()
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index b154c79..745bc8a 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -38,7 +38,7 @@ run_cpack_test(DEB_PACKAGE_VERSION_BACK_COMPATIBILITY "DEB.DEB_PACKAGE_VERSION_B
run_cpack_test_subtests(EXTERNAL "none;good;good_multi;bad_major;bad_minor;invalid_good;invalid_bad;stage_and_package" "External" false "MONOLITHIC;COMPONENT")
run_cpack_test_subtests(
DEB_DESCRIPTION
- "CPACK_DEBIAN_PACKAGE_DESCRIPTION;CPACK_PACKAGE_DESCRIPTION;CPACK_PACKAGE_DESCRIPTION_FILE"
+ "CPACK_DEBIAN_PACKAGE_DESCRIPTION;CPACK_PACKAGE_DESCRIPTION;CPACK_PACKAGE_DESCRIPTION_FILE;CPACK_NO_PACKAGE_DESCRIPTION"
"DEB.DEB_DESCRIPTION"
false
"MONOLITHIC;COMPONENT"
diff --git a/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/VerifyResult.cmake
index e9ac13a..a8e2e7a 100644
--- a/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/VerifyResult.cmake
@@ -56,6 +56,8 @@ set(_expected_description [[ Description: This is the summary line
# workaround required!
if(RunCMake_SUBTEST_SUFFIX STREQUAL "CPACK_PACKAGE_DESCRIPTION_FILE" AND PACKAGING_TYPE STREQUAL "MONOLITHIC")
string(APPEND _expected_description "\n ." )
+elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "CPACK_NO_PACKAGE_DESCRIPTION")
+ set(_expected_description [[ Description: This is the summary line]])
endif()
foreach(_file_no RANGE 1 ${EXPECTED_FILES_COUNT})
diff --git a/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx b/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx
index 27644af..80db05e 100644
--- a/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx
+++ b/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx
@@ -285,7 +285,8 @@ static int doVerify(int argc, char const* const* argv)
std::set<std::string> testNameSet(testNameList.begin(), testNameList.end());
cmCTestResourceSpec spec;
- if (!spec.ReadFromJSONFile(resFile)) {
+ if (spec.ReadFromJSONFile(resFile) !=
+ cmCTestResourceSpec::ReadFileResult::READ_OK) {
std::cout << "Could not read resource spec " << resFile << std::endl;
return 1;
}
diff --git a/Tests/RunCMake/CompilerLauncher/OBJC-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJC-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/OBJC-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/CompilerLauncher/OBJC-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJC-launch-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/OBJC-launch-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/CompilerLauncher/OBJC-launch.cmake b/Tests/RunCMake/CompilerLauncher/OBJC-launch.cmake
new file mode 100644
index 0000000..43e8521
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/OBJC-launch.cmake
@@ -0,0 +1,3 @@
+set(CTEST_USE_LAUNCHERS 1)
+include(CTestUseLaunchers)
+include(OBJC.cmake)
diff --git a/Tests/RunCMake/CompilerLauncher/OBJC.cmake b/Tests/RunCMake/CompilerLauncher/OBJC.cmake
new file mode 100644
index 0000000..55c4493
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/OBJC.cmake
@@ -0,0 +1,4 @@
+enable_language(OBJC)
+set(CMAKE_OBJC_COMPILER_LAUNCHER "${CMAKE_COMMAND};-E;env;USED_LAUNCHER=1")
+set(CMAKE_VERBOSE_MAKEFILE TRUE)
+add_executable(main main.m)
diff --git a/Tests/RunCMake/CompilerLauncher/OBJCXX-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJCXX-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/OBJCXX-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/CompilerLauncher/OBJCXX-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJCXX-launch-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/OBJCXX-launch-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/CompilerLauncher/OBJCXX-launch.cmake b/Tests/RunCMake/CompilerLauncher/OBJCXX-launch.cmake
new file mode 100644
index 0000000..5a54bff
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/OBJCXX-launch.cmake
@@ -0,0 +1,3 @@
+set(CTEST_USE_LAUNCHERS 1)
+include(CTestUseLaunchers)
+include(OBJCXX.cmake)
diff --git a/Tests/RunCMake/CompilerLauncher/OBJCXX.cmake b/Tests/RunCMake/CompilerLauncher/OBJCXX.cmake
new file mode 100644
index 0000000..e629603
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/OBJCXX.cmake
@@ -0,0 +1,4 @@
+enable_language(OBJCXX)
+set(CMAKE_OBJCXX_COMPILER_LAUNCHER "${CMAKE_COMMAND};-E;env;USED_LAUNCHER=1")
+set(CMAKE_VERBOSE_MAKEFILE TRUE)
+add_executable(main main.mm)
diff --git a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
index bb8da03..4420260 100644
--- a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
@@ -22,6 +22,9 @@ endif()
if(CMake_TEST_Fortran)
list(APPEND langs Fortran)
endif()
+if(CMake_TEST_OBJC)
+ list(APPEND langs OBJC OBJCXX)
+endif()
foreach(lang ${langs})
run_compiler_launcher(${lang})
diff --git a/Tests/RunCMake/CompilerLauncher/main.m b/Tests/RunCMake/CompilerLauncher/main.m
new file mode 100644
index 0000000..8488f4e
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/main.m
@@ -0,0 +1,4 @@
+int main(void)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/CompilerLauncher/main.mm b/Tests/RunCMake/CompilerLauncher/main.mm
new file mode 100644
index 0000000..f8b643a
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/main.mm
@@ -0,0 +1,4 @@
+int main()
+{
+ return 0;
+}