Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitly set CMAKE_XXX_FLAGS_DEBUG
Explicitly set the C/C++ CMake Debug flags (CMAKE_C_FLAGS_DEBUG / CMAKE_CXX_FLAGS_DEBUG) for all supported compilers, with optimization disabled. This allows us to use this variable to selectively force Debug flags (i.e. optimization off) for selected targets, such as unit tests. Change-Id: Iaafc3d8c8b289fa49105780944f71a890ce95edc Reviewed-on: http://review.couchbase.org/55457 Reviewed-by: Trond Norbye <trond.norbye@gmail.com> Tested-by: Trond Norbye <trond.norbye@gmail.com>
- Loading branch information
Showing
7 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# CMake modules | ||
|
||
Some brief description / explanation of the use of certain files and | ||
variables. | ||
|
||
|
||
## CouchbaseXXX.cmake files | ||
|
||
These files are used to define Couchbase-specific macros and | ||
variables. For example, they define the the various compiler flags for | ||
each supported compiler, supported memory allocator options, etc. | ||
|
||
### Couchbase<Compiler>Options.cmake | ||
|
||
These files define the default compilation flags for each of the | ||
various supported compilers. | ||
|
||
Descriptions of specific variables of interest: | ||
|
||
* CMAKE_CXX_FLAGS_RELEASE / CMAKE_CXX_FLAGS_RELWITH_DEBINFO: Compiler | ||
flags for Release and RelWIthDebInfo builds. Note that as of 4.0 we | ||
actually ship a RelWithDebInfo build (to maximise our ability to | ||
debug issues from the field) and hence | ||
CMAKE_CXX_FLAGS_RELWITH_DEBINFO are overridden to be as optimized | ||
as the normal Release flags, but keeping debug enabled. | ||
|
||
* CMAKE_CXX_FLAGS_DEBUG: Compiler flags for Debug builds. We override | ||
this to explicitly set Debug to have Optimization disabled (by | ||
default it just uses the implicit default). This allows us to use | ||
this variable to selectively force Debug flags (i.e. optimization | ||
off) for selected targets, such as unit tests. | ||
|
||
|
||
## FindCouchbaseXXX.cmake files | ||
|
||
These files are similar to the standard CMake FindXXX.cmake files, | ||
except Couchbase-specific files. The main purpose of the 'Couchbase' | ||
prefix is just to make it obvious which are ours and which are | ||
standard when used. |