<div dir="ltr">


        
        <span></span>
        
        

<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%">
<font face="arial, sans-serif">Hi Community,</font></p>
<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%"><font face="arial, sans-serif"><br></font></p><p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%"><font face="arial, sans-serif">I
am building Flang out of tree but getting error related to
add_flang_library i.e. </font>

</p><p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%"><font face="arial, sans-serif">-------------------------------------------------------------------------------------------------------<br></font></p><p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%"><font face="arial, sans-serif">Make
Warning (dev) in CMakeLists.txt:</font></p>
<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%">  <font face="arial, sans-serif">No
project() command is present.  The top-level CMakeLists.txt file must</font></p>
<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%">  <font face="arial, sans-serif">contain
a literal, direct call to the project() command.  Add a line of</font></p>
<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%">  <font face="arial, sans-serif">code
such as</font></p>
<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%"><font face="arial, sans-serif">project(ProjectName)</font>
</p>
<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%">  <font face="arial, sans-serif">near
the top of the file, but after cmake_minimum_required().</font></p>

<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%">  <font face="arial, sans-serif">CMake
is pretending there is a "project(Project)" command on the
first</font></p>
<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%">  <font face="arial, sans-serif">line.</font></p>
<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%"><font face="arial, sans-serif">This
warning is for project developers.  Use -Wno-dev to suppress it.</font></p>

<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%"><font face="arial, sans-serif"><b>CMake
Error at Common/CMakeLists.txt:2 (add_flang_library):</b></font></p>
<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%">  <font face="arial, sans-serif"><b>Unknown
CMake command "add_flang_library".</b></font></p>
<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%"><font face="arial, sans-serif">CMake
Warning (dev) in CMakeLists.txt:</font></p>
<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%">  <font face="arial, sans-serif">No
cmake_minimum_required command is present.  A line of code such as</font></p>
<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%"><font face="arial, sans-serif">cmake_minimum_required(VERSION 3.16)</font>
</p><p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%"><font face="arial, sans-serif">should
be added at the top of the file.  The version specified may be lower</font>
</p><p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%">  <font face="arial, sans-serif">if
you wish to support older CMake versions for this project.  For more</font></p>
<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%">  <font face="arial, sans-serif">information
run "cmake --help-policy CMP0000".</font></p>
<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%"><font face="arial, sans-serif">This
warning is for project developers.  Use -Wno-dev to suppress it.</font></p>

<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%"><font face="arial, sans-serif">--
Configuring incomplete, errors occurred!</font></p>
<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%">-------------------------------------------------------------------------------------------------------<br>

</p>
<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%"><br>

</p>
<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%"><font face="arial, sans-serif"><b>Command
used for building </b></font><font face="arial, sans-serif"><b>Flang
</b></font><font face="arial, sans-serif"><b>: </b></font><code class="gmail-western" style="font-family:"Liberation Mono",monospace"><font face="arial, sans-serif">cmake
-DLLVM_DIR=llvm-project/build/lib/cmake/llvm
-DCLANG_DIR=llvm-project/build/lib/cmake/clang
-DMLIR_DIR=llvm-project/build/lib/cmake/mlir -DCMAKE_BUILD_TYPE=Debug
-DCMAKE_INSTALL_PREFIX=llvm-project/flang/build ../lib</font></code></p>

<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%"><code class="gmail-western" style="font-family:"Liberation Mono",monospace"><font face="arial, sans-serif">Clang,
mlir and llvm were buil</font></code><code class="gmail-western" style="font-family:"Liberation Mono",monospace"><font face="arial, sans-serif">t</font></code><code class="gmail-western" style="font-family:"Liberation Mono",monospace"><font face="arial, sans-serif">
in release mode before building Flang.</font></code></p>
<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%"><code class="gmail-western" style="font-family:"Liberation Mono",monospace"><font face="arial, sans-serif">Please
guide.</font></code>
</p>
<p style="margin-bottom:0cm;line-height:100%;background:transparent none repeat scroll 0% 0%"><code class="gmail-western" style="font-family:"Liberation Mono",monospace"><font face="arial, sans-serif">Thanks</font></code></p>

</div>