[cmake-developers] review: pascal language supported

Brad King brad.king at kitware.com
Tue Mar 26 08:57:14 EDT 2013


On 03/25/2013 09:19 PM, Vittorio Giovara wrote:
> If you can see here I have a build system ready and working
> https://code.google.com/p/hedgewars/source/browse/cmake_modules/CMakeDeterminePascalCompiler.cmake?name=cmake_pascal
> https://code.google.com/p/hedgewars/source/browse/cmake_modules/CMakePascalCompiler.cmake.in?name=cmake_pascal
> https://code.google.com/p/hedgewars/source/browse/cmake_modules/CMakePascalInformation.cmake?name=cmake_pascal
> https://code.google.com/p/hedgewars/source/browse/cmake_modules/CMakeTestPascalCompiler.cmake?name=cmake_pascal

Great start, thanks for working on this.  I just took a quick look.

In order to prepare versions suitable for consideration upstream
(but not suitable for standalone use with CMake < 2.8.11) we will
need at least the following:

* Update CMakeDeterminePascalCompiler.cmake to account for
  this refactoring:

   http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=796e3373

  and drop the test against the CMake version since it will
  come with CMake when upstreamed.

* Update all module files for our recent sweeping style changes:

   http://cmake.org/gitweb?p=cmake.git;a=commit;h=77543bde
   http://cmake.org/gitweb?p=cmake.git;a=commit;h=9db31162

* Update code to assume the <TARGET> fix.
  Drop all use of EXECUTABLE_OUTPUT_PATH.

* We'll need to figure out what to do about the ld tool.
  This will not work in general:

   #when you have multiple ld installation make sure you get the one bundled with the system C compiler
   include(Platform/${CMAKE_SYSTEM_NAME}-GNU-C.cmake OPTIONAL)

  Other ideas?

> Right now I'm targeting uniquely Freepascal compiler

We need a way to detect a "compiler id" much like is done with
the preprocessor for C, CXX, and Fortran.  Without a preprocessor
we can still use the "vendor" approach here:

 http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CMakeDetermineCompilerId.cmake;hb=v2.8.10.2#l390

that runs the compiler with various id flags and reads the output.

Of course upstreaming will require test cases too.

Thanks,
-Brad



More information about the cmake-developers mailing list