summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CMakeRCInformation.cmake2
-rw-r--r--Modules/FindPython/Support.cmake3
-rw-r--r--Modules/Platform/Windows-MSVC.cmake6
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CMakeVersion.rc.in19
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx4
-rw-r--r--Source/cmQtAutoGenInitializer.cxx9
-rw-r--r--Source/cmQtAutoGenInitializer.h1
-rw-r--r--Source/cmcldeps.cxx2
-rw-r--r--Source/cmcmd.cxx3
-rw-r--r--Tests/FindPython/NumPy/arraytest.c2
-rw-r--r--Tests/FortranOnly/CMakeLists.txt8
-rw-r--r--Tests/FortranOnly/testRC.rc0
13 files changed, 35 insertions, 26 deletions
diff --git a/Modules/CMakeRCInformation.cmake b/Modules/CMakeRCInformation.cmake
index 1227fdf..7bf6567 100644
--- a/Modules/CMakeRCInformation.cmake
+++ b/Modules/CMakeRCInformation.cmake
@@ -32,7 +32,7 @@ set(CMAKE_INCLUDE_FLAG_RC "-I")
# compile a Resource file into an object file
if(NOT CMAKE_RC_COMPILE_OBJECT)
set(CMAKE_RC_COMPILE_OBJECT
- "<CMAKE_RC_COMPILER> <DEFINES> <INCLUDES> <FLAGS> /fo<OBJECT> <SOURCE>")
+ "<CMAKE_RC_COMPILER> <DEFINES> <INCLUDES> <FLAGS> /fo <OBJECT> <SOURCE>")
endif()
# set this variable so we can avoid loading this more than once.
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake
index 0138b04..ef8272c 100644
--- a/Modules/FindPython/Support.cmake
+++ b/Modules/FindPython/Support.cmake
@@ -1140,9 +1140,8 @@ if ("NumPy" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS AND ${_PYTHON_PREFIX}_Inte
OUTPUT_STRIP_TRAILING_WHITESPACE)
if (NOT _${_PYTHON_PREFIX}_RESULT)
find_path(${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR
- NAMES arrayobject.h numpyconfig.h
+ NAMES "numpy/arrayobject.h" "numpy/numpyconfig.h"
HINTS "${_${_PYTHON_PREFIX}_NumPy_PATH}"
- PATH_SUFFIXES numpy
NO_DEFAULT_PATH)
endif()
if(${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR)
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index 2daf313..0e11790 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -374,10 +374,12 @@ macro(__windows_compiler_msvc_enable_rc flags)
set(CMAKE_RC_COMPILER_INIT rc)
endif()
if(NOT CMAKE_RC_FLAGS_INIT)
- string(APPEND CMAKE_RC_FLAGS_INIT " ${flags}")
+ # llvm-rc fails when flags are specified with /D and no space after
+ string(REPLACE " /D" " -D" fixed_flags " ${flags}")
+ string(APPEND CMAKE_RC_FLAGS_INIT " ${fixed_flags}")
endif()
if(NOT CMAKE_RC_FLAGS_DEBUG_INIT)
- string(APPEND CMAKE_RC_FLAGS_DEBUG_INIT " /D_DEBUG")
+ string(APPEND CMAKE_RC_FLAGS_DEBUG_INIT " -D_DEBUG")
endif()
enable_language(RC)
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index c59a119..9175c32 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 14)
-set(CMake_VERSION_PATCH 20190303)
+set(CMake_VERSION_PATCH 20190305)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CMakeVersion.rc.in b/Source/CMakeVersion.rc.in
index 22b4a36..762d9bb 100644
--- a/Source/CMakeVersion.rc.in
+++ b/Source/CMakeVersion.rc.in
@@ -1,25 +1,16 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
-#define VER_FILEVERSION @CMake_RCVERSION@
-#define VER_FILEVERSION_STR "@CMake_RCVERSION_STR@\0"
-
-#define VER_PRODUCTVERSION @CMake_RCVERSION@
-#define VER_PRODUCTVERSION_STR "@CMake_RCVERSION_STR@\0"
-
-/* Version-information resource identifier. */
-#define VS_VERSION_INFO 1
-
-VS_VERSION_INFO VERSIONINFO
-FILEVERSION VER_FILEVERSION
-PRODUCTVERSION VER_PRODUCTVERSION
+1 VERSIONINFO
+FILEVERSION @CMake_RCVERSION@
+PRODUCTVERSION @CMake_RCVERSION@
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
- VALUE "FileVersion", VER_FILEVERSION_STR
- VALUE "ProductVersion", VER_PRODUCTVERSION_STR
+ VALUE "FileVersion", "@CMake_RCVERSION_STR@\0"
+ VALUE "ProductVersion", "@CMake_RCVERSION_STR@\0"
END
END
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 45927c9..bc40a5c 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -834,6 +834,10 @@ bool cmGlobalVisualStudioGenerator::TargetIsFortranOnly(
if (linkLang && *linkLang) {
languages.insert(linkLang);
}
+
+ // Intel Fortran .vfproj files do support the resource compiler.
+ languages.erase("RC");
+
return languages.size() == 1 && *languages.begin() == "Fortran";
}
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index 2fb6fdf..ef8fe73 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -594,7 +594,7 @@ bool cmQtAutoGenInitializer::InitRcc()
if (this->QtVersion.Major == 5 || this->QtVersion.Major == 6) {
if (stdOut.find("--list") != std::string::npos) {
this->Rcc.ListOptions.emplace_back("--list");
- } else {
+ } else if (stdOut.find("-list") != std::string::npos) {
this->Rcc.ListOptions.emplace_back("-list");
}
}
@@ -1581,6 +1581,10 @@ bool cmQtAutoGenInitializer::GetQtExecutable(GenVarsT& genVars,
print_err(prop + " evaluates to an empty value");
return false;
}
+
+ // Check if the provided executable already exists (it's possible for it
+ // not to exist when building Qt itself).
+ genVars.ExecutableExists = cmSystemTools::FileExists(genVars.Executable);
return true;
}
}
@@ -1630,6 +1634,7 @@ bool cmQtAutoGenInitializer::GetQtExecutable(GenVarsT& genVars,
print_err(err);
return false;
}
+ genVars.ExecutableExists = true;
}
return true;
@@ -1648,7 +1653,7 @@ bool cmQtAutoGenInitializer::RccListInputs(std::string const& fileName,
error += "\n";
return false;
}
- if (!this->Rcc.ListOptions.empty()) {
+ if (this->Rcc.ExecutableExists && !this->Rcc.ListOptions.empty()) {
// Use rcc for file listing
if (this->Rcc.Executable.empty()) {
error = "rcc executable not available";
diff --git a/Source/cmQtAutoGenInitializer.h b/Source/cmQtAutoGenInitializer.h
index 700f16b..1f4087f 100644
--- a/Source/cmQtAutoGenInitializer.h
+++ b/Source/cmQtAutoGenInitializer.h
@@ -68,6 +68,7 @@ public:
std::string ExecutableTargetName;
cmGeneratorTarget* ExecutableTarget = nullptr;
std::string Executable;
+ bool ExecutableExists = false;
/// @brief Constructor
GenVarsT(GenT gen, std::string const& genName,
diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx
index 1a10666..19d0d38 100644
--- a/Source/cmcldeps.cxx
+++ b/Source/cmcldeps.cxx
@@ -276,7 +276,7 @@ int main()
std::string clrest = rest;
// rc: /fo x.dir\x.rc.res -> cl: /out:x.dir\x.rc.res.dep.obj
- clrest = replace(clrest, "/fo", "/out:");
+ clrest = replace(clrest, "/fo ", "/out:");
clrest = replace(clrest, objfile, objfile + ".dep.obj ");
cl = "\"" + cl + "\" /P /DRC_INVOKED /TC ";
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 6e1a27c..cefac7a 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -1831,7 +1831,8 @@ int cmVSLink::LinkIncremental()
// Compile the resource file.
std::vector<std::string> rcCommand;
rcCommand.push_back(this->RcPath.empty() ? "rc" : this->RcPath);
- rcCommand.push_back("/fo" + this->ManifestFileRes);
+ rcCommand.emplace_back("/fo");
+ rcCommand.push_back(this->ManifestFileRes);
rcCommand.push_back(this->ManifestFileRC);
if (!RunCommand("RC Pass 1", rcCommand, this->Verbose, FORMAT_DECIMAL)) {
return -1;
diff --git a/Tests/FindPython/NumPy/arraytest.c b/Tests/FindPython/NumPy/arraytest.c
index 135877d..db259e5 100644
--- a/Tests/FindPython/NumPy/arraytest.c
+++ b/Tests/FindPython/NumPy/arraytest.c
@@ -1,7 +1,7 @@
#include "Python.h"
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
-#include "arrayobject.h"
+#include "numpy/arrayobject.h"
#include <math.h>
diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt
index 77f6041..45372dd 100644
--- a/Tests/FortranOnly/CMakeLists.txt
+++ b/Tests/FortranOnly/CMakeLists.txt
@@ -12,6 +12,12 @@ add_executable(FortranOnly1 testf.f)
set_property(TARGET FortranOnly1 PROPERTY OUTPUT_NAME FortranOnly)
target_link_libraries(FortranOnly1 FortranOnlylib)
+# Test that Fortran+RC work together.
+# FIXME: Add .rc in more cases.
+if(CMAKE_GENERATOR MATCHES "Visual Studio")
+ set(test_rc testRC.rc)
+endif()
+
# create a custom command that runs FortranOnly1 and puts
# the output into the file testfhello.txt
add_custom_command(OUTPUT ${FortranOnly_BINARY_DIR}/testfhello.txt
@@ -20,7 +26,7 @@ add_custom_command(OUTPUT ${FortranOnly_BINARY_DIR}/testfhello.txt
# create a second executable FortranOnly2 that has
# testfhello.txt has an source file so that it will
# run the above custom command.
-add_executable(FortranOnly2 testfhello.txt testf.f)
+add_executable(FortranOnly2 testfhello.txt testf.f ${test_rc})
target_link_libraries(FortranOnly2 FortranOnlylib)
# create a custom target to check the content of testfhello.txt
# by running the cmake script checktestf2.cmake
diff --git a/Tests/FortranOnly/testRC.rc b/Tests/FortranOnly/testRC.rc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/FortranOnly/testRC.rc