bugThe FreeType Project - Bugs: bug #53815, Modify the 'disallow in-source...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #53815: Modify the 'disallow in-source builds' logic so I can extract freetype source into the binary directory

Submitter:  Steve Robinson <ssrobins>
Submitted:  Thu 03 May 2018 01:32:31 AM UTC
   
 
Severity:  3 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  morksig Open/Closed:  Closed
Planned Release:  None

Thu 03 May 2018 04:50:05 AM UTC, comment #1: 

Nikolaus, please have a look.

Werner LEMBERG <wl>
Group administrator
Thu 03 May 2018 01:32:31 AM UTC, original submission:  

In Freetype 2.9.1, there is the following logic in the CMakeLists.txt file to disallow in-source builds:

# Disallow in-source builds
if ("${PROJECT_BINARY_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
  message(FATAL_ERROR
    "In-source builds are not permitted!  Make a separate folder for"
    " building, e.g.,\n"
    "  cmake -E make_directory build\n"
    "  cmake -E chdir build cmake ..\n"
    "Before that, remove the files created by this failed run with\n"
    "  cmake -E remove CMakeCache.txt\n"
    "  cmake -E remove_directory CMakeFiles")
endif ()


For my project, I have CMake download the freetype tar source, untar it in the CMake binary directory and add the subdirectory to my CMake project so I can use the library without putting third-party code in my source tree.

I do configure my CMake project to do out-of-source builds, but because the project's source and binary directories are the same, I get the error.  I understand that I am doing an in-source build of freetype, but when I remove the above logic, it builds fine.  What's the harm?


How about changing the if statement to this:

if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")

This checks that the root-level CMake binary and source directories are not the same, but lets me untar and build the freetype source from the binary directory

Steve Robinson <ssrobins>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by morksig (Updated the item)
  • -email is unavailable- added by wl (Posted a comment)
  • -email is unavailable- added by ssrobins (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-05-09 morksig StatusNone Fixed
        Open/ClosedOpen Closed
    2018-05-03 wl Assigned toNone morksig

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code