equal
deleted
inserted
replaced
2 # NOTE, a generator may set CMAKE_Pascal_COMPILER before |
2 # NOTE, a generator may set CMAKE_Pascal_COMPILER before |
3 # loading this file to force a compiler. |
3 # loading this file to force a compiler. |
4 # use environment variable Pascal first if defined by user, next use |
4 # use environment variable Pascal first if defined by user, next use |
5 # the cmake variable CMAKE_GENERATOR_PASCAL which can be defined by a generator |
5 # the cmake variable CMAKE_GENERATOR_PASCAL which can be defined by a generator |
6 # as a default compiler |
6 # as a default compiler |
|
7 |
|
8 # NOTE: on Darwin cmake >= 2.8.11 until cmake <= 2.8.12.1 will add an incompatible |
|
9 # -F flag to <FLAGS> so you won't be able to use those versions with this script |
7 |
10 |
8 if(NOT CMAKE_Pascal_COMPILER) |
11 if(NOT CMAKE_Pascal_COMPILER) |
9 # prefer the environment variable FPC |
12 # prefer the environment variable FPC |
10 if($ENV{FPC} MATCHES ".+") |
13 if($ENV{FPC} MATCHES ".+") |
11 get_filename_component(CMAKE_Pascal_COMPILER_INIT $ENV{FPC} PROGRAM PROGRAM_ARGS CMAKE_Pascal_FLAGS_ENV_INIT) |
14 get_filename_component(CMAKE_Pascal_COMPILER_INIT $ENV{FPC} PROGRAM PROGRAM_ARGS CMAKE_Pascal_FLAGS_ENV_INIT) |
43 if(NOT CMAKE_Pascal_COMPILER_VERSION) |
46 if(NOT CMAKE_Pascal_COMPILER_VERSION) |
44 execute_process(COMMAND ${CMAKE_Pascal_COMPILER} -iV |
47 execute_process(COMMAND ${CMAKE_Pascal_COMPILER} -iV |
45 OUTPUT_VARIABLE CMAKE_Pascal_COMPILER_VERSION |
48 OUTPUT_VARIABLE CMAKE_Pascal_COMPILER_VERSION |
46 OUTPUT_STRIP_TRAILING_WHITESPACE |
49 OUTPUT_STRIP_TRAILING_WHITESPACE |
47 ) # we assume no error for something so simple |
50 ) # we assume no error for something so simple |
|
51 set(CMAKE_Pascal_COMPILER_ARG1 "-l- -v0ewn") |
48 endif(NOT CMAKE_Pascal_COMPILER_VERSION) |
52 endif(NOT CMAKE_Pascal_COMPILER_VERSION) |
49 mark_as_advanced(CMAKE_Pascal_COMPILER_VERSION) |
53 mark_as_advanced(CMAKE_Pascal_COMPILER_VERSION) |
50 |
54 |
51 get_filename_component(COMPILER_LOCATION "${CMAKE_Pascal_COMPILER}" PATH) |
55 get_filename_component(COMPILER_LOCATION "${CMAKE_Pascal_COMPILER}" PATH) |
52 |
56 |