[CMake] Strange build environments (MSVC and GCC both)

Dixon, Shane Shane.Dixon at atmel.com
Tue Oct 27 17:56:09 EDT 2009


I've created this as an external project:

ExternalProject_Add( ExtSubProj
	URL "${CMAKE_CURRENT_SOURCE_DIR}/MySubProj"
	CMAKE_GENERATOR "NMake Makefiles"
	CMAKE_ARGS -DEMUL=ON
	INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR} )

I presume that I can go back later and also configure the project with CMAKE_GENERATOR "MinGW makefiles" or something that uses gcc when building in REAL mode.

Now the only part that I'm not quite sure how to handle is how to make other targets depend on this one.  This should build first before any other target runs, but I'm not quite sure how to do that.


--
Shane Dixon
Linux Engineer
Atmel Corporation 


-----Original Message-----
From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of Dixon, Shane
Sent: Tuesday, October 27, 2009 11:39 AM
To: cmake at cmake.org
Subject: [CMake] Strange build environments (MSVC and GCC both)

I'm trying to work with a vendor's strange build environment that uses gnumake and several (very annoying) Makefiles.  Part of the problem is that when the environment builds an emulator, it uses the MSVC toolchain.  Once you actually build the real module, it uses gcc so that the object can be deployed to a linux workstation.

 * How would be the best way to handle this in CMake?  
 
 * Should the two options be two different external projects that I include in some top-level project?  
 
 * I suppose I could also do something like add execute_process() commands that build using their toolchain, but how then do I make those commands become targets?  


--
Shane Dixon
Linux Engineer
Atmel Corporation 

_______________________________________________
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


More information about the CMake mailing list