Skip to content

Commit

Permalink
Do not modify cache's CMAKE_CXX_FLAGS_RELEASE when configuring Ceres
Browse files Browse the repository at this point in the history
Otherwise you'll have infinite appending of Ceres-specific flags
on every saving of any CmakeLists.txt.
  • Loading branch information
sergeyvfx committed Apr 7, 2013
1 parent 45edb50 commit d2a7ee6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/third_party/ceres/CMakeLists.txt
Expand Up @@ -603,8 +603,7 @@ IF (CMAKE_BUILD_TYPE STREQUAL "Release")
ENDIF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
ENDIF (${BUILD_ANDROID})
ENDIF (CMAKE_COMPILER_IS_GNUCXX)
SET (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CERES_CXX_FLAGS}"
CACHE STRING "Release mode flags to the C++ Compiler" FORCE)
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CERES_CXX_FLAGS}")
ENDIF (CMAKE_BUILD_TYPE STREQUAL "Release")

# After the tweaks for the compile settings, disable some warnings on MSVC.
Expand Down
4 changes: 4 additions & 0 deletions src/third_party/ceres/README.libmv
Expand Up @@ -21,3 +21,7 @@ Local modifications:
conflict bewteen libmv's jet test and ceres's jet test. Change their
path to ${LIBMV_TESTS_OUTPUT_DIR}/ceres. Alsotweaked path to data
files.

- Do not modify cache's CMAKE_CXX_FLAGS_RELEASE and only update it
for Ceres subfolder. Otherwise you'll have infinite appending of
Ceres-specific flags on every saving of any CmakeLists.txt.

0 comments on commit d2a7ee6

Please sign in to comment.