[Bug 156901] [patch] devel/cmake breaks with CC containing spaces

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Sep 17 15:58:27 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=156901

groot at kde.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |groot at kde.org

--- Comment #11 from groot at kde.org ---
Works when specifying the compiler through the environment. In a sample
project, both of these build lines work:

    CC=cc cmake .. && make VERBOSE=1
    CC="/usr/bin/env THIS=THAT /usr/bin/cc" cmake .. && make VERBOSE=1

The CMake output for the latter is a little weird,

    -- Check for working C compiler: /usr/bin/env -- works

but not wrong. The OP notes this, as well. Current CMake even tells you, if you
try to use the command-line-definition approach, what is wrong:

cmake .. "-DCMAKE_C_COMPILER=/usr/bin/env THIS=THAT /usr/bin/cc"
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:2 (project):
  The CMAKE_C_COMPILER:

    /usr/bin/env THIS=THAT /usr/bin/cc

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.

This should be, as tcberner@ points out, picked up upstream, or filed under
"Don't Do That Then".

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the kde-freebsd mailing list