Skip to content

Commit

Permalink
CMakeLists.txt : remove -O2 from OPENHRP_DEFINITIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada committed Jul 4, 2017
1 parent 5f6a10b commit 13ad73c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ find_package(OpenHRP REQUIRED)
include_directories(${OPENHRP_INCLUDE_DIRS})
link_directories(${OPENHRP_LIBRARY_DIRS})
if(UNIX)
# remove -O2 ... from ${OPENHRP_DEFINITIONS}
message(STATUS "OPENHRP_DEFINITIONS: ${OPENHRP_DEFINITIONS}")
message(STATUS "REMOVE -Ox option from OPENHRP_DEFINITIONS, use CMAKE_BUILD_TYPE")
string(REGEX REPLACE "[ ]+-O[0-9][ ]+" " " OPENHRP_DEFINITIONS ${OPENHRP_DEFINITIONS})
message(STATUS "OPENHRP_DEFINITIONS: ${OPENHRP_DEFINITIONS}")
add_definitions(${OPENHRP_DEFINITIONS})

endif()

if(ENABLE_INSTALL_RPATH)
Expand Down Expand Up @@ -97,6 +103,11 @@ if(NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL None)
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE)
endif()
message(STATUS "Compile with ${CMAKE_BUILD_TYPE}")
message(STATUS " -- CMAKE_C_FLAGS / CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS} / ${CMAKE_C_FLAGS}")
message(STATUS " -- CMAKE_C_FLAGS_DEBUG / CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG} / ${CMAKE_C_FLAGS_DEBUG}")
message(STATUS " -- CMAKE_C_FLAGS_RELEASE / CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE} / ${CMAKE_C_FLAGS_RELEASE}")
message(STATUS " -- CMAKE_C_FLAGS_RELWITHDEBINFO / CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO} / ${CMAKE_C_FLAGS_RELWITHDEBINFO}")

set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
Expand Down

0 comments on commit 13ad73c

Please sign in to comment.