cmake_modules/CMakePascalInformation.cmake
branchspacecampaign
changeset 9646 7588daa8d28f
parent 9417 a0d014328165
child 9513 8cebd1870b2c
equal deleted inserted replaced
9645:da7b4d8c181e 9646:7588daa8d28f
     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
    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")
    11 set(CMAKE_Pascal_FLAGS_DEBUG_INIT "-g -gl -gp -gh")
    13 set(CMAKE_Pascal_FLAGS_MINSIZEREL_INIT "-Os -dNDEBUG")
    12 set(CMAKE_Pascal_FLAGS_MINSIZEREL_INIT "-Os -dNDEBUG")
    14 set(CMAKE_Pascal_FLAGS_RELEASE_INIT "-O3 -dNDEBUG")
    13 set(CMAKE_Pascal_FLAGS_RELEASE_INIT "-O3 -dNDEBUG")
    15 set(CMAKE_Pascal_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -gl -gp")
    14 set(CMAKE_Pascal_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -gl -gp")
    16 
    15 
    57     set(CMAKE_SHARED_LIBRARY_RUNTIME_Pascal_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
    56     set(CMAKE_SHARED_LIBRARY_RUNTIME_Pascal_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
    58 endif(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Pascal_FLAG_SEP)
    57 endif(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Pascal_FLAG_SEP)
    59 
    58 
    60 if(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Pascal_FLAG)
    59 if(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Pascal_FLAG)
    61 #-Wl,-rpath-link,
    60 #-Wl,-rpath-link,
    62     set(CMAKE_SHARED_LIBRARY_RUNTIME_Pascal_FLAG "-k-rpath-link")
    61     set(CMAKE_SHARED_LIBRARY_RPATH_LINK_Pascal_FLAG "-k-rpath-link")
    63 endif(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Pascal_FLAG)
    62 endif(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Pascal_FLAG)
    64 
    63 
    65 # for most systems a module is the same as a shared library
    64 # for most systems a module is the same as a shared library
    66 # so unless the variable CMAKE_MODULE_EXISTS is set just
    65 # so unless the variable CMAKE_MODULE_EXISTS is set just
    67 # copy the values from the LIBRARY variables
    66 # copy the values from the LIBRARY variables
   101     set(CMAKE_SHARED_LIBRARY_SONAME_Pascal_FLAG ${CMAKE_SHARED_LIBRARY_SONAME_C_FLAG})
   100     set(CMAKE_SHARED_LIBRARY_SONAME_Pascal_FLAG ${CMAKE_SHARED_LIBRARY_SONAME_C_FLAG})
   102 endif(NOT CMAKE_SHARED_LIBRARY_SONAME_Pascal_FLAG)
   101 endif(NOT CMAKE_SHARED_LIBRARY_SONAME_Pascal_FLAG)
   103 
   102 
   104 set(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make.  This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
   103 set(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make.  This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
   105 
   104 
   106 set(CMAKE_Pascal_FLAGS "$ENV{FPFLAGS} ${CMAKE_Pascal_FLAGS_INIT} ${CMAKE_Pascal_FLAGS}" CACHE STRING "Flags for Pascal compiler." FORCE)
   105 #set(CMAKE_Pascal_FLAGS "$ENV{FPFLAGS} ${CMAKE_Pascal_FLAGS_INIT} ${CMAKE_Pascal_FLAGS}" CACHE STRING "Flags for Pascal compiler." FORCE)
   107 
   106 
   108 include(CMakeCommonLanguageInclude)
   107 include(CMakeCommonLanguageInclude)
   109 
   108 
   110 # now define the following rule variables
   109 # now define the following rule variables
   111 
   110 
   181         endif(APPLE)
   180         endif(APPLE)
   182     endif(UNIX)
   181     endif(UNIX)
   183 
   182 
   184     #-Cn is mandatory as it's what creates the ppas.* script
   183     #-Cn is mandatory as it's what creates the ppas.* script
   185     set(CMAKE_Pascal_COMPILE_OBJECT
   184     set(CMAKE_Pascal_COMPILE_OBJECT
   186         "<CMAKE_Pascal_COMPILER> -Cn -FE${EXECUTABLE_OUTPUT_PATH} -FU${CMAKE_CURRENT_BINARY_DIR}/<OBJECT_DIR> ${CMAKE_Pascal_UNIX_FLAGS} <FLAGS> <SOURCE>")
   185         "<CMAKE_Pascal_COMPILER> -Cn -FE${EXECUTABLE_OUTPUT_PATH} -FU${CMAKE_CURRENT_BINARY_DIR}/<OBJECT_DIR> ${CMAKE_Pascal_UNIX_FLAGS} <FLAGS> <CMAKE_Pascal_LINK_FLAGS> <SOURCE>")
   187 endif(NOT CMAKE_Pascal_COMPILE_OBJECT)
   186 endif(NOT CMAKE_Pascal_COMPILE_OBJECT)
   188 
   187 
   189 # link Pascal objects in a single executable
   188 # link Pascal objects in a single executable
   190 if(NOT CMAKE_Pascal_LINK_EXECUTABLE)
   189 if(NOT CMAKE_Pascal_LINK_EXECUTABLE)
   191     if(WIN32)
   190     if(WIN32)