diff options
author | Omair Majid <omair.majid@gmail.com> | 2017-06-02 16:55:14 -0400 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2017-06-02 22:55:14 +0200 |
commit | f7ce37729328d4f1061bd8bb52e3eecb0e49486c (patch) | |
tree | 9a3022ffed67fcf666259cbaa59393814e38a122 /src/CMakeLists.txt | |
parent | 23126aa5b7d6dc7b58301df7d0af1ccdf805224d (diff) | |
download | coreclr-f7ce37729328d4f1061bd8bb52e3eecb0e49486c.tar.gz coreclr-f7ce37729328d4f1061bd8bb52e3eecb0e49486c.tar.bz2 coreclr-f7ce37729328d4f1061bd8bb52e3eecb0e49486c.zip |
Add support for not breaking *nix build on warnings (#12039)
Add a build flag to make -Werror optional and let the build continue
even in the presence of warnings.
This option is very useful for anyone compiling with a different
(version of the) compiler. A different (version of the) compiler may
produce a different set of warnings and a piece of code that compiles
without warnings may emit warnings with a different (version of the)
compiler.
Resolves https://github.com/dotnet/coreclr/issues/8586
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9359580468..7c4cdcb91a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -53,9 +53,15 @@ else() ) endif(WIN32) +if(CRL_CMAKE_WARNINGS_ARE_ERRORS) + set(PYTHON_WARNING_FLAGS -Wall -Werror) +else() + set(PYTHON_WARNING_FLAGS -Wall) +endif(CLR_CMAKE_WARNINGS_ARE_ERRORS) + add_custom_command( COMMENT "Generating Eventing Files" - COMMAND ${PYTHON} -B -Wall -Werror ${GenEventFilesScript} ${GenEventArgs} --man "${VM_DIR}/ClrEtwAll.man" --exc "${VM_DIR}/ClrEtwAllMeta.lst" --dummy "${GENERATED_INCLUDE_DIR}/etmdummy.h" + COMMAND ${PYTHON} -B ${PYTHON_WARNING_FLAGS} ${GenEventFilesScript} ${GenEventArgs} --man "${VM_DIR}/ClrEtwAll.man" --exc "${VM_DIR}/ClrEtwAllMeta.lst" --dummy "${GENERATED_INCLUDE_DIR}/etmdummy.h" OUTPUT ${ScriptGeneratedEventFiles} DEPENDS ${GenEventFilesScript} "${VM_DIR}/ClrEtwAll.man" "${VM_DIR}/ClrEtwAllMeta.lst" "${CLR_DIR}/src/scripts/genXplatEventing.py" ) |