Skip to content

Commit

Permalink
[build]: strip c++14 std from flags if present in cmake
Browse files Browse the repository at this point in the history
Signed-off-by: arezaii <[email protected]>
  • Loading branch information
arezaii committed Sep 26, 2023
1 parent 7d938b4 commit 1beaff0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ endif()
# set(DEBUG OFF CACHE BOOL "DEBUG flag from make") # CMake Debug?
# set(PROFILE OFF CACHE BOOL "PROFILE flag from make")

# We set the cxx standard in the sub folders, strip the standard from the bunch of flags we got
string(REPLACE "-std=c++14" "" CHPL_CXX_FLAGS "${CHPL_CXX_FLAGS}")
message(VERBOSE "Using C++ compile options ${CHPL_CXX_FLAGS}")
message(VERBOSE "Using C++ link options ${CHPL_LD_FLAGS}")

Expand Down Expand Up @@ -322,6 +324,9 @@ foreach (CHPLENV_LINE IN LISTS CHPLENV_OUTPUT)
# message(DEBUG "Setting ${CHPLENV_LINE} as ${CHPL_ENV_NAME} ${CHPL_ENV_VALUE}")
set(${CHPL_ENV_NAME} ${CHPL_ENV_VALUE} CACHE STRING "overwritten description" FORCE)
endforeach()
# We set the cxx standard in the sub folders, strip the standard from the bunch of flags we got
string(REPLACE "-std=c++14" "" CHPL_HOST_BUNDLED_COMPILE_ARGS "${CHPL_HOST_BUNDLED_COMPILE_ARGS}")
string(REPLACE "-std=c++14" "" CHPL_HOST_SYSTEM_COMPILE_ARGS "${CHPL_HOST_SYSTEM_COMPILE_ARGS}")

if ((CHPL_HOME STREQUAL CMAKE_BINARY_DIR) OR
(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR))
Expand Down

0 comments on commit 1beaff0

Please sign in to comment.