Open talshadow opened 9 years ago
I have a similar problem when trying to use C++11.
I defined using C++11 with set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
but it isn't picked up by this the precompiled header.
I have similar issue. I'm using set(CMAKE_CXX_STANDARD 14)
but it doesn't got picked up by this script when compiling the header, and so compilation fails.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
will not work. You have to use add_compile_options(-std=c++11) instead
if some in CMakeLists.txt have : target_compile_definitions(test-cxx-force PUBLIC OPENFLAG=\"Open\") build wrong gch file. if call cmake with -DCMAKE_BUILD_TYPE=Debug build wrong gch file. Try this lifehack :)
export_all_flags("${_pch_flags_file}")