Good to know. This is what I did at the end. Thanks,
Federico Carminati
CERN-PH
1211 Geneva 23
Switzerland
Tel: +41 22 76 74959
Fax: +41 22 76 79480
Mobile: +41 76 487 4843
On 16 Jul 2008, at 20:30, Bill Hoffman wrote:
Carminati Federico wrote:
Hello,
The following simple CMakeLists.txt works when generating unix
makefiles but fails when generating xcode project:
# -*- mode: cmake -*-
Project(Test)
Cmake_Minimum_Required(VERSION 2.6)
Set(CMAKE_VERBOSE_MAKEFILE ON)
Set(DATEFLAGS "-D`uname` -Dlong64=\"long long\"")
Set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${DATEFLAGS})
Add_Executable(hello hello.cxx)
I am using the cvs version of cmake. The problem is that the
compilation lines becomes
-D`uname` "-Dlong64=long long"
in the xcode project, while it is
-D`uname` -Dlong64="long long"
in the Unix makefile. I know that what I am doing is not elegant
and I should rather execute the uname command and so on, however
fact is that cmake is inconsistent in the two cases. Best,
Back tick commands are not supported in cmake. You should use
execute_process and capture the output.
-Bill
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake