[CMake] MSVC71 problems when upgrading to CMake 2.6.2
Bill Hoffman
bill.hoffman at kitware.com
Thu Oct 9 14:58:02 EDT 2008
Luke Kucalaba wrote:
> The attachment was shot down. I renamed to .png and reattached. So you
> will have to rename from .png to .zip when you download it. Maybe this
> will work? Any suggestions on how to post this project?
>
I should have looked at your example closer....
I think the problem is that you are using the CACHE. If you just
create local variables they will override the cache.
Something like this:
Set(CMAKE_CXX_FLAGS_DEBUG "/D _DEBUG /D WIN32 /DENABLE_EXEC_FLAG1
/DENABLE_EXEC_FLAG2" )
Set(CMAKE_CXX_FLAGS_RELEASE "/D NDEBUG /D WIN32 /DENABLE_EXEC_FLAG1
/DENABLE_EXEC_FLAG2" )
Set(CMAKE_EXE_LINKER_FLAGS "/SUBSYSTEM:CONSOLE" )
Set(CMAKE_MODULE_LINKER_FLAGS "/SUBSYSTEM:CONSOLE" )
Set(CMAKE_SHARED_LINKER_FLAGS "/SUBSYSTEM:CONSOLE" )
Add_Executable(Exec WIN32 Exec.cpp)
If you remove the CACHE force stuff from your example everything works
fine. Not really sure how this worked before....
-Bill
More information about the CMake
mailing list