diff options
author | Brad King <brad.king@kitware.com> | 2015-07-06 14:21:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-07-06 14:35:02 (GMT) |
commit | 0a203db5dc4c654a488777acd785337dd24137e2 (patch) | |
tree | e4fe52c8888eb74495c2afaf550f851b7a16cf54 /Tests | |
parent | a6916a6c6e397bda8b381f65dbfc59d3c52f8525 (diff) | |
download | CMake-0a203db5dc4c654a488777acd785337dd24137e2.zip CMake-0a203db5dc4c654a488777acd785337dd24137e2.tar.gz CMake-0a203db5dc4c654a488777acd785337dd24137e2.tar.bz2 |
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@gmail.com>
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/Fortran/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/Fortran/test_preprocess.F90 | 2 | ||||
-rw-r--r-- | Tests/Fortran/test_preprocess_module.F90 | 5 |
3 files changed, 8 insertions, 1 deletions
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 |