[Cmake] RE: Build dir being a *subdir* of source?

Schumacher, Gordon gordon_schumacher at maxtor.com
Thu, 29 Apr 2004 14:06:55 -0600


Y'all can disregard this message; it works if I use the cross-compile tools
I built for CygWin to build DOS32 apps, instead of the native DJGPP tools.
It appears to be a problem with pathnames with the DJGPP toolset...

# -----Original Message-----
# From: Schumacher, Gordon 
# Sent: Thursday, April 29, 2004 12:08 PM
# To: CMake List (E-mail)
# Subject: Build dir being a *subdir* of source?
# 
# 
# Is anyone out there running in a configuration where their 
# build directory
# is a subdirectory of their top-level source directory?
# 
# What I'd like to do is have my top-level project dir have, say "src",
# "lib", "include", "doc", and "obj" as subdirectories within 
# it.  The user
# calls CMake within "obj", pointing it at the top-level dir.  
# (Obviously
# there is no CMakeLists.txt in "obj".)
# 
# Is anyone running with such a configuration?  When I do this, 
# CMake seems
# to choke on the "make" step of a UNIX makefiles build on the 
# first SUBDIRS
# call:
# 
# make.exe[3]: Entering directory `j:/Max_LIB/obj/dos32/Debug/src'
# Building dependencies. cmake.depends...
# D:/progra~1/cmake-devel/bin/cmake.exe -SJ:/Max_Lib/src 
# -OJ:/Max_LIB/obj/dos32/Debug/src -HJ:/Max_Lib 
# -BJ:/Max_LIB/obj/dos32/Debug
# make.exe[3]: *** [cmake.depends] Error -1
# make.exe[3]: Leaving directory `j:/Max_LIB/obj/dos32/Debug/src'
# make.exe[2]: *** [default_target] Error 2
# make.exe[2]: Leaving directory `j:/Max_LIB/obj/dos32/Debug/src'
# make.exe[1]: *** [default_target_src] Error 2
# make.exe[1]: Leaving directory `j:/Max_LIB/obj/dos32/Debug'
# make.exe: *** [default_target] Error 2
# 
# It works okay if I build it from "J:/test" instead of
# "j:/Max_LIB/obj/dos32/Debug", but an otherwise identical 
# configuration.
# 
# The only thing that I'm doing "weird" that I can think of is this:
# SET(EXECUTABLE_OUTPUT_PATH 
# ${CMAKE_HOME_DIRECTORY}/bin/${TARGET} CACHE PATH "Configure 
# the executable output path.")
# SET(LIBRARY_OUTPUT_PATH ${CMAKE_HOME_DIRECTORY}/lib/${TARGET} 
# CACHE PATH "Configure the library output path.")
# 
# Any thoughts?
#