[CMake] Problem with linker on win32

Rolf Eike Beer eike at sf-mail.de
Fri Sep 2 11:36:39 EDT 2011


Some general nitpicks, no idea if they are related to your problem.

> cmake_minimum_required(VERSION 2.8)
> 
> include_directories(o:/devstudio/vc98/include)
> include_directories(o:/rw/7.0)
> 
> set(CMAKE_VERBOSE_MAKEFILE ON)
> 
> set(CMAKE_BUILD_TYPE DEBUG)

Overriding the build type from the makefile is considered bad practice. A user 
that specifies a build type on command line will get unexpected results as it 
is not honored.

> file (
> 			GLOB
> 			UtgLOOP
> 			../UtgLOOP/*.?xx
> 			)
> file (
> 			GLOB
> 			UtgRessources
> 			../UtgRessources/*.?xx
> 			)
> 
> file (
> 			GLOB
> 			UtgRessourcesObj
> 			../UtgRessources/*.o
> 			)

Using file(GLOB ...) for sourcefiles is asking for trouble. It will not detect 
e.g. when you add source files to the directory. Where are these object files 
coming from? Are they prebuilt somewhere outside the project?

> file (
> 	GLOB
> 	exeUtg_SRC
> 	../exeUtg/*.?xx
> )
> 
> add_executable( exeUtgLibelles
> 	${exeUtgLibelles_SRC}
> )

The variable names do not match.

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110902/f84f5d14/attachment.pgp>


More information about the CMake mailing list