Skip to content

Commit

Permalink
removed MSVC guards for importing math symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
pattacini committed Dec 18, 2015
1 parent 1966fb3 commit 4ad8ec1
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 42 deletions.
6 changes: 2 additions & 4 deletions src/libraries/ctrlLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ include_directories(${PROJECT_SOURCE_DIR}/include
${GSL_INCLUDE_DIRS}
${YARP_INCLUDE_DIRS})

if(MSVC)
add_definitions(-D_USE_MATH_DEFINES)
endif()

# import math symbols from standard cmath
add_definitions(-D_USE_MATH_DEFINES)
add_library(${PROJECT_NAME} ${folder_source} ${folder_header})
target_link_libraries(${PROJECT_NAME} ${GSL_LIBRARIES} ${YARP_LIBRARIES})

Expand Down
6 changes: 2 additions & 4 deletions src/libraries/iDyn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ include_directories(${PROJECT_SOURCE_DIR}/include
${GSL_INCLUDE_DIRS}
${YARP_INCLUDE_DIRS})

if(MSVC)
add_definitions(-D_USE_MATH_DEFINES)
endif()

# import math symbols from standard cmath
add_definitions(-D_USE_MATH_DEFINES)
add_library(${PROJECT_NAME} ${folder_source} ${folder_header})
target_link_libraries(${PROJECT_NAME} iKin
skinDynLib
Expand Down
6 changes: 2 additions & 4 deletions src/libraries/iKin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ if(ICUB_USE_IPOPT)
add_definitions(${IPOPT_DEFINITIONS})
endif()

if(MSVC)
add_definitions(-D_USE_MATH_DEFINES)
endif()

# import math symbols from standard cmath
add_definitions(-D_USE_MATH_DEFINES)
add_library(${PROJECT_NAME} ${folder_source} ${folder_header})
target_link_libraries(${PROJECT_NAME} ctrlLib ${YARP_LIBRARIES})

Expand Down
7 changes: 2 additions & 5 deletions src/libraries/optimization/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ include_directories(${PROJECT_SOURCE_DIR}/include
${IPOPT_INCLUDE_DIRS}
${YARP_INCLUDE_DIRS})

add_definitions(${IPOPT_DEFINITIONS})
if(MSVC)
add_definitions(-D_USE_MATH_DEFINES)
endif()

# import math symbols from standard cmath
add_definitions(${IPOPT_DEFINITIONS} -D_USE_MATH_DEFINES)
add_library(${PROJECTNAME} ${folder_source} ${folder_header})

set_property(TARGET ${PROJECTNAME} APPEND_STRING PROPERTY LINK_FLAGS " ${IPOPT_LINK_FLAGS}")
Expand Down
6 changes: 2 additions & 4 deletions src/modules/camCalibWithPose/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ include_directories(${PROJECT_SOURCE_DIR}/include
${OpenCV_INCLUDE_DIRS}
${YARP_INCLUDE_DIRS})

if(MSVC)
add_definitions(-D_USE_MATH_DEFINES)
endif()

# import math symbols from standard cmath
add_definitions(-D_USE_MATH_DEFINES)
add_executable(${PROJECT_NAME} ${folder_source} ${folder_header})
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBRARIES} ${YARP_LIBRARIES})
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
Expand Down
6 changes: 2 additions & 4 deletions src/modules/iKinGazeCtrl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ include_directories(${PROJECT_SOURCE_DIR}/include
${IPOPT_INCLUDE_DIRS}
${YARP_INCLUDE_DIRS})

if(MSVC)
add_definitions(-D_USE_MATH_DEFINES)
endif()

# import math symbols from standard cmath
add_definitions(-D_USE_MATH_DEFINES)
add_executable(${PROJECTNAME} ${folder_header} ${folder_source})
target_link_libraries(${PROJECTNAME} ctrlLib iKin ${YARP_LIBRARIES})
install(TARGETS ${PROJECTNAME} DESTINATION bin)
Expand Down
6 changes: 2 additions & 4 deletions src/modules/wholeBodyDynamics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ include_directories(${iDyn_INCLUDE_DIRS}
${YARP_INCLUDE_DIRS}
${skinDynLib_INCLUDE_DIRS})

if(MSVC)
add_definitions(-D_USE_MATH_DEFINES)
endif()

# import math symbols from standard cmath
add_definitions(-D_USE_MATH_DEFINES)
add_executable(${PROJECT_NAME} ${folder_source} ${folder_header})
target_link_libraries(${PROJECT_NAME} iDyn
${YARP_LIBRARIES}
Expand Down
6 changes: 2 additions & 4 deletions src/simulators/iCubSimulation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,8 @@ ELSE ()
ADD_DEFINITIONS(-DOMIT_LOGPOLAR)
ENDIF ()

if(MSVC)
add_definitions(-D_USE_MATH_DEFINES)
endif()

# import math symbols from standard cmath
add_definitions(-D_USE_MATH_DEFINES)
ADD_EXECUTABLE(${PROJECTNAME} ${folder_source} ${folder_header})

TARGET_LINK_LIBRARIES(${PROJECTNAME} ${YARP_LIBRARIES} iKin)
Expand Down
7 changes: 2 additions & 5 deletions src/tools/depth2kin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,9 @@ include_directories(${PROJECT_SOURCE_DIR}/include
${iKin_INCLUDE_DIRS}
${optimization_INCLUDE_DIRS}
${learningMachine_INCLUDE_DIRS})

add_definitions(${IPOPT_DEFINITIONS})
if(MSVC)
add_definitions(-D_USE_MATH_DEFINES)
endif()

# import math symbols from standard cmath
add_definitions(${IPOPT_DEFINITIONS} -D_USE_MATH_DEFINES)
add_executable(${PROJECTNAME} ${header_files} ${source_files} ${idl_files} ${doc_files})
set_property(TARGET ${PROJECTNAME} APPEND_STRING PROPERTY LINK_FLAGS " ${IPOPT_LINK_FLAGS}")
target_link_libraries(${PROJECTNAME} ${YARP_LIBRARIES}
Expand Down
6 changes: 2 additions & 4 deletions src/tools/iCubGui/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,8 @@ include_directories(${GLUT_INCLUDE_DIRS}
set(CMAKE_INCLUDE_CURRENT_DIR TRUE)

# Set defines
add_definitions(${QT_DEFINITIONS})
if(MSVC)
add_definitions(-D_USE_MATH_DEFINES)
endif()
# import math symbols from standard cmath
add_definitions(${QT_DEFINITIONS} -D_USE_MATH_DEFINES)

# Compile and link
add_executable(iCubGui WIN32 ${iCubGui_HDRS}
Expand Down

0 comments on commit 4ad8ec1

Please sign in to comment.