<div dir="ltr">Thanks for the help!<div><br></div><div>It still runs Release mode:<br><div><br></div><div>Here's my project: </div><div><br></div><div><a href="https://github.com/acgetchell/CDT-plusplus">https://github.com/acgetchell/CDT-plusplus</a></div><div><br></div><div><p style="margin:0px;font-size:11px;font-family:Menlo">┌─[<span style="color:rgb(52,189,38)"><b>adam</b></span>][<span style="color:rgb(52,189,38)">Hapkido</span>][<span style="color:rgb(52,189,38)"><b>±</b></span>][master <span style="color:rgb(195,55,32)"><b>✗</b></span>][<span style="color:rgb(52,187,199)">~/CDT-plusplus</span>]</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">└─▪ tree</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">.</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">|____.git</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____config</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____description</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____HEAD</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____hooks</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____applypatch-msg.sample</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____commit-msg.sample</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____post-update.sample</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____pre-applypatch.sample</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____pre-commit.sample</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____pre-push.sample</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____pre-rebase.sample</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____prepare-commit-msg.sample</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____update.sample</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____index</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____info</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____exclude</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____logs</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____HEAD</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____refs</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | | |____heads</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | | | |____master</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | | |____remotes</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | | | |____origin</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | | | | |____HEAD</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____objects</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____info</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____pack</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | | |____pack-a9db5eb5c90025a8ca13bddf15822cb0e57cbead.idx</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | | |____pack-a9db5eb5c90025a8ca13bddf15822cb0e57cbead.pack</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____packed-refs</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____refs</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____heads</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | | |____master</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____remotes</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | | |____origin</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | | | |____HEAD</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____tags</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">|____.gitignore</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">|____.travis-linux.yml</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">|____.travis-macosx.yml</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">|____.travis.yml</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">|____build.sh</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">|____CMakeLists.txt</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">|____Doxyfile</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">|____LICENSE</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">|____README.md</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">|____scan-build.sh</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">|____src</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____cdt.cpp</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____Delaunay.h</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____docopt</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____docopt.cpp</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____docopt.h</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____docopt_private.h</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____docopt_util.h</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____docopt_value.h</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____examples</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | | |____naval_fate.cpp</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____LICENSE-Boost-1.0</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____LICENSE-MIT</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____main.cpp</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____README.rst</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____run_testcase.cpp</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____run_tests.py</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| | |____testcases.docopt</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____grid_d.cpp</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____grid_d.h</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____periodic_3_complex.h</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____periodic_3_triangulations.h</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____Point.h</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____S3Action.h</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____S3ErgodicMoves.h</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____S3Triangulation.h</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____sphere_d.h</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____utilities.h</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">|____unittests</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____.gitignore</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____main.cpp</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____PointTest.cpp</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____S3BulkActionTest.cpp</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____S3ErgodicMovesTest.cpp</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____S3TetrahedronTest.cpp</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____SdTriangulationTest.cpp</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____SphereTest.cpp</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____Triangulated2SphereTest.cpp</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">| |____VertexTest.cpp</p></div><div><br></div><div><p style="margin:0px;font-size:11px;font-family:Menlo">┌─[<span style="color:rgb(52,189,38)"><b>adam</b></span>][<span style="color:rgb(52,189,38)">Hapkido</span>][<span style="color:rgb(52,189,38)"><b>±</b></span>][master <span style="color:rgb(195,55,32)"><b>✗</b></span>][<span style="color:rgb(52,187,199)">~/CDT-plusplus</span>]</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">└─▪ mkdir build-d</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">┌─[<span style="color:rgb(52,189,38)"><b>adam</b></span>][<span style="color:rgb(52,189,38)">Hapkido</span>][<span style="color:rgb(52,189,38)"><b>±</b></span>][master <span style="color:rgb(195,55,32)"><b>✗</b></span>][<span style="color:rgb(52,187,199)">~/CDT-plusplus</span>]</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">└─▪ cd build-d</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(52,187,199)"><span style="color:rgb(0,0,0)">┌─[</span><span style="color:rgb(52,189,38)"><b>adam</b></span><span style="color:rgb(0,0,0)">][</span><span style="color:rgb(52,189,38)">Hapkido</span><span style="color:rgb(0,0,0)">][</span><span style="color:rgb(52,189,38)"><b>±</b></span><span style="color:rgb(0,0,0)">][master </span><span style="color:rgb(195,55,32)"><b>✗</b></span><span style="color:rgb(0,0,0)">][</span>~/CDT-plusplus/build-d<span style="color:rgb(0,0,0)">]</span></p>
<p style="margin:0px;font-size:11px;font-family:Menlo">└─▪ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=out ..</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- The C compiler identification is AppleClang 6.0.0.6000056</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- The CXX compiler identification is AppleClang 6.0.0.6000056</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Check for working C compiler: /usr/bin/cc</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Check for working C compiler: /usr/bin/cc -- works</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Detecting C compiler ABI info</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Detecting C compiler ABI info - done</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Check for working CXX compiler: /usr/bin/c++</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Check for working CXX compiler: /usr/bin/c++ -- works</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Detecting CXX compiler ABI info</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Detecting CXX compiler ABI info - done</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Build type: Release</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- USING CXXFLAGS = ' -O3 -DNDEBUG'</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- USING EXEFLAGS = ' -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib '</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Targetting Unix Makefiles</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Using /usr/bin/c++ compiler.</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- DARWIN_VERSION=14</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Mac Leopard detected</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Requested component: Core</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Requested component: MPFR</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Requested component: GMP</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Found Eigen3: /usr/local/include/eigen3 (found suitable version "3.2.4", minimum required is "3.1.0") </p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Found Intel TBB</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Configuring done</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Generating done</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">-- Build files have been written to: /Users/adam/CDT-plusplus/build-d</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(52,187,199)"><span style="color:rgb(0,0,0)">┌─[</span><span style="color:rgb(52,189,38)"><b>adam</b></span><span style="color:rgb(0,0,0)">][</span><span style="color:rgb(52,189,38)">Hapkido</span><span style="color:rgb(0,0,0)">][</span><span style="color:rgb(52,189,38)"><b>±</b></span><span style="color:rgb(0,0,0)">][master </span><span style="color:rgb(195,55,32)"><b>✗</b></span><span style="color:rgb(0,0,0)">][</span>~/CDT-plusplus/build-d<span style="color:rgb(0,0,0)">]</span></p></div></div><div><span style="color:rgb(0,0,0)"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 25, 2015 at 1:37 AM, J Decker <span dir="ltr"><<a href="mailto:d3ck0r@gmail.com" target="_blank">d3ck0r@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">mkdir build-d<div>cd build-d</div><div>cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=out ../your/source/procject</div><div>cmake --build . </div><div>cd ..</div><div><br></div><div>mkdir build-r<div>cd build-r</div><div>cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=out ../your/source/procject</div><div>cmake --build . --target install</div><div>cd ..</div></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 25, 2015 at 1:16 AM, Adam Getchell <span dir="ltr"><<a href="mailto:adam.getchell@gmail.com" target="_blank">adam.getchell@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks for your reply.<div><br></div><div>I'm not sure I follow your answer. I do delete the directory each time I build, but I'm still not understanding how you're building release or debug versions to begin with.</div><div><br></div><div>I'm just automatically getting Release, unless I edit CMakeCache.txt after I've built once.</div><div><br></div><div>I just checked CGAL_CreateSingleSourceCGALProgram.cmake which is invoked in my CMakeLists.txt, but I do not see it setting the build type to Release.</div><div><br></div><div><a href="https://github.com/acgetchell/CDT-plusplus/blob/master/CMakeLists.txt" target="_blank">https://github.com/acgetchell/CDT-plusplus/blob/master/CMakeLists.txt</a><br></div><div><br></div><div><br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 24, 2015 at 12:20 PM, J Decker <span dir="ltr"><<a href="mailto:d3ck0r@gmail.com" target="_blank">d3ck0r@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I use a different directory to build release and debug versions....<div><br><div>if you didn't delete, then when it goes to build partial things, the .obj files will still be newer than the .c files and will cause mixed release-debug builds which generally results in bizarre crashes.</div><div>Once chosen, can't change the build type of a build; although if you could it should do a clean also.</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Feb 24, 2015 at 11:42 AM, Adam Getchell <span dir="ltr"><<a href="mailto:adam.getchell@gmail.com" target="_blank">adam.getchell@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hello all,<div><br></div><div>I've browsed this thread:</div><div><br></div><div><a href="http://www.cmake.org/pipermail/cmake/2008-September/023808.html" target="_blank">http://www.cmake.org/pipermail/cmake/2008-September/023808.html</a></div><div><br></div><div>But it doesn't work. My project is set to Release regardless, whether I do:</div><div><br></div><div><div>project( CDT-plusplus_ )</div><div>set(CMAKE_BUILD_TYPE RelWithDebInfo)</div></div><div><br></div><div>Or:</div><div><br></div><div><div>#</div><div># If the user specifies -DCMAKE_BUILD_TYPE on the command line, take their definition</div><div># and dump it in the cache along with proper documentation, otherwise set CMAKE_BUILD_TYPE</div><div># to Debug prior to calling PROJECT()</div><div>#</div><div>IF(DEFINED CMAKE_BUILD_TYPE)</div><div>   SET(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose the type of</div><div>build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug</div><div>Release RelWithDebInfo MinSizeRel.")</div><div>ELSE()</div><div>   SET(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build,</div><div>options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release</div><div>RelWithDebInfo MinSizeRel.")</div><div>ENDIF()</div><div><br></div><div>project( CDT-plusplus_ )</div></div><div><br></div><div>The only way I can change the build type is by going into my build directory and editing CMakeCache.txt. However, I use an out of source build, so my build directory is generated automatically by scripts such as:</div><div><br></div><div><a href="https://github.com/acgetchell/CDT-plusplus/blob/master/scan-build.sh" target="_blank">https://github.com/acgetchell/CDT-plusplus/blob/master/scan-build.sh</a><br></div><div><br></div><div>What's the correct method for being able to set the type of build via the command line?<span><font color="#888888"><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div>Adam Getchell</div><div><a href="http://about.me/adamgetchell" target="_blank">about.me/adamgetchell</a></div>"Invincibility is in oneself, vulnerability in the opponent." -- Sun Tzu</div></div>
</font></span></div></div>
<br></div></div>--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div>Adam Getchell</div><div><a href="http://about.me/adamgetchell" target="_blank">about.me/adamgetchell</a></div>"Invincibility is in oneself, vulnerability in the opponent." -- Sun Tzu</div></div>
</div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Adam Getchell</div><div><a href="http://about.me/adamgetchell" target="_blank">about.me/adamgetchell</a></div>"Invincibility is in oneself, vulnerability in the opponent." -- Sun Tzu</div></div>
</div>