Hello,
following my previous posting, I have identified the problem with Xcode generation. The following CMakeList.txt would generate correct Unix Makefiles but wrong Xcode project

Project(Test)
Cmake_Minimum_Required(VERSION 2.6)
Set(CMAKE_VERBOSE_MAKEFILE ON)
Set_source_files_properties(hello.cxx PROPERTIES
  COMPILE_FLAGS "-D_version_=\"10.5\"")
Add_Executable(hello hello.cxx)

The point is that the escaped quotes get "doubly escaped" in the Xcode project file

/* Begin PBXBuildFile section */
656B90656B90656B90000000 /* /Users/fca/cmaketest/hello.cxx */ = {isa = PBXBuildFile; fileRef = 656A00656A00656A00000000 /* /Users/fca/ cmaketest/hello.cxx */; settings = { COMPILER_FLAGS = "-D_version_=\ \"10.5\\""; }; };
/* End PBXBuildFile section */

Removing the double quotes "by hand" fixes the problem. Alternative solutions are to use single quotes. Or even add_definitions would of course do, even if it is global for all subdirectories. But still this is an inconsistency that should be fixed. Best,

Federico Carminati
CERN-PH
1211 Geneva 23
Switzerland
Tel: +41 22 76 74959
Fax: +41 22 76 79480
Mobile: +41 76 487 4843

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to