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 # make sure we don't use CMAKE_BASE_NAME from somewhere else
8 GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE)
9 SET(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE
10 ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
11 INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
15 SET (CMAKE_RC_FLAGS "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}" CACHE STRING
16 "Flags for Fortran compiler.")
18 # These are the only types of flags that should be passed to the rc
19 # command, if COMPILE_FLAGS is used on a target this will be used
20 # to filter out any other flags
21 SET(CMAKE_RC_FLAG_REGEX "^[-/](D|I)")
23 # now define the following rule variables
24 # CMAKE_RC_COMPILE_OBJECT
25 SET(CMAKE_INCLUDE_FLAG_RC "-I")
26 # compile a Resource file into an object file
27 IF(NOT CMAKE_RC_COMPILE_OBJECT)
28 SET(CMAKE_RC_COMPILE_OBJECT
29 "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> /fo<OBJECT> <SOURCE>")
30 ENDIF(NOT CMAKE_RC_COMPILE_OBJECT)
35 # set this variable so we can avoid loading this more than once.
36 SET(CMAKE_RC_INFORMATION_LOADED 1)