<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>13837</bug_id>
          
          <creation_ts>2020-03-18 16:08:20 +0000</creation_ts>
          <short_desc>cmake: changing OECMAKE_GENERATOR needs to force do_configure to start with a clean ${B} dir</short_desc>
          <delta_ts>2020-03-18 18:28:33 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>3.0.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Laplante">mostthingsweb</reporter>
          <assigned_to name="Chris Laplante">mostthingsweb</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>pascal.bach</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>86746</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Laplante">mostthingsweb</who>
    <bug_when>2020-03-18 16:08:20 +0000</bug_when>
    <thetext>Changing the generator in a CMake recipe needs to somehow clear out ${B} and force do_configure to start from scratch. Otherwise you get errors from CMake like:

    CMake Error: Error: generator : Ninja
    Does not match the generator used previously: Unix Makefiles
    Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.

Perhaps something like:

    do_patch[vardeps] += &quot;OECMAKE_GENERATOR&quot;

but maybe there is a more elegant way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86747</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Laplante">mostthingsweb</who>
    <bug_when>2020-03-18 18:28:33 +0000</bug_when>
    <thetext>My bad, I was using a version of cmake.bbclass that was missing this part:



    if [ &quot;${S}&quot; != &quot;${B}&quot; ]; then
        rm -rf ${B}
        mkdir -p ${B}
        cd ${B}
    else
        find ${B} -name CMakeFiles -or -name Makefile -or -name cmake_install.cmake -or -name CMakeCache.txt -delete
    fi


Sorry for the noise.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>