Changeset 212435 in webkit


Ignore:
Timestamp:
Feb 16, 2017 9:11:05 AM (7 years ago)
Author:
Konstantin Tokarev
Message:

[cmake] Use env command to set PYTHONPATH if cmake is new enough
https://bugs.webkit.org/show_bug.cgi?id=156833

Reviewed by Alex Christensen.

This change fixes 2 issues when CMake >= 3.1 is used:

  • When PYTHONPATH contains special characters, CMake adds quotes around

"PYTHONPATH=..." and produces broken build command in non-WIN32 case.

  • On WIN32, unix-like shell can be used instead of cmd.exe, but this case

cannot be easily detected in cmake.

  • Source/cmake/WebKitMacros.cmake:
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r212364 r212435  
     12017-02-16  Konstantin Tokarev  <annulen@yandex.ru>
     2
     3        [cmake] Use env command to set PYTHONPATH if cmake is new enough
     4        https://bugs.webkit.org/show_bug.cgi?id=156833
     5
     6        Reviewed by Alex Christensen.
     7
     8        This change fixes 2 issues when CMake >= 3.1 is used:
     9        - When PYTHONPATH contains special characters, CMake adds quotes around
     10        "PYTHONPATH=..." and produces broken build command in non-WIN32 case.
     11        - On WIN32, unix-like shell can be used instead of cmd.exe, but this case
     12        cannot be easily detected in cmake.
     13
     14        * Source/cmake/WebKitMacros.cmake:
     15
    1162017-02-15  Carlos Garcia Campos  <cgarcia@igalia.com>
    217
  • trunk/Source/cmake/WebKitMacros.cmake

    r212155 r212435  
    386386
    387387macro(MAKE_JS_FILE_ARRAYS _output_cpp _output_h _scripts _scripts_dependencies)
    388     if (WIN32)
     388    if (NOT CMAKE_VERSION VERSION_LESS 3.1)
     389        set(_python_path ${CMAKE_COMMAND} -E env "PYTHONPATH=${JavaScriptCore_SCRIPTS_DIR}")
     390    elseif (WIN32)
    389391        set(_python_path set "PYTHONPATH=${JavaScriptCore_SCRIPTS_DIR}" &&)
    390392    else ()
Note: See TracChangeset for help on using the changeset viewer.