diff -r 879270f627e0 -r bead90828a94 cmake_modules/CMakePascalInformation.cmake --- a/cmake_modules/CMakePascalInformation.cmake Tue Mar 26 02:06:54 2013 +0100 +++ b/cmake_modules/CMakePascalInformation.cmake Tue Mar 26 18:03:15 2013 +0100 @@ -33,10 +33,10 @@ # so if these are not set just copy the flags from the c version # No flags supported during linking as a shell script takes care of it -IF(NOT CMAKE_SHARED_LIBRARY_CREATE_Pascal_FLAGS) +if(NOT CMAKE_SHARED_LIBRARY_CREATE_Pascal_FLAGS) #-dynamiclib -Wl,-headerpad_max_install_names for C - SET(CMAKE_SHARED_LIBRARY_CREATE_Pascal_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}) -ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_Pascal_FLAGS) + set(CMAKE_SHARED_LIBRARY_CREATE_Pascal_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}) +endif(NOT CMAKE_SHARED_LIBRARY_CREATE_Pascal_FLAGS) if(NOT CMAKE_SHARED_LIBRARY_Pascal_FLAGS) #another similarity, fpc: -fPIC Same as -Cg @@ -48,13 +48,13 @@ set(CMAKE_SHARED_LIBRARY_LINK_Pascal_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}) endif(NOT CMAKE_SHARED_LIBRARY_LINK_Pascal_FLAGS) -#IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Pascal_FLAG) -# SET(CMAKE_SHARED_LIBRARY_RUNTIME_Pascal_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}) -#ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Pascal_FLAG) +#if(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Pascal_FLAG) +# set(CMAKE_SHARED_LIBRARY_RUNTIME_Pascal_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}) +#endif(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Pascal_FLAG) -#IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Pascal_FLAG_SEP) -# SET(CMAKE_SHARED_LIBRARY_RUNTIME_Pascal_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP}) -#ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Pascal_FLAG_SEP) +#if(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Pascal_FLAG_SEP) +# set(CMAKE_SHARED_LIBRARY_RUNTIME_Pascal_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP}) +#endif(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Pascal_FLAG_SEP) if(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Pascal_FLAG) set(CMAKE_SHARED_LIBRARY_RPATH_LINK_Pascal_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG}) @@ -69,21 +69,21 @@ endif(NOT CMAKE_MODULE_EXISTS) # repeat for modules -IF(NOT CMAKE_SHARED_MODULE_CREATE_Pascal_FLAGS) - SET(CMAKE_SHARED_MODULE_CREATE_Pascal_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS}) -ENDIF(NOT CMAKE_SHARED_MODULE_CREATE_Pascal_FLAGS) +if(NOT CMAKE_SHARED_MODULE_CREATE_Pascal_FLAGS) + set(CMAKE_SHARED_MODULE_CREATE_Pascal_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS}) +endif(NOT CMAKE_SHARED_MODULE_CREATE_Pascal_FLAGS) -IF(NOT CMAKE_SHARED_MODULE_Pascal_FLAGS) - SET(CMAKE_SHARED_MODULE_Pascal_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS}) -ENDIF(NOT CMAKE_SHARED_MODULE_Pascal_FLAGS) +if(NOT CMAKE_SHARED_MODULE_Pascal_FLAGS) + set(CMAKE_SHARED_MODULE_Pascal_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS}) +endif(NOT CMAKE_SHARED_MODULE_Pascal_FLAGS) -IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Pascal_FLAG) - SET(CMAKE_SHARED_MODULE_RUNTIME_Pascal_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG}) -ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Pascal_FLAG) +if(NOT CMAKE_SHARED_MODULE_RUNTIME_Pascal_FLAG) + set(CMAKE_SHARED_MODULE_RUNTIME_Pascal_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG}) +endif(NOT CMAKE_SHARED_MODULE_RUNTIME_Pascal_FLAG) -IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Pascal_FLAG_SEP) - SET(CMAKE_SHARED_MODULE_RUNTIME_Pascal_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG_SEP}) -ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Pascal_FLAG_SEP) +if(NOT CMAKE_SHARED_MODULE_RUNTIME_Pascal_FLAG_SEP) + set(CMAKE_SHARED_MODULE_RUNTIME_Pascal_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG_SEP}) +endif(NOT CMAKE_SHARED_MODULE_RUNTIME_Pascal_FLAG_SEP) if(NOT CMAKE_INCLUDE_FLAG_Pascal) #amazing, fpc: -I Add to include path @@ -96,14 +96,14 @@ # Copy C version of this flag which is normally determined in platform file. if(NOT CMAKE_SHARED_LIBRARY_SONAME_Pascal_FLAG) - set(CMAKE_SHARED_LIBRARY_SONAME_Pascal_FLAG ${CMAKE_SHARED_LIBRARY_SONAME_C_FLAG}) + set(CMAKE_SHARED_LIBRARY_SONAME_Pascal_FLAG ${CMAKE_SHARED_LIBRARY_SONAME_C_FLAG}) endif(NOT CMAKE_SHARED_LIBRARY_SONAME_Pascal_FLAG) 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.") set(CMAKE_Pascal_FLAGS "$ENV{FPFLAGS} ${CMAKE_Pascal_FLAGS_INIT}" CACHE STRING "Flags for Pascal compiler.") -INCLUDE(CMakeCommonLanguageInclude) +include(CMakeCommonLanguageInclude) # now define the following rule variables @@ -146,15 +146,15 @@ endif(NOT CMAKE_Pascal_CREATE_SHARED_LIBRARY) # create an Pascal shared module just copy the shared library rule -IF(NOT CMAKE_Pascal_CREATE_SHARED_MODULE) - SET(CMAKE_Pascal_CREATE_SHARED_MODULE ${CMAKE_Pascal_CREATE_SHARED_LIBRARY}) -ENDIF(NOT CMAKE_Pascal_CREATE_SHARED_MODULE) +if(NOT CMAKE_Pascal_CREATE_SHARED_MODULE) + set(CMAKE_Pascal_CREATE_SHARED_MODULE ${CMAKE_Pascal_CREATE_SHARED_LIBRARY}) +endif(NOT CMAKE_Pascal_CREATE_SHARED_MODULE) # create an Pascal static library (unsupported) -IF(NOT CMAKE_Pascal_CREATE_STATIC_LIBRARY) - SET(CMAKE_Pascal_CREATE_STATIC_LIBRARY +if(NOT CMAKE_Pascal_CREATE_STATIC_LIBRARY) + set(CMAKE_Pascal_CREATE_STATIC_LIBRARY "echo STATIC LIBRARIES ARE NOT SUPPORTED" "exit") -ENDIF(NOT CMAKE_Pascal_CREATE_STATIC_LIBRARY) +endif(NOT CMAKE_Pascal_CREATE_STATIC_LIBRARY) # compile a Pascal file into an object file if(NOT CMAKE_Pascal_COMPILE_OBJECT) @@ -192,18 +192,18 @@ if(CMAKE_Pascal_STANDARD_LIBRARIES_INIT) set(CMAKE_Pascal_STANDARD_LIBRARIES "${CMAKE_Pascal_STANDARD_LIBRARIES_INIT}" CACHE STRING "Libraries linked by default (usually handled internally).") - MARK_AS_ADVANCED(CMAKE_Pascal_STANDARD_LIBRARIES) + mark_as_advanced(CMAKE_Pascal_STANDARD_LIBRARIES) endif(CMAKE_Pascal_STANDARD_LIBRARIES_INIT) if(NOT CMAKE_NOT_USING_CONFIG_FLAGS) - SET (CMAKE_Pascal_FLAGS_DEBUG "${CMAKE_Pascal_FLAGS_DEBUG_INIT}" CACHE STRING - "Flags used by the compiler during debug builds.") - SET (CMAKE_Pascal_FLAGS_MINSIZEREL "${CMAKE_Pascal_FLAGS_MINSIZEREL_INIT}" CACHE STRING - "Flags used by the compiler during release minsize builds.") - SET (CMAKE_Pascal_FLAGS_RELEASE "${CMAKE_Pascal_FLAGS_RELEASE_INIT}" CACHE STRING - "Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).") - SET (CMAKE_Pascal_FLAGS_RELWITHDEBINFO "${CMAKE_Pascal_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING - "Flags used by the compiler during Release with Debug Info builds.") + set(CMAKE_Pascal_FLAGS_DEBUG "${CMAKE_Pascal_FLAGS_DEBUG_INIT}" CACHE STRING + "Flags used by the compiler during debug builds.") + set(CMAKE_Pascal_FLAGS_MINSIZEREL "${CMAKE_Pascal_FLAGS_MINSIZEREL_INIT}" CACHE STRING + "Flags used by the compiler during release minsize builds.") + set(CMAKE_Pascal_FLAGS_RELEASE "${CMAKE_Pascal_FLAGS_RELEASE_INIT}" CACHE STRING + "Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).") + set(CMAKE_Pascal_FLAGS_RELWITHDEBINFO "${CMAKE_Pascal_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING + "Flags used by the compiler during Release with Debug Info builds.") endif(NOT CMAKE_NOT_USING_CONFIG_FLAGS) mark_as_advanced(CMAKE_Pascal_FLAGS CMAKE_Pascal_FLAGS_DEBUG CMAKE_Pascal_FLAGS_MINSIZEREL