MantisBT - CMake
View Issue Details
0014097CMakeCMakepublic2013-04-17 16:032013-04-18 08:22
pekarvm 
 
normalminoralways
closedno change required 
32 bit vm on 64 bit systemwindows xp 32bit VM on suse64bit
CMake 2.8.10.2 
 
0014097: variable UNIX set to 1 on windows xp in VM on linux host
I have a 32 bit windows XP VM (VirtualBox) on a OpenSuse 12.3 64 bit host. In the VM I have Visual C++ 2010 express.

For me the variable UNIX is set to 1. If I try to change that by force by:
set(UNIX 0)
set(WIN32 1)
set(MSVC 1)

Then the project seems to build. However, I have to correct the included libs, because they look like on unix, e.g.:
;-lWs2_32.lib
instead of:
Ws2_32.lib
No tags attached.
related to 0013756closed Brad King Infinite loop when reconfiguring with different CMAKE_C_COMPILER 
Issue History
2013-04-17 16:03pekarvmNew Issue
2013-04-17 16:24Brad KingNote Added: 0032901
2013-04-17 17:05pekarvmNote Added: 0032902
2013-04-18 02:54Rolf Eike BeerStatusnew => closed
2013-04-18 02:54Rolf Eike BeerResolutionopen => no change required
2013-04-18 08:21Brad KingNote Added: 0032904
2013-04-18 08:22Brad KingRelationship addedrelated to 0013756

Notes
(0032901)
Brad King   
2013-04-17 16:24   
Please run a session like this:

>type CMakeLists.txt
cmake_minimum_required(VERSION 2.8.9)
project(Issue14097 C)
message(STATUS "UNIX=[${UNIX}]")
message(STATUS "WIN32=[${WIN32}]")

>mkdir build
>cd build
>cmake .. -G"Visual Studio 10" --trace >cmake.log 2>&1

Then zip up the entire "build" directory and attach it here.
(0032902)
pekarvm   
2013-04-17 17:05   
I installed 2.8.9 and it worked.

Now went back to 2.8.10.2. Doing your test, it worked (UNIX not set, WIN32 1).

The problems was that I built the same project earlier on Linux. I triggered a "Delete Cache" in the GUI, but some stuff in the directory "CMakeFiles" was still there and it used that from the earlier linux build.

Sorry for bothering you.

Please close the issue. Or should "Delete Cache" delete "CMakeFiles" folder? A noob like me would expect that.
(0032904)
Brad King   
2013-04-18 08:21   
Delete Cache should delete the CMakeFiles folder where the CMake platform/language configuration results are stored. This was a bug in 2.8.10 that was fixed here:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1df09e57 [^]