summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-07-06 10:42:42 -0400
committerBrad King <brad.king@kitware.com>2015-07-06 10:42:42 -0400
commitb37fb49646909b489a062088ed5aa1e88d896f83 (patch)
treee38a95acee8062c5c798bf9def024c2e4420c856
parent6dd08e5fe0fffc11c0f6e6d7633b692703f59f4f (diff)
parent0a203db5dc4c654a488777acd785337dd24137e2 (diff)
downloadcmake-b37fb49646909b489a062088ed5aa1e88d896f83.tar.gz
Merge branch 'fortran-module-preprocessor-defs' into release
-rw-r--r--Source/cmDependsFortran.cxx2
-rw-r--r--Tests/Fortran/CMakeLists.txt2
-rw-r--r--Tests/Fortran/test_preprocess.F902
-rw-r--r--Tests/Fortran/test_preprocess_module.F905
4 files changed, 9 insertions, 2 deletions
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index f12116ebab..1b2586c23b 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 8700c9466f..753ce2796e 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 e4f1fbe768..3a09976c52 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 0000000000..5849b62b47
--- /dev/null
+++ b/Tests/Fortran/test_preprocess_module.F90
@@ -0,0 +1,5 @@
+#ifdef FOO
+MODULE PPAvailable
+! no conent
+END MODULE
+#endif