summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-07-15 11:35:47 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2008-07-15 11:35:47 -0400
commit04c369c6ab67bfa0d2c624f3ad9f9690e2ac9fd6 (patch)
tree23fd50b0a4fd8ac13215ce85ce74d6eee61a5393
parent8453005c5b25b8f26bbd061ccaac61ef6641f3bf (diff)
downloadcmake-04c369c6ab67bfa0d2c624f3ad9f9690e2ac9fd6.tar.gz
ENH: merge in fix for xcode and new version of find boost
-rw-r--r--CMakeLists.txt2
-rw-r--r--ChangeLog.manual3
-rw-r--r--Modules/FindBoost.cmake10
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx4
-rw-r--r--Tests/TryCompile/CMakeLists.txt33
5 files changed, 42 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 27fae0679a..857b4200bf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -354,7 +354,7 @@ ENDMACRO (CMAKE_BUILD_UTILITIES)
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 6)
SET(CMake_VERSION_PATCH 1)
-SET(CMake_VERSION_RC 8)
+SET(CMake_VERSION_RC 9)
# CVS versions are odd, if this is an odd minor version
# then set the CMake_VERSION_DATE variable
IF("${CMake_VERSION_MINOR}" MATCHES "[13579]$")
diff --git a/ChangeLog.manual b/ChangeLog.manual
index e8284b5e32..dcae9a44b5 100644
--- a/ChangeLog.manual
+++ b/ChangeLog.manual
@@ -1,3 +1,6 @@
+Changes in CMake 2.6.1 RC 9
+- Fix bug # 7316 Xcode double escaped define strings
+- FindBoost can now find the upcoming Boost 1.46
Changes in CMake 2.6.1 RC 8
- Fix build problem with missing cpack file
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 8fc73c696e..905e6720ad 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -12,8 +12,8 @@
# when new Boost versions are released.
#
# Currently this module searches for the following version numbers:
-# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1, 1.36.0,
-# 1.36.1
+# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1, 1.36,
+# 1.36.0, 1.36.1
#
# The components list needs to be the actual names of boost libraries, that is
# the part of the actual library files that differ on different libraries. So
@@ -36,7 +36,7 @@
# the boost include directory. The default list
# of version numbers is:
# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1,
-# 1.35, 1.35.0, 1.35.1, 1.36.0, 1.36.1
+# 1.35, 1.35.0, 1.35.1, 1.36, 1.36.0, 1.36.1
# If you want to look for an older or newer
# version set this variable to a list of
# strings, where each string contains a number, i.e.
@@ -105,8 +105,8 @@ if (Boost_FIND_VERSION_EXACT)
endif (Boost_FIND_VERSION_PATCH)
else (Boost_FIND_VERSION_EXACT)
set( _boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
- "1.36.1" "1.36.0" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" "1.34" "1.33.1"
- "1.33.0" "1.33" )
+ "1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0"
+ "1.34" "1.33.1" "1.33.0" "1.33" )
endif (Boost_FIND_VERSION_EXACT)
# The reason that we failed to find Boost. This will be set to a
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 6ae073b56d..c0a0af332b 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -452,7 +452,6 @@ cmGlobalXCodeGenerator::CreateXCodeSourceFile(cmLocalGenerator* lg,
lg->AppendFlags(flags, cmtarget.GetProperty("COMPILE_FLAGS"));
}
lg->AppendFlags(flags, sf->GetProperty("COMPILE_FLAGS"));
- cmSystemTools::ReplaceString(flags, "\"", "\\\"");
// Add per-source definitions.
this->AppendDefines(flags, sf->GetProperty("COMPILE_DEFINITIONS"), true);
@@ -1297,9 +1296,6 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
this->CurrentLocalGenerator->
AppendFlags(defFlags,
this->CurrentMakefile->GetDefineFlags());
- cmSystemTools::ReplaceString(defFlags, "\"", "\\\"");
- cmSystemTools::ReplaceString(flags, "\"", "\\\"");
- cmSystemTools::ReplaceString(cflags, "\"", "\\\"");
// Add preprocessor definitions for this target and configuration.
std::string ppDefs;
diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt
index 4667345bf1..c0662a9d12 100644
--- a/Tests/TryCompile/CMakeLists.txt
+++ b/Tests/TryCompile/CMakeLists.txt
@@ -25,6 +25,39 @@ MACRO(TEST_EXPECT_CONTAINS command expected)
ENDIF(NOT "${result}" MATCHES "${expected}")
ENDMACRO(TEST_EXPECT_CONTAINS command expected)
+
+# Write a simple test program with an include file
+WRITE_FILE( ${CMAKE_BINARY_DIR}/CMakeTmp/my_include.h "#define TEST_VALUE 0\n")
+WRITE_FILE( ${CMAKE_BINARY_DIR}/my_test.cxx "#include \"my_include.h\"\nint main() { return TEST_VALUE; }")
+
+SET(INC_STRING "-I \"${CMAKE_BINARY_DIR}/CMakeTmp\"")
+# Removing the quotes fixes the Xcode 3 bug, but this
+# will fail if ${CMAKE_BINARY_DIR} contains an spaces
+# SET(INC_STRING "-I ${CMAKE_BINARY_DIR}/CMakeTmp")
+
+TRY_RUN(my_test my_test_COMPILED
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}/my_test.cxx
+ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${INC_STRING}
+ OUTPUT_VARIABLE OUTPUT)
+
+
+# Display the results of the test and write compilation errors to a log
+IF(NOT my_test_COMPILED)
+ MESSAGE(FATAL_ERROR "Performing Try-Run - Test Compilation Failed")
+ WRITE_FILE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Performing Try-Run my_test failed to compile with the following output:\n"
+ "${OUTPUT}\n" APPEND)
+ELSE(NOT my_test_COMPILED)
+ IF(my_test)
+ MESSAGE("The test compiled but failed at run time")
+ ELSE(my_test)
+ MESSAGE("The test compiled and passed")
+ ENDIF(my_test)
+ENDIF(NOT my_test_COMPILED)
+
+
+
# try to compile a file that should compile
# also check that COPY_FILE works
TRY_COMPILE(SHOULD_PASS