You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :)
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.
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}")$(CXX_DEFINES) $ (CXX_FLAGS) -x c++-header -o "${_output_cxx}" "${_pchfile}"$(C_DEFINES) $ (C_FLAGS) -x c-header -o "${_output_c}" "${_pchfile}"
#set(_compiler_FLAGS "@${_pch_flags_file}")
add_custom_command(
OUTPUT "${_pchfile}"
COMMAND "${CMAKE_COMMAND}" -E copy "${_pch_header}" "${_pchfile}"
DEPENDS "${_pch_header}"
COMMENT "Updating ${_name}")
add_custom_command(
OUTPUT "${_output_cxx}"
COMMAND "${CMAKE_CXX_COMPILER}"
DEPENDS "${_pchfile}" "${_pch_flags_file}"
COMMENT "Precompiling ${_name} for ${_target} (C++)")
add_custom_command(
OUTPUT "${_output_c}"
COMMAND "${CMAKE_C_COMPILER}"
DEPENDS "${_pchfile}" "${_pch_flags_file}"
COMMENT "Precompiling ${_name} for ${_target} (C)")
The text was updated successfully, but these errors were encountered: