aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/perlcore
diff options
context:
space:
mode:
authorGravatar Alexey Sokolov2017-05-24 10:04:20 +0100
committerGravatar Dessa2017-05-24 11:04:20 +0200
commitf5d172c869295ef9fff2e3de524690e523dc5d42 (patch)
treea85ed69ce7bf9234729e4e99028337c1ae3c6829 /src/modules/perlcore
parentappveyor: fix zlib VS version (diff)
downloadKVIrc-f5d172c869295ef9fff2e3de524690e523dc5d42.tar.gz
KVIrc-f5d172c869295ef9fff2e3de524690e523dc5d42.tar.bz2
KVIrc-f5d172c869295ef9fff2e3de524690e523dc5d42.zip
Build also in debug mode for windows (#2192)
* Build also in debug mode for windows See #2191 * Don't mix /Od and -O2 on windows build. -O2 comes from perl * Reindent perlcore CMakeLists * Fix debug python build on windows * Rearrange environment vars in appveyor * Try to publish pdb files too * install qts and kvirc's debug pdbs in debug config * use TARGET_PDB_FILE instead
Diffstat (limited to 'src/modules/perlcore')
-rw-r--r--src/modules/perlcore/CMakeLists.txt42
1 files changed, 22 insertions, 20 deletions
diff --git a/src/modules/perlcore/CMakeLists.txt b/src/modules/perlcore/CMakeLists.txt
index 82652138a..7abf88ac9 100644
--- a/src/modules/perlcore/CMakeLists.txt
+++ b/src/modules/perlcore/CMakeLists.txt
@@ -12,14 +12,14 @@ if(COMPILE_PERL_SUPPORT)
OUTPUT_VARIABLE PERL_COMPILE_FLAGS
)
-if(CMAKE_COMPILER_IS_GNUCXX)
- # GCC whines because perl isn't extremely C++11 compliant
- set(PERL_COMPILE_FLAGS "${PERL_COMPILE_FLAGS} -Wno-literal-suffix")
-elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
- # If the perl version is too old, clang will throw errors due to C++11
- # incompatibilities
- set(PERL_COMPILE_FLAGS "${PERL_COMPILE_FLAGS} -Wno-reserved-user-defined-literal")
-endif()
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ # GCC whines because perl isn't extremely C++11 compliant
+ set(PERL_COMPILE_FLAGS "${PERL_COMPILE_FLAGS} -Wno-literal-suffix")
+ elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+ # If the perl version is too old, clang will throw errors due to C++11
+ # incompatibilities
+ set(PERL_COMPILE_FLAGS "${PERL_COMPILE_FLAGS} -Wno-reserved-user-defined-literal")
+ endif()
#remove new line characters
string(REGEX REPLACE "(\r?\n)+$" "" PERL_COMPILE_FLAGS ${PERL_COMPILE_FLAGS})
@@ -32,19 +32,21 @@ endif()
OUTPUT_VARIABLE PERL_LINK_FLAGS
)
-if(MSVC)
- # breaks with -nodefaultlib
- string(REPLACE " -nodefaultlib" "" PERL_LINK_FLAGS "${PERL_LINK_FLAGS}")
-endif()
+ if(MSVC)
+ # breaks with -nodefaultlib
+ string(REPLACE " -nodefaultlib" "" PERL_LINK_FLAGS "${PERL_LINK_FLAGS}")
+ # conflicts with opt level set by user, especially in debug mode
+ string(REPLACE " -O2" "" PERL_COMPILE_FLAGS "${PERL_COMPILE_FLAGS}")
+ endif()
-if(APPLE)
- # ldopts contains all archs supported by the current platform, but we
- # only want those we specified in CMAKE_OSX_ARCHITECTURES.
- string(REGEX REPLACE "-arch [-a-zA-Z0-9_]*" "" PERL_LINK_FLAGS "${PERL_LINK_FLAGS}")
- foreach (arch ${CMAKE_OSX_ARCHITECTURES})
- set(PERL_LINK_FLAGS " -arch ${arch} ${PERL_LINK_FLAGS}")
- endforeach(arch)
-endif()
+ if(APPLE)
+ # ldopts contains all archs supported by the current platform, but we
+ # only want those we specified in CMAKE_OSX_ARCHITECTURES.
+ string(REGEX REPLACE "-arch [-a-zA-Z0-9_]*" "" PERL_LINK_FLAGS "${PERL_LINK_FLAGS}")
+ foreach (arch ${CMAKE_OSX_ARCHITECTURES})
+ set(PERL_LINK_FLAGS " -arch ${arch} ${PERL_LINK_FLAGS}")
+ endforeach(arch)
+ endif()
# Remove new line characters
string(REGEX REPLACE "(\r?\n)+$" "" PERL_LINK_FLAGS "${PERL_LINK_FLAGS}")