Skip to content

Commit

Permalink
[loadgen]: Allow one to pass in custom CXX_FLAGS by passing the MLPER…
Browse files Browse the repository at this point in the history
…F_LOADGEN_CXX_FLAGS cmake variable. This allows upstream projects to specify extra CXX_FLAGs.
  • Loading branch information
abduld committed May 3, 2022
1 parent 7d6deb5 commit b415995
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions loadgen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ message("mlperf_loadgen v${mlperf_loadgen_VERSION_MAJOR}.${mlperf_loadgen_VERSIO
if (NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -W -Wall")
endif()
# Extra build options can be specified by setting the MLPERF_LOADGEN_CXX_FLAGS variable
if (MLPERF_LOADGEN_CXX_FLAGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MLPERF_LOADGEN_CXX_FLAGS}")
endif()
message(STATUS "Using C++ compiler flags: ${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_STANDARD "14")
message(STATUS "Using C++ standard: ${CMAKE_CXX_STANDARD}")
Expand Down

0 comments on commit b415995

Please sign in to comment.