mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
Adds `Fortran_COMPILER_ID` and `Fortran_COMPILER_VERSION` generator expression support to match equivalent `C_COMPILER_ID`, `CXX_COMPILER_ID`, `C_COMPILER_VERSION`, and `CXX_COMPILER_VERSION` support. This is very helpful in the case where the C/C++ compiler suite is a different type of compiler from the platform Fortran compiler and projects use generator expressions to assign compiler flags and definitions. (e.g. `GNU` C/C++ and `SunPro` Fortran on Linux)
5 lines
290 B
CMake
5 lines
290 B
CMake
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copied_file.c"
|
|
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.c" "${CMAKE_CURRENT_BINARY_DIR}/copied_file$<Fortran_COMPILER_ID>.c"
|
|
)
|
|
add_custom_target(drive DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/copied_file.c")
|