[Cmake-commits] CMake branch, next, updated. v3.3.0-rc3-840-ge519d84
Brad King
brad.king at kitware.com
Mon Jul 6 10:39:47 EDT 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via e519d849de1be8c6d80d9406c6b828a4acf37395 (commit)
via 0a203db5dc4c654a488777acd785337dd24137e2 (commit)
from 7361966ee0221f706fa27de6422a35a71044ef88 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e519d849de1be8c6d80d9406c6b828a4acf37395
commit e519d849de1be8c6d80d9406c6b828a4acf37395
Merge: 7361966 0a203db
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jul 6 10:39:46 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jul 6 10:39:46 2015 -0400
Merge topic 'fortran-module-preprocessor-defs' into next
0a203db5 Fortran: Fix passing of preprocessor definitions to dependency scanner
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0a203db5dc4c654a488777acd785337dd24137e2
commit 0a203db5dc4c654a488777acd785337dd24137e2
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jul 6 10:21:25 2015 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Jul 6 10:35:02 2015 -0400
Fortran: Fix passing of preprocessor definitions to dependency scanner
In commit v3.3.0-rc1~352^2~3 (Genex: Allow COMPILE_LANGUAGE when
processing compile definitions, 2015-03-04) the name of the variable
used to pass preprocessor definitions to the Fortran dependency scanner
was changed to be per-language, but the actual dependency scanning code
was not updated accordingly. Update the code and add a test case.
Reported-by: Radovan Bast <radovan.bast at gmail.com>
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index f12116e..1b2586c 100644
--- a/Source/cmDependsFortran.cxx
+++ b/Source/cmDependsFortran.cxx
@@ -143,7 +143,7 @@ cmDependsFortran
std::vector<std::string> definitions;
cmMakefile* mf = this->LocalGenerator->GetMakefile();
if(const char* c_defines =
- mf->GetDefinition("CMAKE_TARGET_DEFINITIONS"))
+ mf->GetDefinition("CMAKE_TARGET_DEFINITIONS_Fortran"))
{
cmSystemTools::ExpandListArgument(c_defines, definitions);
}
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt
index 8700c94..753ce27 100644
--- a/Tests/Fortran/CMakeLists.txt
+++ b/Tests/Fortran/CMakeLists.txt
@@ -168,7 +168,7 @@ if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
add_definitions(-DFOO -DBAR=1)
include_directories(${testf_SOURCE_DIR}/include)
- add_executable(test_preprocess test_preprocess.F90)
+ add_executable(test_preprocess test_preprocess.F90 test_preprocess_module.F90)
set(TEST_MODULE_DEPENDS 1)
endif()
diff --git a/Tests/Fortran/test_preprocess.F90 b/Tests/Fortran/test_preprocess.F90
index e4f1fbe..3a09976 100644
--- a/Tests/Fortran/test_preprocess.F90
+++ b/Tests/Fortran/test_preprocess.F90
@@ -46,6 +46,8 @@ PROGRAM PPTEST
#endif
! 0 ; <empty>
+USE PPAvailable
+
#include "test_preprocess.h"
END PROGRAM
diff --git a/Tests/Fortran/test_preprocess_module.F90 b/Tests/Fortran/test_preprocess_module.F90
new file mode 100644
index 0000000..5849b62
--- /dev/null
+++ b/Tests/Fortran/test_preprocess_module.F90
@@ -0,0 +1,5 @@
+#ifdef FOO
+MODULE PPAvailable
+! no conent
+END MODULE
+#endif
-----------------------------------------------------------------------
Summary of changes:
Source/cmDependsFortran.cxx | 2 +-
Tests/Fortran/CMakeLists.txt | 2 +-
Tests/Fortran/test_preprocess.F90 | 2 ++
Tests/Fortran/test_preprocess_module.F90 | 5 +++++
4 files changed, 9 insertions(+), 2 deletions(-)
create mode 100644 Tests/Fortran/test_preprocess_module.F90
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list