Re: [AD] cmake vc 9, profile mode

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


2009/7/15 Matthew Leverton <meffer@xxxxxxxxxx>:
>>cmake .. -G "Visual Studio 9 2008" -DCMAKE_BUILD_TYPE=Profile -DWANT_ALLOW_SSE=off
>
> Gives this at the end (repeated many times):
> ~~~
> Missing variable is:
> CMAKE_C_FLAGS_PROFILE
> CMake Error: Error required internal CMake variable not set, cmake may
> be not be built correctly.
> Missing variable is:
> CMAKE_EXE_LINKER_FLAGS_PROFILE
> CMake Error: Error required internal CMake variable not set, cmake may
> be not be built correctly.
> ~~~
>
> It still seems to create a usable project file.

But it won't pass any profiling flags to the compiler.  They should be added
near line 315 in CMakeLists.txt.

>
> Also, profile builds use /MT (static runtime) instead of /MD (dll). Is
> there any reason for that? It makes it incompatible with most third
> party add-ons.
>
> Finally, is there a way to enable /MT instead of /MD via a
> configuration to cmake in case one wants to avoid a dependency on the
> MSVC dlls?

Maybe something like this line, which we use for OS X.

    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-common")

Peter




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/