This is the point where we say: just don't do in-source builds... :-)
Use separate directories for source and binary trees.
2 cents,
David
Brad King wrote:
Steve Johns wrote:
ELSE(CMAKE_CONFIGURATION_TYPES)
# Handle single-configuration generators.
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_D
Steve Johns wrote:
ELSE(CMAKE_CONFIGURATION_TYPES)
# Handle single-configuration generators.
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/traps_config.txt
${CMAKE_CURRENT_BINARY_DIR}/traps_config.txt COPYONLY)
ENDIF(CMAKE_CONFIGURATION_TYPES)
Be careful with this. For an in-so
At 03:47 PM 5/26/2006, Steve Johns wrote:
>IF(CMAKE_CONFIGURATION_TYPES)
> # Handle multi-configuration generators.
> FOREACH(config ${CMAKE_CONFIGURATION_TYPES})
>CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/traps_config.in
> ${CMAKE_CURRENT_BINARY_DIR}/${config}/traps_config.
There was a typo in my example: it should not have the comma between the
arguments. The trailing comma is being considered part of the file name!
Great eye, Brad!
So, here what I have now:
IF(CMAKE_CONFIGURATION_TYPES)
# Handle multi-configuration generators.
FOREACH(config ${CMAKE_CONFIG
Steve Johns wrote:
What is the exact CONFIGURE_FILE call you are using?
Here it is, cut and pasted:
IF(CMAKE_CONFIGURATION_TYPES)
# Handle multi-configuration generators.
FOREACH(config ${CMAKE_CONFIGURATION_TYPES})
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/traps_config.txt,
Forward-slashes are the way CMake keeps track of paths internally, and
they should work fine even on Windows.
That's what I expected, thanks for the confirmation.
What is the exact CONFIGURE_FILE
call you are using?
Here it is, cut and pasted:
IF(CMAKE_CONFIGURATION_TYPES)
# Handle mul
Steve Johns wrote:
Excellent! Thanks very much for this info.
I'm seeing a problem, though.
CMake is not finding my config file, even though it does exist.
CMake announces its search with forward-slash paths, but I'm in the VS
C++ IDE.
Is CMake not actually looking for:
c:\Temp\traps.p01\tru
You can use CONFIGURE_FILE to copy the file:
IF(CMAKE_CONFIGURATION_TYPES)
# Handle multi-configuration generators.
FOREACH(config ${CMAKE_CONFIGURATION_TYPES})
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/my.config.in,
${CMAKE_CURRENT_BINARY_DIR}/${config}/my.config)
E
Steve Johns wrote:
My app will depend on the presence of a config file at runtime.
It looks for this config file in the current directory where the app
started from.
I am using VC++ 7 and the Visual Studio IDE.
My config file checks out of svn into the same directory as my C++ source.
My goal
My app will depend on the presence of a config file at runtime.
It looks for this config file in the current directory where the app started
from.
I am using VC++ 7 and the Visual Studio IDE.
My config file checks out of svn into the same directory as my C++ source.
My goal is to copy the confi
10 matches
Mail list logo