@@ -87,11 +87,13 @@ include(cmakemodules/script_detect_clang.cmake REQUIRED) # Detect clang comp
87
87
88
88
# ------------------------------------------
89
89
# We want libraries to be named "libXXX"
90
- # and "libXXX-dbg" in all compilers:
90
+ # in all compilers, and and "libXXX-dbg" in MSVC
91
91
# ------------------------------------------
92
- set (CMAKE_DEBUG_POSTFIX "-dbg" )
93
92
IF (MSVC )
94
93
set (MRPT_LIB_PREFIX "lib" ) # Libs are: "libXXX"
94
+ set (CMAKE_DEBUG_POSTFIX "-dbg" )
95
+ ELSE ()
96
+ set (CMAKE_DEBUG_POSTFIX "" )
95
97
ENDIF ()
96
98
97
99
# In case of Makefiles if the user does not setup CMAKE_BUILD_TYPE, assume it's Release:
@@ -440,12 +442,12 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
440
442
# The -Wno-long-long is required in 64bit systems when including sytem headers.
441
443
# The -Wno-variadic-macros was needed for Eigen3, StdVector.h
442
444
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CONFIGURE_CFLAGS} -Wall -Wno-long-long -Wno-variadic-macros" )
443
-
445
+
444
446
# Workaround: Eigen <3.3 produces *tons* of warnings in GCC >=6. See http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1221
445
447
IF (NOT CMAKE_MRPT_GCC_VERSION LESS 60 AND "${MRPT_EIGEN_VERSION} " VERSION_LESS "3.3" )
446
448
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-ignored-attributes" )
447
449
ENDIF ()
448
-
450
+
449
451
IF (NOT APPLE )
450
452
# This causes the option "-Wnorite-strings" to be set on gcc-4.9 on OS X
451
453
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-write-strings" )
@@ -635,14 +637,7 @@ SET( MEX_EXECUTABLE_OUTPUT_PATH ${MRPT_BINARY_DIR}/mex/test CACHE PATH "Output d
635
637
IF (CMAKE_MRPT_USE_DEB_POSTFIXS)
636
638
# Values when building a Debian package ---------------
637
639
MESSAGE (STATUS "** mrpt cmake: Using Debian post-fix for install directories **" )
638
- IF (CMAKE_BUILD_TYPE STREQUAL "Debug" )
639
- # Debug packages
640
- SET (libmrpt_dev_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX} /libmrpt-dbg/usr/" )
641
- ELSE ()
642
- # Normal packages
643
- SET (libmrpt_dev_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX} /libmrpt-dev/usr/" )
644
- ENDIF ()
645
-
640
+ SET (libmrpt_dev_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX} /libmrpt-dev/usr/" )
646
641
SET (mrpt_apps_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX} /mrpt-apps/usr/" )
647
642
SET (mrpt_doc_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX} /mrpt-doc/usr/" )
648
643
SET (mrpt_common_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX} /mrpt-common/usr/" )
@@ -668,7 +663,7 @@ STRING(REGEX REPLACE "/STACK:[0-9]+" "/STACK:1000000" CMAKE_SHARED_LINKER_FLAGS
668
663
# dependencies stored in "mrpt-${name}_LIB_DEPS"
669
664
SET (ALL_MRPT_LIBS "" CACHE INTERNAL "" ) # This emulates global vars
670
665
671
- IF (NOT CMAKE_VERSION VERSION_LESS "2.8.12" )
666
+ IF (NOT MSVC AND NOT CMAKE_VERSION VERSION_LESS "2.8.12" )
672
667
include (cmakemodules/cotire.cmake REQUIRED) # COmpiler TIme REducer helper for PCH
673
668
set_directory_properties (PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE ) # Disable unity targets
674
669
ENDIF ()
0 commit comments