summaryrefslogtreecommitdiffstats
path: root/Source/cmcmd.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-22 14:14:44 (GMT)
committerBrad King <brad.king@kitware.com>2016-09-22 17:52:30 (GMT)
commitd3e0b64b1432700a71a10ddf06084f7bb8500694 (patch)
tree9b7db90ebf894846ca5401863d3752f43369166c /Source/cmcmd.cxx
parent8eca59a175b551c2d4c98fd9523e6aca6c51a82b (diff)
downloadCMake-d3e0b64b1432700a71a10ddf06084f7bb8500694.zip
CMake-d3e0b64b1432700a71a10ddf06084f7bb8500694.tar.gz
CMake-d3e0b64b1432700a71a10ddf06084f7bb8500694.tar.bz2
Ninja: Add internal tool to scan Fortran code for module dependencies
Create an internal `cmake -E cmake_ninja_depends` tool to scan an already-preprocessed Fortran translation unit for modules that it provides or requires. Save the information in a "ddi" file with a CMake-private format for intermediate dynamic dependency information. This file may the be loaded by another tool to be added later.
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r--Source/cmcmd.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 9daed4b..998a7ad 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -52,6 +52,9 @@
#include <stdlib.h>
#include <time.h>
+int cmcmd_cmake_ninja_depends(std::vector<std::string>::const_iterator argBeg,
+ std::vector<std::string>::const_iterator argEnd);
+
void CMakeCommandUsage(const char* program)
{
std::ostringstream errorStream;
@@ -782,6 +785,13 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
return cmcmd::ExecuteLinkScript(args);
}
+#ifdef CMAKE_BUILD_WITH_CMAKE
+ // Internal CMake ninja dependency scanning support.
+ else if (args[1] == "cmake_ninja_depends") {
+ return cmcmd_cmake_ninja_depends(args.begin() + 2, args.end());
+ }
+#endif
+
// Internal CMake unimplemented feature notification.
else if (args[1] == "cmake_unimplemented_variable") {
std::cerr << "Feature not implemented for this platform.";