Merge pull request #77 from borglab/fix/more-cmake-msvc-errors

Fix more CMake errors for MSVC builds
release/4.3a0
Frank Dellaert 2019-06-21 07:20:42 -07:00 committed by GitHub
commit 8373d45bbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 9 deletions

View File

@ -82,16 +82,18 @@ if(NOT MSVC AND NOT XCODE_VERSION)
option(GTSAM_BUILD_WITH_CCACHE "Use ccache compiler cache" ON) option(GTSAM_BUILD_WITH_CCACHE "Use ccache compiler cache" ON)
endif() endif()
if(NOT MSVC AND NOT XCODE_VERSION)
# Set the build type to upper case for downstream use # Set the build type to upper case for downstream use
string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER) string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)
# Set the GTSAM_BUILD_TAG variable. # Set the GTSAM_BUILD_TAG variable.
# If build type is Release, set to blank (""), else set to the build type. # If build type is Release, set to blank (""), else set to the build type.
if(${CMAKE_BUILD_TYPE_UPPER} STREQUAL "RELEASE") if("${CMAKE_BUILD_TYPE_UPPER}" STREQUAL "RELEASE")
set(GTSAM_BUILD_TAG "") # Don't create release mode tag on installed directory set(GTSAM_BUILD_TAG "") # Don't create release mode tag on installed directory
else() else()
set(GTSAM_BUILD_TAG "${CMAKE_BUILD_TYPE}") set(GTSAM_BUILD_TAG "${CMAKE_BUILD_TYPE}")
endif() endif()
endif()
# Options relating to MATLAB wrapper # Options relating to MATLAB wrapper
# TODO: Check for matlab mex binary before handling building of binaries # TODO: Check for matlab mex binary before handling building of binaries
@ -537,7 +539,6 @@ if(GTSAM_UNSTABLE_AVAILABLE)
print_config_flag(${GTSAM_BUILD_UNSTABLE} "Build libgtsam_unstable ") print_config_flag(${GTSAM_BUILD_UNSTABLE} "Build libgtsam_unstable ")
endif() endif()
print_config_flag(${GTSAM_BUILD_WITH_MARCH_NATIVE} "Build for native architecture ")
if(NOT MSVC AND NOT XCODE_VERSION) if(NOT MSVC AND NOT XCODE_VERSION)
print_config_flag(${GTSAM_BUILD_WITH_MARCH_NATIVE} "Build for native architecture ") print_config_flag(${GTSAM_BUILD_WITH_MARCH_NATIVE} "Build for native architecture ")
message(STATUS " Build type : ${CMAKE_BUILD_TYPE}") message(STATUS " Build type : ${CMAKE_BUILD_TYPE}")