diff options
author | Brad King <brad.king@kitware.com> | 2019-03-04 13:35:38 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-03-04 13:35:46 (GMT) |
commit | dbd3b1ac90b70f31f10488a97ec72c6a435106ec (patch) | |
tree | 3a6c0b22b5a65c5ad1fac3a3bfc92da24160864d /Tests | |
parent | d1558fbf3ab770b8691a8548a297d1c48fe666eb (diff) | |
parent | 0b82f56ac69f2140cc05e7bdd4564ebf87ea6c6f (diff) | |
download | CMake-dbd3b1ac90b70f31f10488a97ec72c6a435106ec.zip CMake-dbd3b1ac90b70f31f10488a97ec72c6a435106ec.tar.gz CMake-dbd3b1ac90b70f31f10488a97ec72c6a435106ec.tar.bz2 |
Merge topic 'vs-fortran-rc'
0b82f56ac6 VS: Fix Fortran target type selection with RC sources
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3050
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/FortranOnly/CMakeLists.txt | 8 | ||||
-rw-r--r-- | Tests/FortranOnly/testRC.rc | 0 |
2 files changed, 7 insertions, 1 deletions
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 |