cmake_modules/CMakePascalInformation.cmake
branchcmake_pascal
changeset 8821 e85ff6e298b5
parent 8815 c28fcd8ec138
child 8823 65b430b6cd68
equal deleted inserted replaced
8819:8e25b820b360 8821:e85ff6e298b5
     5 get_filename_component(CMAKE_BASE_NAME ${CMAKE_Pascal_COMPILER} NAME_WE)
     5 get_filename_component(CMAKE_BASE_NAME ${CMAKE_Pascal_COMPILER} NAME_WE)
     6 set(CMAKE_SYSTEM_AND_Pascal_COMPILER_INFO_FILE
     6 set(CMAKE_SYSTEM_AND_Pascal_COMPILER_INFO_FILE
     7     ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
     7     ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
     8 include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
     8 include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
     9 
     9 
       
    10 # This section should actually be in Platform/${CMAKE_SYSTME_NAME}-fpc.cmake
       
    11 set(CMAKE_Pascal_FLAGS_INIT "-l- -v0ewn")
       
    12 set(CMAKE_Pascal_FLAGS_DEBUG_INIT "-g -gl -gp -gh")
       
    13 set(CMAKE_Pascal_FLAGS_MINSIZEREL_INIT "-Os -dNDEBUG")
       
    14 set(CMAKE_Pascal_FLAGS_RELEASE_INIT "-O3 -dNDEBUG")
       
    15 set(CMAKE_Pascal_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -gl -gp")
       
    16 
    10 # This should be included before the _INIT variables are
    17 # This should be included before the _INIT variables are
    11 # used to initialize the cache.  Since the rule variables
    18 # used to initialize the cache. Since the rule variables
    12 # have if blocks on them, users can still define them here.
    19 # have if blocks on them, users can still define them here.
    13 # But, it should still be after the platform file so changes can
    20 # But, it should still be after the platform file so changes can
    14 # be made to those values.
    21 # be made to those values.
    15 
    22 
    16 if(CMAKE_USER_MAKE_RULES_OVERRIDE)
    23 if(CMAKE_USER_MAKE_RULES_OVERRIDE)
   184     CACHE STRING "Libraries linked by default (usually handled internally).")
   191     CACHE STRING "Libraries linked by default (usually handled internally).")
   185     MARK_AS_ADVANCED(CMAKE_Pascal_STANDARD_LIBRARIES)
   192     MARK_AS_ADVANCED(CMAKE_Pascal_STANDARD_LIBRARIES)
   186 endif(CMAKE_Pascal_STANDARD_LIBRARIES_INIT)
   193 endif(CMAKE_Pascal_STANDARD_LIBRARIES_INIT)
   187 
   194 
   188 if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
   195 if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
   189   SET (CMAKE_Pascal_FLAGS_DEBUG "${CMAKE_Ada_FLAGS_DEBUG_INIT}" CACHE STRING
   196   SET (CMAKE_Pascal_FLAGS_DEBUG "${CMAKE_Pascal_FLAGS_DEBUG_INIT}" CACHE STRING
   190      "Flags used by the compiler during debug builds.")
   197      "Flags used by the compiler during debug builds.")
   191   SET (CMAKE_Pascal_FLAGS_MINSIZEREL "${CMAKE_Ada_FLAGS_MINSIZEREL_INIT}" CACHE STRING
   198   SET (CMAKE_Pascal_FLAGS_MINSIZEREL "${CMAKE_Pascal_FLAGS_MINSIZEREL_INIT}" CACHE STRING
   192      "Flags used by the compiler during release minsize builds.")
   199      "Flags used by the compiler during release minsize builds.")
   193   SET (CMAKE_Pascal_FLAGS_RELEASE "${CMAKE_Ada_FLAGS_RELEASE_INIT}" CACHE STRING
   200   SET (CMAKE_Pascal_FLAGS_RELEASE "${CMAKE_Pascal_FLAGS_RELEASE_INIT}" CACHE STRING
   194      "Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
   201      "Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
   195   SET (CMAKE_Pascal_FLAGS_RELWITHDEBINFO "${CMAKE_Ada_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
   202   SET (CMAKE_Pascal_FLAGS_RELWITHDEBINFO "${CMAKE_Pascal_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
   196      "Flags used by the compiler during Release with Debug Info builds.")
   203      "Flags used by the compiler during Release with Debug Info builds.")
   197 endif(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
   204 endif(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
   198 
   205 
   199 mark_as_advanced(CMAKE_Pascal_FLAGS CMAKE_Pascal_FLAGS_DEBUG CMAKE_Pascal_FLAGS_MINSIZEREL
   206 mark_as_advanced(CMAKE_Pascal_FLAGS CMAKE_Pascal_FLAGS_DEBUG CMAKE_Pascal_FLAGS_MINSIZEREL
   200                  CMAKE_Pascal_FLAGS_RELEASE CMAKE_Pascal_FLAGS_RELWITHDEBINFO)
   207                  CMAKE_Pascal_FLAGS_RELEASE CMAKE_Pascal_FLAGS_RELWITHDEBINFO)