Minor fixes for MSVC

This commit is contained in:
2018-03-28 10:57:08 +02:00
parent 97ce18f5f1
commit 6286f02db7
2 changed files with 44 additions and 37 deletions

View File

@@ -19,9 +19,9 @@ ENDIF()
INCLUDE_DIRECTORIES(
../
../../
../../../
../../../../
../../
../../../
../../../../
)
@@ -42,33 +42,41 @@ FILE(GLOB SOURCES
./*/*/*.cpp
./*/*/*/*.cpp
../../Indoor/lib/tinyxml/tinyxml2.cpp
../../Indoor/lib/Recast/*.cpp
../../Indoor/lib/Recast/*.cpp
)
# system specific compiler flags
ADD_DEFINITIONS(
if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio*")
add_definitions(
-D_USE_MATH_DEFINES
-DUNICODE
-D_UNICODE
)
else()
# system specific compiler flags
ADD_DEFINITIONS(
#-std=gnu++14
#-std=gnu++14
-Wall
-Werror=return-type
-Wextra
-Wpedantic
-Wall
-Werror=return-type
-Wextra
-Wpedantic
-fstack-protector-all
-fstack-protector-all
-g3
#-O2
-march=native
-g3
#-O2
-march=native
)
endif()
-DWITH_TESTS
add_definitions(
# -DWITH_TESTS
-DWITH_ASSERTIONS
#-DWITH_DEBUG_LOG
#-DWITH_DEBUG_PLOT
#-D_GLIBCXX_DEBUG
# -DWITH_DEBUG_LOG
# -DWITH_DEBUG_PLOT
# -D_GLIBCXX_DEBUG
)
# allow OMP
@@ -89,8 +97,8 @@ ADD_EXECUTABLE(
# needed external libraries
TARGET_LINK_LIBRARIES(
${PROJECT_NAME}
gtest
pthread
# gtest
# pthread
)
SET(CMAKE_C_COMPILER ${CMAKE_CXX_COMPILER})