2 # This file sets the basic flags for the Fortran language in CMake.
3 # It also loads the available platform file for the system-compiler
6 GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE)
7 SET(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE
8 ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
9 INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
12 SET (CMAKE_RC_FLAGS "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}" CACHE STRING
13 "Flags for Fortran compiler.")
15 # These are the only types of flags that should be passed to the rc
16 # command, if COMPILE_FLAGS is used on a target this will be used
17 # to filter out any other flags
18 SET(CMAKE_RC_FLAG_REGEX "^[-/](D|I)")
20 # now define the following rule variables
21 # CMAKE_RC_COMPILE_OBJECT
22 SET(CMAKE_INCLUDE_FLAG_RC "-I")
23 # compile a Resource file into an object file
24 IF(NOT CMAKE_RC_COMPILE_OBJECT)
25 SET(CMAKE_RC_COMPILE_OBJECT
26 "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> /fo<OBJECT> <SOURCE>")
27 ENDIF(NOT CMAKE_RC_COMPILE_OBJECT)
32 # set this variable so we can avoid loading this more than once.
33 SET(CMAKE_RC_INFORMATION_LOADED 1)