Skip to content

Commit

Permalink
[cmake] fix build with USE_PCH=On on Linux/gcc
Browse files Browse the repository at this point in the history
The project builds using c++17 standard, so if compile headers with
-std=c++14 compiler complains about "optional" and so on things,
that part of c++17 standard
  • Loading branch information
Dushistov authored and tomilov committed Aug 11, 2020
1 parent 8524362 commit f8e8eb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/OmimHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ function(add_precompiled_headers header pch_target_name)
export_directory_flags("${pch_flags_file}")
set(compiler_flags "@${pch_flags_file}")

# CMAKE_CXX_STANDARD 14 flags:
set(c_standard_flags "-std=c++14" "-std=gnu++14")
# CMAKE_CXX_STANDARD 17 flags:
set(c_standard_flags "-std=c++17")
get_filename_component(pch_file_name ${header} NAME)

add_pic_pch_target(${header} ${pch_target_name} ${pch_file_name} lib "-fPIC")
Expand Down

0 comments on commit f8e8eb5

Please sign in to comment.