Last active
August 23, 2024 17:43
-
-
Save scivision/5450e6c2152d8694d2738f9cd470c3bc to your computer and use it in GitHub Desktop.
Show CMake detecting change in Fortran module code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FC=ifx cmake -Bbuild -G "Unix Makefiles" | |
cmake --build build | |
touch modb.f90 | |
# should rebuild here | |
cmake --build build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required (VERSION 3.20) | |
project(detectChange LANGUAGES Fortran) | |
add_executable(main.x main.f90 moda.f90 modb.f90) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program main | |
use a | |
implicit none | |
print '(i0)', i | |
end program |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module a | |
use b | |
implicit none | |
end module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module b | |
integer, parameter :: i = 123 | |
end module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment