[CMake] Windows build inconsistency...

Jean-Christophe Fillion-Robin jchris.fillionr at kitware.com
Thu Jun 2 19:10:18 EDT 2011


Just tested it on linux and the same remark applies.

//-------------------------
Case1:
mkdir TestCase1 && mkdir TestCase1/Debug && echo "PROJECT(foo)" >
TestCase1/CMakeLists.txt && cd TestCase1/Debug && cmake ../CMakeLists.txt

Output:
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/local/bin/gcc
-- Check for working C compiler: /usr/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/local/bin/c++
-- Check for working CXX compiler: /usr/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to:
/home/jchris/Projects/TestInSource/TestCase1

//-------------------------
Case2:
mkdir TestCase2 && mkdir TestCase2/Debug && echo "PROJECT(foo)" >
TestCase2/CMakeLists.txt && cd TestCase2/Debug && cmake ..

Output
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/local/bin/gcc
-- Check for working C compiler: /usr/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/local/bin/c++
-- Check for working CXX compiler: /usr/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to:
/home/jchris/Projects/TestInSource/TestCase2/Debug

Jc

On Thu, Jun 2, 2011 at 6:29 PM, The Novice Coder <cmake at randmsystems.com>wrote:

> I've noticed an inconsistency in CMake's generation..  For example I go
> through the following sequence:
>
> cd \Project
> mkdir Debug
> cd Debug
>
> Then I either:
>
> cmake -G "Visual Studio 9 2008" -DCMAKE_BUILD_TYPE=Debug ..\CMakeLists.txt
>
> It will generate, and then place the project files in \Project.
>
>
> But if I use:
>
> cmake -G "Visual Studio 9 2008" -DCMAKE_BUILD_TYPE=Debug ..
>
> It will generate, and then place the project files in \Project\Debug
>
>
> Why are these different?
> Are the differences expected behavior?
> I'm a bit confused..
>
> Thanks!
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
+1 919 869 8849
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110602/d2d48aff/attachment-0001.htm>


More information about the CMake mailing list